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

CA-370140: shut down swtpm after qemu #4812

Merged
merged 1 commit into from
Oct 11, 2022

Conversation

psafont
Copy link
Member

@psafont psafont commented Oct 6, 2022

Qemu sends a signal to swtpm to cleanly shut down, this means that Qemu needs to be shut down before SWTPM, and it also means that it's normal behaviour that SWTPM shuts down itself as a consequence of this.

This means that on successful attempts this loglines will be printed when xenopsd tries to shut the service down:

Oct  6 14:23:13 x-11-58 xenopsd-xc: [debug||17 |events|service] About to stop vTPM (73a7dbe6-1ea8-b04b-aeea-5b3b524386d1) for domain 1 (9e2bff38-0c30-a9fe-2420-4c7f0fa1f2b4)
Oct  6 14:23:13 x-11-58 xenopsd-xc: [ info||17 |events|service] Not trying to stop swtpm-wrapper-1 since it's not running
Oct  6 14:23:13 x-11-58 xenopsd-xc: [debug||17 |events|service] Storing vTPM state of 6791 bytes
Oct  6 14:23:13 x-11-58 xenopsd-xc: [debug||17 |events|xenops_sandbox] About to stop swtpm for 1 (9e2bff38-0c30-a9fe-2420-4c7f0fa1f2b4) File "ocaml/xenopsd/lib/xenops_sandbox.ml", line 185, characters 69-76

Note that trying to shut SWTPM is still needed in case there's an error in this procedure.

Qemu sends a signal to swtpm to cleanly shut down the guest, this needs
Qemu being shut down last

Signed-off-by: Pau Ruiz Safont <pau.safont@citrix.com>
Copy link
Contributor

@edwintorok edwintorok left a comment

Choose a reason for hiding this comment

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

Yes, the stop is also needed to unregister and cleanup the socket from swtpm_guard.

@psafont psafont merged commit 4778c6d into xapi-project:master Oct 11, 2022
@psafont psafont deleted the private/paus/swtpm-last branch October 11, 2022 09:53
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.

3 participants