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

report guest uptime to the host #22

Merged
merged 1 commit into from
Aug 1, 2024
Merged

Conversation

robinelfrink
Copy link
Collaborator

@robinelfrink robinelfrink commented Jul 30, 2024

It appears that the host needs to know the guest's uptime information to determine if a soft reboot was succesful.

Closes #21

@smira
Copy link
Member

smira commented Jul 30, 2024

this PR might need make rekres

@robinelfrink robinelfrink changed the title fix: reset change state after power operation fix: reset change status after power operation Jul 30, 2024
@robinelfrink
Copy link
Collaborator Author

this PR might need make rekres

OK, a simple make rekres and git commit -m 'rekres update but with better wording' will do?

@smira
Copy link
Member

smira commented Jul 30, 2024

this PR might need make rekres

OK, a simple make rekres and git commit -m 'rekres update but with better wording' will do?

squash the commits anyways

@robinelfrink robinelfrink marked this pull request as draft July 30, 2024 11:42
@robinelfrink robinelfrink marked this pull request as ready for review July 30, 2024 11:48
@robinelfrink robinelfrink marked this pull request as draft July 30, 2024 12:23
@robinelfrink robinelfrink force-pushed the main branch 2 times, most recently from 60df755 to 571c1a0 Compare July 31, 2024 09:14
@robinelfrink robinelfrink changed the title fix: reset change status after power operation report guest uptime to the host Jul 31, 2024
@robinelfrink robinelfrink force-pushed the main branch 3 times, most recently from a0e8c29 to 20cce3d Compare July 31, 2024 09:24
@robinelfrink robinelfrink marked this pull request as ready for review July 31, 2024 09:25
It appears that the host needs to know the guest's uptime information to
determine if a soft reboot was successful. Additionally, the uptime needs
to be reported in response to the capabilities request.

This commit includes the results of `make rekres`.

Signed-off-by: Robin Elfrink <[email protected]>
@robinelfrink
Copy link
Collaborator Author

robinelfrink commented Jul 31, 2024

Well, I thought I got to the bottom of the reboot-only-once-problem with the change status, but I was wrong. However while trying to find the flaws in my thinking, I stumbled upon some code from the original open-vm-tools, and a couple of interesting differences between logs of a talos-vmtoolsd and a debian guest.

So it turns out that the host needs the guest's uptime information to know that a soft reboot has happened, and that information must be sent at a very specific place in the communication: the capabilities request.

host: "what are your capabilities?"
guest: "i've been running for 56 seconds already!"

@robinelfrink robinelfrink requested review from smira, jonkerj and lennardk and removed request for jonkerj July 31, 2024 09:45
Copy link
Member

@smira smira left a comment

Choose a reason for hiding this comment

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

nice catch!

@lennardk lennardk merged commit e8050cd into siderolabs:main Aug 1, 2024
11 checks passed
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.

Unable to restart guest OS using vSphere
4 participants