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

Ensure KeystoneAPI is ready in kuttl tests #263

Closed
wants to merge 1 commit into from
Closed

Ensure KeystoneAPI is ready in kuttl tests #263

wants to merge 1 commit into from

Conversation

kajinamit
Copy link
Contributor

This ensures the Ready condition of KeystoneAPI becomes ready in every deployment step. Note that the condition should be false in case no pod is available so it is intentionally asserted to be false in case keystone service is scaled down to 0.

This ensures the Ready condition of KeystoneAPI becomes ready in every
deployment step. Note that the condition should be false in case no
pod is available so it is intentionally asserted to be false in case
keystone service is scaled down to 0.
@openshift-ci openshift-ci bot requested review from abays and dprince June 26, 2023 11:26
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 26, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kajinamit
Once this PR has been reviewed and has the lgtm label, please assign dprince for approval. For more information see the Kubernetes Code Review Process.

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

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

@abays
Copy link
Contributor

abays commented Jun 26, 2023

/test keystone-operator-build-deploy-kuttl

1 similar comment
@abays
Copy link
Contributor

abays commented Jun 26, 2023

/test keystone-operator-build-deploy-kuttl

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 26, 2023

@kajinamit: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/keystone-operator-build-deploy-kuttl e5e7743 link false /test keystone-operator-build-deploy-kuttl

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Comment on lines +43 to +45
conditions:
- status: "True"
type: Ready
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't work with KUTTL because it requires YAML lists to be in an exact order and have the exact number of items:

case.go:231: resource KeystoneAPI:keystone-kuttl-tests/keystone: .status.conditions: slice length mismatch: 1 != 13

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm. OK so we need to query a specific key instead. I'll postpone this now but will look into any better solutions when I get time.

Copy link
Contributor

Choose a reason for hiding this comment

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

One way to do this is to check for the associated KeystoneAPI service pod that has this label and this status:

metadata:
...
  labels:
    service: keystone
...
status:
  ...
  phase: Running
  ...

Or we could update the Deployment created for the KeystoneAPI to give it that label as well (it currently lacks it), and then check its Status.ReadyReplicas.

@kajinamit kajinamit closed this Jun 28, 2023
@kajinamit kajinamit deleted the kuttl-conditions branch June 28, 2023 06:27
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.

2 participants