Skip to content

STOR-1446: Restart vsphere-problem-detector-operator Pods if serving-cert changed - #394

Merged
openshift-merge-robot merged 2 commits into
openshift:masterfrom
mpatlasov:restart-vsphere-problem-detector-operator-pods-if-serving-cert-changed
Sep 19, 2023
Merged

STOR-1446: Restart vsphere-problem-detector-operator Pods if serving-cert changed#394
openshift-merge-robot merged 2 commits into
openshift:masterfrom
mpatlasov:restart-vsphere-problem-detector-operator-pods-if-serving-cert-changed

Conversation

@mpatlasov

@mpatlasov mpatlasov commented Aug 21, 2023

Copy link
Copy Markdown
Contributor

Adding WithSecretHashAnnotationHook() for vsphere-problem-detector-serving-cert ensures that new annotation is published in vsphere-problem-detector-operator deployment. This, in turn, leads to operator pods restart.

The second patch in this PR adds commnad-line option --terminate-on-files to operators denedent on metrics-serving-cert:

 * CSO operator itself (uses secret `cluster-storage-operator-serving-cert`)
 * vmware-vsphere operator (uses secret `vmware-vsphere-csi-driver-operator-metrics-serving-cert`)
 * shared-resource operator (uses secret `shared-resource-csi-driver-operator-metrics-serving-cert`)

Hence, if corresponding secrets change, the operators are restarted.

/cc @openshift/storage

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 21, 2023
@openshift-ci-robot

openshift-ci-robot commented Aug 21, 2023

Copy link
Copy Markdown
Contributor

@mpatlasov: This pull request references STOR-1446 which is a valid jira issue.

Details

In response to this:

Adding WithSecretHashAnnotationHook() for vsphere-problem-detector-serving-cert ensures that new annotation is published in vsphere-problem-detector-operator deployment. This, in turn, leads to operator pods restart.

/cc @openshift/storage

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.

@openshift-ci

openshift-ci Bot commented Aug 21, 2023

Copy link
Copy Markdown
Contributor

@mpatlasov: GitHub didn't allow me to request PR reviews from the following users: openshift/storage.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

Adding WithSecretHashAnnotationHook() for vsphere-problem-detector-serving-cert ensures that new annotation is published in vsphere-problem-detector-operator deployment. This, in turn, leads to operator pods restart.

/cc @openshift/storage

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.

@openshift-ci

openshift-ci Bot commented Aug 21, 2023

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mpatlasov

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 21, 2023
@mpatlasov

Copy link
Copy Markdown
Contributor Author

/label docs-approved
/label px-approved

@openshift-ci openshift-ci Bot added docs-approved Signifies that Docs has signed off on this PR px-approved Signifies that Product Support has signed off on this PR labels Aug 21, 2023
@mpatlasov

Copy link
Copy Markdown
Contributor Author

/assign @jsafrane

@openshift-ci-robot

openshift-ci-robot commented Aug 21, 2023

Copy link
Copy Markdown
Contributor

@mpatlasov: This pull request references STOR-1446 which is a valid jira issue.

Details

In response to this:

Adding WithSecretHashAnnotationHook() for vsphere-problem-detector-serving-cert ensures that new annotation is published in vsphere-problem-detector-operator deployment. This, in turn, leads to operator pods restart.

The second patch in this PR adds commnad-line option --terminate-on-files to operators denedent on metrics-serving-cert:

* CSO operator itself (uses secret `cluster-storage-operator-serving-cert`)
* vmware-vsphere operator (uses secret `vmware-vsphere-csi-driver-operator-metrics-serving-cert`)
* shared-resource operator (uses secret `shared-resource-csi-driver-operator-metrics-serving-cert`)

Hence, if corresponding secrets change, the operators are restarted.

/cc @openshift/storage

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.

…s denedent on `metrics-serving-cert`

