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
BaremetalHost: Use new errorType field in Host CR #3964
Conversation
Hi @zaneb. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
frontend/packages/metal3-plugin/src/selectors/baremetal-hosts.ts
Outdated
Show resolved
Hide resolved
feef90d
to
f3b9865
Compare
/ok-to-test |
f3b9865
to
9066418
Compare
/lgtm |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
4 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
1 similar comment
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
9 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/hold |
I'm assuming this was held because the queue was broken. /hold cancel |
/retest Please review the full test history for this PR and help us cut down flakes. |
When the operational status is in error, the BaremetalHost operator now reports the type of error from a fixed list. This is more reliable than determining the type of error from the provisioning status (e.g. a registration error may occur while the host is provisioning). The possible error types are registration, inspection, provisioning, and power management errors. There is no longer a validation error, and has not been for some time. Currently, there are actually separate provisioning states for each error type, so the Host would never have been in a Registering or Provisioning state after an error anyway, and this code would always have reported the host status as just 'error'. These separate states are being removed in favour of the separate errorType field. Since the existing code was not reachable, there is no need to keep it for backward compatibility with older versions of the operator. Signed-off-by: Zane Bitter <zbitter@redhat.com>
9066418
to
4907a0b
Compare
I rebased the patch to hopefully fix CI. |
/retest |
@@ -18,6 +18,8 @@ import { | |||
|
|||
export const getHostOperationalStatus = (host: BareMetalHostKind): string => | |||
_.get(host, 'status.operationalStatus'); | |||
export const getHostErrorType = (host: BareMetalHostKind): string => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: you can use TS 3.7 optional chaining
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jtomasek, rawagner, zaneb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
When the operational status is in error, the BaremetalHost operator now (since metal3-io/baremetal-operator#369) reports the type of error from a fixed list. This is more reliable than determining the type of error from the provisioning status (e.g. a registration error may occur while the host is provisioning).
The possible error types are registration, inspection, provisioning, and power management errors. There is no longer a validation error, and such errors have not been produced for some time.
Currently, there are actually separate provisioning states for each error type, so the Host would never have been in a Registering or Provisioning state after an error anyway, and this code would always have reported the host status as just 'error'. These separate states are being removed (in metal3-io/baremetal-operator#388) in favour of the separate errorType field. Since the existing code was not reachable, there is no need to keep it for backward compatibility with older versions of the operator.