-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fix the OSBMS scaling KUTTL test #1111
Fix the OSBMS scaling KUTTL test #1111
Conversation
--- | ||
# We don't know which BMH was chosen as compute-0 originally, so we use a script to | ||
# check for the "BaremetalHostNotFound" error (as the actual error message will vary | ||
# based on which BMH was actually deleted) | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
namespaced: true | ||
timeout: 600 | ||
commands: | ||
- script: | | ||
set -x | ||
sleep 5 | ||
osbmsstate=$(oc get osbms -n openstack compute -o json | jq -r '.status.provisioningStatus.reason') | ||
if grep -q "Please check BaremetalHost resources and re-add" <<< "$osbmsstate"; then | ||
exit 0 | ||
else | ||
exit 1 | ||
fi |
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.
This was unnecessary. Just checking the OSBMS status.provisioningStatus.readyCount
and status.provisioningStatus.state
is enough to detect the problem we are expecting.
reason: Existing BaremetalHost "openshift-worker-0" not found for OpenStackBaremetalSet | ||
compute. Please check BaremetalHost resources and re-add "openshift-worker-0" | ||
to continue |
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.
This was unnecessary. Just checking the OSBMS status.provisioningStatus.readyCount
and status.provisioningStatus.state
is enough to detect the problem we are expecting.
reason: Existing BaremetalHost "openshift-worker-0" not found for OpenStackBaremetalSet | ||
compute. Please check BaremetalHost resources and re-add "openshift-worker-0" | ||
to continue |
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.
This was unnecessary. Just checking the OSBMS status.provisioningStatus.readyCount
and status.provisioningStatus.state
is enough to detect the problem we are expecting.
bmhname=$(oc get -n openstack osbms compute -o json | jq -r '.status.baremetalHosts["compute-0"].hostRef') | ||
bmhsecretname=$(oc get bmh -n openshift-machine-api ${bmhname} -o json | jq -r '.spec.bmc.credentialsName') | ||
oc get -n openshift-machine-api bmh ${bmhname} -o json |\ | ||
bmhname=$(oc get bmh -n openshift-machine-api -l osp-director.openstack.org/name=compute -l osp-director.openstack.org/namespace=openstack -o name | head -1) | ||
bmhsecretname=$(oc get -n openshift-machine-api ${bmhname} -o json | jq -r '.spec.bmc.credentialsName') |
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.
We don't need to pick a specific host/BMH. We just need to delete one of them, and so we now just choose the first one in the list.
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abays, stuggi 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 |
6f23064
into
openstack-k8s-operators:master
Fixes for the
OpenStackBaremetalSet
scaling KUTTL test. Also adjusts the default RHEL image in our config samples and makes minor edits to other KUTTL tests that consider this image.