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

baremetal: Prevent race condition when adding HardwareDetails #3809

Merged
merged 1 commit into from Jul 23, 2020

Commits on Jul 17, 2020

  1. baremetal: Prevent race condition when adding HardwareDetails

    We add HardwareDetails to a BareMetalHost resource by including them in
    initial Status data that is attached to the Host as an annotation. This
    annotation must be present before the BareMetalHost is first reconciled
    (thus creating the Status subresource), otherwise it will be ignored.
    
    It is not possible to add the annotation at the time the BareMetalHost
    is created. Therefore, we were previously relying on it being added
    before the baremetal-operator is up and running. In practice this works
    because the baremetal-operator takes a long time to start up, but in
    fact this is a race.
    
    Prevent the race by setting the baremetalhost.metal3.io/paused
    annotation on the CR at the time it is created, and removing it again
    when the status annotation is added. This annotation prevents the
    operator from attempting to reconcile the resource.
    zaneb committed Jul 17, 2020
    Copy the full SHA
    1f04061 View commit details
    Browse the repository at this point in the history