-
Notifications
You must be signed in to change notification settings - Fork 768
pkg/driver: Add Driver.AdditionalSetupForSSH()
#4251
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
pkg/driver: Add Driver.AdditionalSetupForSSH()
#4251
Conversation
e57439b to
eafd6fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eafd6fe to
fd67200
Compare
## pkg/driver: Add `Driver.AdditionalSetupForSSH()` AdditionalSetupForSSH provides additional setup required for SSH connection. It is called after the VM is started, before the first SSH connection. It returns an error if the setup fails. ## pkg/driver/vz: Change waiting `waitSSHLocalPortAccessible` in `Driver.AdditionalSetupForSSH()` instead of `startVM`. `waitSSHLocalPortAccessible` is being used for waiting configuration SSH over VSOCK. It makes `LimaVzDriver.Start()` to return as soon as possible. Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
fd67200 to
2623275
Compare
AkihiroSuda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
|
Thanks! 🙏🏻 |
|
This breaks the API, so we will need another beta release with this new method... AdditionalSetupForSSH(ctx context.Context) error
Maybe there is also time to fix the // func getWslStatus(ctx context.Context, instName string) (string, error)
InspectStatus(ctx context.Context, inst *limatype.Instance) string
// func getSSHAddress(ctx context.Context, instName string) (string, error)
SSHAddress(ctx context.Context) (string, error)Instead of now, where InspectStatus has side-effects and SSHAddress is a no-op. I will try to make a PR for it, and check it with the WSL2 (and AC and DC) drivers... EDIT: #4270 |
pkg/driver: Add
Driver.AdditionalSetupForSSH()AdditionalSetupForSSHprovides additional setup required for SSH connection.It is called after the VM is started, before the first SSH connection.
It returns an error if the setup fails.
pkg/driver/vz: Change waiting
waitSSHLocalPortAccessibleinDriver.AdditionalSetupForSSH()instead ofstartVM.waitSSHLocalPortAccessibleis being used for waiting configuration SSH over VSOCK.It makes
LimaVzDriver.Start()to return as soon as possible.Replaces #4248