Skip to content

Fix QEMU guest agent install failing on first boot - #563

Open
BogdanEmilian wants to merge 2 commits into
cloudbase:mainfrom
BogdanEmilian:fix/qemu-ga-install-retry
Open

BogdanEmilian wants to merge 2 commits into
cloudbase:mainfrom
BogdanEmilian:fix/qemu-ga-install-retry

Conversation

@BogdanEmilian

Copy link
Copy Markdown
Contributor

The MSI install can fail transiently on first boot (e.g. with ERROR_SERVICE_DATABASE_LOCKED while the VSS provider service is registered), in which case the whole install is rolled back. This script will retry it, and if it still fails, ask Cloudbase-Init (exit code 1003) to reboot and run the local scripts again, once.

The MSI install can fail transiently on first boot (e.g. with ERROR_SERVICE_DATABASE_LOCKED while the VSS provider service is registered), in which case the whole install is rolled back. This script will retry it, and if it still fails, ask Cloudbase-Init (exit code 1003) to reboot and run the local scripts again, once.
Comment thread coriolis/osmorphing/windows.py Outdated
@@ -62,8 +62,24 @@
]

QEMU_GUEST_AGENT_INSTALL_SCRIPT_FORMAT = (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please replace the quoted string lines "<code>" with a multiline string """ like the STATIC_IP_SCRIPT_TEMPLATE below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the note!
I have replaced the quoted string lines to multiline string

Comment thread coriolis/osmorphing/windows.py Outdated
"$log = '%(agent_msi_log_dir)s\\qemu-guest-agent-msiexec.log'\n"
"$rebootMarker = '%(agent_msi_log_dir)s\\qemu-ga-install-rebooted'\n"
"for ($i = 1; $i -le 2; $i++) {\n"
' $code = (Start-Process msiexec.exe -ArgumentList "/i `"$msi`" '

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The line length limit can also be ignored with a # noqa at the end of the multiline block.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice, was not aware of that!
Added the marker at the end of the multiline block.

Thanks for the info!

@Cristi1324 Cristi1324 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

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