Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable GA serial port in QEMU as it is not used by GA #3148

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arixmkii
Copy link
Contributor

GA was switched back to use SSH socket forwarding due to stability issues, but QEMU still exposes the serial as a Unix socket, which is

  1. unused
  2. removed from FS and replaced with forwarded via SSH

This is unnecessary and confusing. Future code changes might introduce a common feature toggle to disable code paths simultaneously in QEMU, HA and GA setup, but for now it at least will make both code paths consistent.

GA was switched back to use SSH socket forwarding due to stability issues,
but QEMU still exposes the serial as a Unix socket, which is

1) unused
2) removed from FS and replaced with forwarded via SSH

This is unnecessary and confusing. Future code changes might introduce a
common feature toggle to disable code paths simultaneously in QEMU, HA and
GA setup, but for now it at least will make both code paths consistent.

Signed-off-by: Arthur Sengileyev <[email protected]>
@arixmkii
Copy link
Contributor Author

This is minor, but was confusing to me, when I pulled the latest version and tried to run it to understand all the wiring between different processes.

// guestSock := filepath.Join(cfg.InstanceDir, filenames.GuestAgentSock)
// args = append(args, "-chardev", fmt.Sprintf("socket,path=%s,server=on,wait=off,id=qga0", guestSock))
// args = append(args, "-device", "virtio-serial")
// args = append(args, "-device", "virtserialport,chardev=qga0,name="+filenames.VirtioPort)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the code is not needed lets delete it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still using it in an on/off manner (with changes in hostagent.go), while working on QEMU support on Windows hosts. So, it is not 100% useless for sure. May be we can just dismiss this PR for now and I will later create some other more prepared with either removal or feature toggle.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we need an option to enable/disable this?

You can also make this a draft, maybe others will find this change helpful.

@@ -920,11 +920,13 @@ func Cmdline(ctx context.Context, cfg Config) (exe string, args []string, err er
args = append(args, "-chardev", fmt.Sprintf("socket,id=%s,path=%s,server=on,wait=off", qmpChardev, qmpSock))
args = append(args, "-qmp", "chardev:"+qmpChardev)

// virtserialport doesn't seem to work reliably: https://github.com/lima-vm/lima/issues/2064
// should go together with hostagent::New changes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is not clear. If it is needed to explain why the code is commented it can be removed with the commented code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants