CA-363700: update xenopsd platformdata if rtc-timeoffset changes #4665
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The timeoffset parameter of a VM, which controls its timezone settings,
is present in the VM metadata in two places: in the build spec as well
as in the platformdata. This also drives the fact that the timeoffset is
written to two places in xenstore:
It turns out that the PV tools and/or QEMU in some way rely on both of
these paths.
When a VM starts, its timeoffset platform key is used to set the value
of both bits of metadata that are sent to xenopsd. If the timezone
inside of the VM is changed, then an event is sent back to xapi, which
updates the platform key in its xapi.
If a VM resumes, it is similar to start, but additionally the VM's
runtime metadata is sent to xenopsd as well, so the VM is resumed with
exactly the same state as before it suspended.
Since a recent change, the platformdata has been made part of xenopsd's
runtime VM metadata, and is therefore persisted across a suspend/resume
cycle or live migration. This means that the timeoffset in the
platformdata now comes from this xenopsd-level metadata rather than from
xapi's metadata.
This all would have been fine, if xenopsd were to update the timeoffset
in its persistent platformdata whenever it changes in the VM (besides
sending the event to xapi). Unfortunately, this was not the case, which
meant that, after a suspend/resume cycle, the VM's timezone reverted
back to whatever it was when the VM started, and any changes after that
are forgotten. The situation for live migration is similar.
This commit adds the missing metadata update in xenopsd.
Signed-off-by: Rob Hoes rob.hoes@citrix.com