CSO defines three operator dependednt on `metrics-serving-cert:

 * CSO operator itself (uses secret `cluster-storage-operator-serving-cert`)
 * vmware-vsphere operator (uses secret `vmware-vsphere-csi-driver-operator-metrics-serving-cert`)
 * shared-resource operator (uses secret `shared-resource-csi-driver-operator-metrics-serving-cert`)

If corresponding secrets change, the operators need to be restarted.
@mpatlasov
mpatlasov force-pushed the restart-vsphere-problem-detector-operator-pods-if-serving-cert-changed branch from e996f73 to 68c252f Compare August 22, 2023 18:08
@mpatlasov

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-ovn-upgrade
/test e2e-azure-ovn

@openshift-ci

openshift-ci Bot commented Aug 22, 2023

Copy link
Copy Markdown
Contributor

@mpatlasov: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

@dobsonj

dobsonj commented Aug 28, 2023

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 28, 2023
@Phaow

Phaow commented Sep 19, 2023

Copy link
Copy Markdown

Pre verifiy passed on 4.14.0-0.ci.test-2023-09-18-223508-ci-ln-i6j0vsk-latest(Pre merged build by cluster-bot)

# Check the start args added in cluster-storage-operator 
$ oc get deploy/cluster-storage-operator -o yaml| grep terminate-on-files
        - --terminate-on-files=/var/run/secrets/serving-cert/tls.crt
        - --terminate-on-files=/var/run/secrets/serving-cert/tls.key
  
# Delete the `vsphere-problem-detector-serving-cert` the vsphere-problem-detector-operator restart successfully
$ oc delete secret vsphere-problem-detector-serving-cert
secret "vsphere-problem-detector-serving-cert" deleted

$ oc get po -l name=vsphere-problem-detector-operator -w
NAME                                                 READY   STATUS    RESTARTS   AGE
vsphere-problem-detector-operator-66b86fb794-g58j2   1/1     Running   0          58m
vsphere-problem-detector-operator-64f54f67f-v9l4b    0/1     Pending   0          0s
vsphere-problem-detector-operator-64f54f67f-v9l4b    0/1     Pending   0          0s
vsphere-problem-detector-operator-64f54f67f-v9l4b    0/1     ContainerCreating   0          0s
vsphere-problem-detector-operator-64f54f67f-v9l4b    0/1     Terminating         0          0s
vsphere-problem-detector-operator-58d5d88ff9-rv5rz   0/1     Pending             0          0s
vsphere-problem-detector-operator-58d5d88ff9-rv5rz   0/1     Pending             0          0s
vsphere-problem-detector-operator-58d5d88ff9-rv5rz   0/1     ContainerCreating   0          1s
vsphere-problem-detector-operator-64f54f67f-v9l4b    0/1     Terminating         0          1s
vsphere-problem-detector-operator-64f54f67f-v9l4b    1/1     Terminating         0          2s
vsphere-problem-detector-operator-58d5d88ff9-rv5rz   0/1     ContainerCreating   0          3s
vsphere-problem-detector-operator-64f54f67f-v9l4b    0/1     Terminating         0          3s
vsphere-problem-detector-operator-58d5d88ff9-rv5rz   1/1     Running             0          3s
vsphere-problem-detector-operator-64f54f67f-v9l4b    0/1     Terminating         0          3s
vsphere-problem-detector-operator-64f54f67f-v9l4b    0/1     Terminating         0          3s
vsphere-problem-detector-operator-66b86fb794-g58j2   1/1     Terminating         0          59m
vsphere-problem-detector-operator-64f54f67f-v9l4b    0/1     Terminating         0          3s
vsphere-problem-detector-operator-66b86fb794-g58j2   0/1     Terminating         0          59m
vsphere-problem-detector-operator-66b86fb794-g58j2   0/1     Terminating         0          59m
vsphere-problem-detector-operator-66b86fb794-g58j2   0/1     Terminating         0          59m
vsphere-problem-detector-operator-66b86fb794-g58j2   0/1     Terminating         0          59m

$ oc get po -l name=vsphere-problem-detector-operator
NAME                                                 READY   STATUS    RESTARTS   AGE
vsphere-problem-detector-operator-58d5d88ff9-rv5rz   1/1     Running   0          16s

@Phaow

Phaow commented Sep 19, 2023

Copy link
Copy Markdown

/label qe-approved

@openshift-ci openshift-ci Bot added the qe-approved Signifies that QE has signed off on this PR label Sep 19, 2023
@openshift-merge-robot
openshift-merge-robot merged commit 736768a into openshift:master Sep 19, 2023
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. docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants