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

sources/azure: remove reprovisioning marker #1414

Merged

Conversation

cjp256
Copy link
Contributor

@cjp256 cjp256 commented Apr 27, 2022

If we haven't reported ready for source PPS then we can treat
the recovery boot like any other. The metadata on the OVF
and IMDS will indicate the PPS type correctly as the state
hasn't changed.

If we have reported ready for source PPS, we continue to fall
into _poll_imds() by way of setting pps_type to UNKNOWN if the
REPORTED_READY_MARKER is present and will not attempt to report
ready again.

This fixes a potential issue when recovering on Savable PPS.
If a recovery boot occurs after the recovery marker is created,
and without reporting ready, the subsequent boot will assume
pps type UNKNOWN and attempt to report ready in _poll_imds()
using the Running PPS netlink operations.

Add unit test coverage for complete recovery scenario.

Signed-off-by: Chris Patterson cpatterson@microsoft.com

@cjp256
Copy link
Contributor Author

cjp256 commented Apr 27, 2022

NOTE: Prior to merging, needs review/approval from @anhvoms :)

If we haven't reported ready for source PPS then we can treat
the recovery boot like any other.  The metadata on the OVF
and IMDS will indicate the PPS type correctly as the state
hasn't changed.

If we have reported ready for source PPS, we continue to fall
into _poll_imds() by way of setting pps_type to UNKNOWN if the
REPORTED_READY_MARKER is present and will not attempt to report
ready again.

This fixes a potential issue when recovering on Savable PPS.
If a recovery boot occurs after the recovery marker is created,
and without reporting ready, the subsequent boot will assume
pps type UNKNOWN and attempt to report ready in _poll_imds()
using the Running PPS netlink operations.

Add unit test coverage for complete recovery scenario.

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
@cjp256 cjp256 force-pushed the azure-remove-reprovisioning-marker branch from 75984f6 to 706dcd0 Compare April 27, 2022 19:41
Copy link
Contributor

@anhvoms anhvoms left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

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

Thanks!

@TheRealFalcon TheRealFalcon merged commit 0c59a7e into canonical:main May 10, 2022
aciba90 pushed a commit to aciba90/cloud-init that referenced this pull request May 10, 2022
If we haven't reported ready for source PPS then we can treat
the recovery boot like any other.  The metadata on the OVF
and IMDS will indicate the PPS type correctly as the state
hasn't changed.

If we have reported ready for source PPS, we continue to fall
into _poll_imds() by way of setting pps_type to UNKNOWN if the
REPORTED_READY_MARKER is present and will not attempt to report
ready again.

This fixes a potential issue when recovering on Savable PPS.
If a recovery boot occurs after the recovery marker is created,
and without reporting ready, the subsequent boot will assume
pps type UNKNOWN and attempt to report ready in _poll_imds()
using the Running PPS netlink operations.

Add unit test coverage for complete recovery scenario.

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
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