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

Added Test Automation for disable keyrotation operation #10966

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paraggit
Copy link
Contributor

@paraggit paraggit commented Dec 3, 2024

Test 1:
Test disable PV keyrotation globally by anotating storageclass.

 Steps:
1. Add an annotation to the StorageClass to disable key rotation.
2. Verify that the key rotation jobs are deleted.
3. Remove the annotation from the StorageClass.
4. Verify that the key rotation CronJobs are created again.

Test 2:
Test disable PV keyrotation by RBAC User.

Steps:
1. Disable PV key rotation by modifying the keyrotationcronjob for the respective PVC. Add `state: unmanaged` and `suspend: true`.
2. Verify that the key rotation job’s suspend state is set to true.
3. Re-enable the key rotation job by changing `suspend: false`, or by removing the `suspend` key and setting `state: managed`.
4. Verify that key rotation is functioning correctly for the PVC.

@paraggit paraggit requested a review from a team as a code owner December 3, 2024 05:56
@pull-request-size pull-request-size bot added the size/L PR that changes 100-499 lines label Dec 3, 2024
@paraggit paraggit changed the title [WIP] Added Test Automation for disable keyrotation operation Added Test Automation for disable keyrotation operation Jan 21, 2025
Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

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

PR validation on existing cluster

Cluster Name: pakamble-ib418-l2
Cluster Configuration:
PR Test Suite: tier1
PR Test Path: tests/functional/pv/pv_encryption/test_disable_pv_keyrotation.py::TestDisablePVKeyrotationOperation
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master

Job UNSTABLE (some or all tests failed).

Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

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

PR validation on existing cluster

Cluster Name: pakamble-ib418-l2
Cluster Configuration:
PR Test Suite: tier1
PR Test Path: tests/functional/pv/pv_encryption/test_disable_pv_keyrotation.py::TestDisablePVKeyrotationOperation
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master

Job PASSED.

@paraggit paraggit added the Verified Mark when PR was verified and log provided label Jan 22, 2025
@paraggit paraggit requested a review from ebenahar January 22, 2025 11:03
@paraggit paraggit force-pushed the disable_keyrotation_operation branch from 25017d6 to dd22150 Compare January 22, 2025 15:21
Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

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

PR validation on existing cluster

Cluster Name: pakamble-ib418-l2
Cluster Configuration:
PR Test Suite: tier1
PR Test Path: tests/functional/pv/pv_encryption/test_disable_pv_keyrotation.py::TestDisablePVKeyrotationOperation
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master

Job PASSED.

Copy link
Contributor

@ebenahar ebenahar left a comment

Choose a reason for hiding this comment

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

Great job Parag.
we may need to support other providers in the future. Looks like to prepared the ground for that

raise UnexpectedBehaviour("PVC keys have not rotated yet.")

log.info("PVC keys rotated successfully.")
return True
Copy link
Contributor

Choose a reason for hiding this comment

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

this is reduandant

Copy link

openshift-ci bot commented Jan 22, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ebenahar, paraggit

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm size/L PR that changes 100-499 lines Verified Mark when PR was verified and log provided
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants