Skip to content

describe unmanaged state for hosts#120

Merged
metal3-io-bot merged 1 commit intometal3-io:masterfrom
dhellmann:unmanaged-state
Jul 7, 2020
Merged

describe unmanaged state for hosts#120
metal3-io-bot merged 1 commit intometal3-io:masterfrom
dhellmann:unmanaged-state

Conversation

@dhellmann
Copy link
Copy Markdown
Member

@dhellmann dhellmann commented Jul 1, 2020

Related to metal3-io/baremetal-operator#569

Co-Authored-By: Zane Bitter zbitter@redhat.com

@metal3-io-bot metal3-io-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 1, 2020
@dhellmann
Copy link
Copy Markdown
Member Author

Based on @n1r1's reviews of metal3-io/baremetal-operator#569 I thought I had better put together a document explaining the API change there.

/cc @n1r1 @zaneb @maelk @kirankt @honza @stbenjam

@metal3-io-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 1, 2020
credentials, we want to be able to define hosts without BMC
credentials so that the credentials can be added at a later
time. Consumers of the hosts, including the
`cluster-api-provider-metal3`, need to be able to recognize such hosts
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should we also include cluster-api-provider-baremetal here now that the projects differ significantly.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I left that out because it's a downstream concern, but the changes would essentially be the same.

@n1r1
Copy link
Copy Markdown
Member

n1r1 commented Jul 2, 2020

Looks good to me. Some minor comments:

  1. Even if it's obvious for some users, I think we should mention explicitly that BMO won't be able to apply the desired state for unmanaged hosts. For example, any change to Online won't have any effect until BMC credentials are supplied.
  2. The change in consumers is not only where they look at the host state. It's also where they are not. For example, downstream in OCP, there's remediation code which assumes that any host has power management. So I think that any consumer who's trying to change spec.Online is potentially affected by this change

@dhellmann
Copy link
Copy Markdown
Member Author

Looks good to me. Some minor comments:

  1. Even if it's obvious for some users, I think we should mention explicitly that BMO won't be able to apply the desired state for unmanaged hosts. For example, any change to Online won't have any effect until BMC credentials are supplied.

I think that's covered by https://github.com/metal3-io/baremetal-operator/pull/569/files#diff-0f426376b964e609c5c4618eb8bed3b2R372

  1. The change in consumers is not only where they look at the host state. It's also where they are not. For example, downstream in OCP, there's remediation code which assumes that any host has power management. So I think that any consumer who's trying to change spec.Online is potentially affected by this change

I don't think the remediation code should change to behave differently when credentials are not present. That expects the caller to understand too much about how the baremetal operator works with hosts.

Even with credentials present, they might be wrong, and therefore the remediation would fail. The BMC might be frozen, and so remediation would fail. The BMC might be disconnected, and so remediation would fail. The calling code needs to deal with all of those cases. It should be able to ask for a reboot and then if that reboot does not happen for any reason it should be able to make a new decision about what to do.

dhellmann pushed a commit to dhellmann/baremetal-operator that referenced this pull request Jul 2, 2020
Define a new state for newly-created Hosts with no BMC details.

We need the state definition so we can add it to CAPM3 so that does
not break when metal3-io#569 merges.

See metal3-io/metal3-docs#120 for more
details.
Co-Authored-By: Zane Bitter <zbitter@redhat.com>
Signed-off-by: Doug Hellmann <dhellmann@redhat.com>
@dhellmann dhellmann requested review from hardys and russellb July 6, 2020 20:49
@maelk
Copy link
Copy Markdown
Member

maelk commented Jul 7, 2020

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2020
@metal3-io-bot metal3-io-bot merged commit f5f4ab0 into metal3-io:master Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants