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

util: allow configuring VAULT_AUTH_MOUNT_PATH for Vault Tenant SA KMS #2322

Merged
merged 1 commit into from
Aug 5, 2021

Conversation

nixpanic
Copy link
Member

The VAULT_AUTH_MOUNT_PATH is a Vault configuration parameter that allows
a user to set a non default path for the Kubernetes ServiceAccount
integration. This can already be configured for the Vault KMS, and is
now added to the Vault Tenant SA KMS as well.


Show available bot commands

These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:

  • /retest ci/centos/<job-name>: retest the <job-name> after unrelated
    failure (please report the failure too!)
  • /retest all: run this in case the CentOS CI failed to start/report any test
    progress or results

Madhu-1
Madhu-1 previously approved these changes Jul 26, 2021
@Madhu-1
Copy link
Collaborator

Madhu-1 commented Jul 26, 2021

code = InvalidArgument desc = invalid encryption kms configuration: failed creating new Vault Secrets: Error making API request.
URL: PUT http://vault.cephcsi-e2e-2fdab8bd.svc.cluster.local:8200/v1/auth/v1/auth/kubernetes/login/login
Code: 400. Errors:

  • missing client token

@nixpanic CI is failing PTAL.

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Jul 26, 2021

@nixpanic nixpanic force-pushed the rbd/encryption/VAULT_AUTH_MOUNT_PATH branch from 1d75a24 to 20fbe95 Compare July 26, 2021 12:28
@mergify mergify bot dismissed Madhu-1’s stale review July 26, 2021 12:29

Pull request has been modified.

@nixpanic
Copy link
Member Author

/retest ci/centos/mini-e2e-helm/k8s-1.19

@nixpanic
Copy link
Member Author

/retest ci/centos/mini-e2e/k8s-1.20

@nixpanic
Copy link
Member Author

/retest ci/centos/mini-e2e-helm/k8s-1.19

New etcdserver timeout related error (logs):

Jul 26 14:17:53.181: INFO: waiting for PVC rbd-80810 (112 seconds elapsed)
Jul 26 14:18:00.773: INFO: Error getting pvc "rbd-80810" in namespace "rbd-8081": etcdserver: request timed out
Jul 26 14:18:01.182: INFO: waiting for PVC rbd-80810 (120 seconds elapsed)
Jul 26 14:18:01.711: INFO: Error getting pvc "rbd-80810" in namespace "rbd-8081": rpc error: code = Unavailable desc = transport is closing
Jul 26 14:18:01.711: INFO: failed to create PVC (rbd-80810): failed to get pvc: rpc error: code = Unavailable desc = transport is closing
Jul 26 14:18:01.711: FAIL: creating PVCs failed, 1 errors were logged

@nixpanic
Copy link
Member Author

/retest ci/centos/mini-e2e/k8s-1.20

Failed to deploy CephFS RBAC (logs):

Jul 26 13:54:42.766: INFO: Running '/usr/bin/kubectl --server=https://192.168.39.187:8443 --kubeconfig=/root/.kube/config --namespace=cephcsi-e2e-ea434921 create --namespace=cephcsi-e2e-ea434921 -f -'
Jul 26 13:55:04.448: INFO: rc: 1
Jul 26 13:55:04.448: FAIL: failed to create CephFS provisioner rbac with error error running /usr/bin/kubectl --server=https://192.168.39.187:8443 --kubeconfig=/root/.kube/config --namespace=cephcsi-e2e-ea434921 create --namespace=cephcsi-e2e-ea434921 -f -:
Command stdout:
role.rbac.authorization.k8s.io/cephfs-external-provisioner-cfg created
rolebinding.rbac.authorization.k8s.io/cephfs-csi-provisioner-role-cfg created

stderr:
Error from server: error when creating "STDIN": etcdserver: request timed out
Error from server: error when creating "STDIN": etcdserver: request timed out
Error from server: error when creating "STDIN": etcdserver: request timed out

error:
exit status 1

@nixpanic nixpanic requested a review from Madhu-1 July 26, 2021 15:34
@nixpanic nixpanic requested a review from humblec July 27, 2021 07:11
@nixpanic nixpanic added backport-to-release-v3.4 component/rbd Issues related to RBD component/util Utility functions shared between CephFS and RBD labels Aug 2, 2021
@nixpanic nixpanic force-pushed the rbd/encryption/VAULT_AUTH_MOUNT_PATH branch from 20fbe95 to 2225381 Compare August 3, 2021 08:13
@nixpanic
Copy link
Member Author

nixpanic commented Aug 3, 2021

/retest ci/centos/mini-e2e

@nixpanic
Copy link
Member Author

nixpanic commented Aug 3, 2021

/retest ci/centos/mini-e2e-helm

@nixpanic
Copy link
Member Author

nixpanic commented Aug 3, 2021

@Mergifyio rebase

Required for change in CentOS image used by e2e #2349

@nixpanic nixpanic force-pushed the rbd/encryption/VAULT_AUTH_MOUNT_PATH branch from 2225381 to e8d7742 Compare August 3, 2021 13:09
@mergify
Copy link
Contributor

mergify bot commented Aug 3, 2021

Command rebase: success

Branch has been successfully rebased

@nixpanic
Copy link
Member Author

nixpanic commented Aug 3, 2021

/retest ci/centos/mini-e2e-helm/k8s-1.21

@nixpanic
Copy link
Member Author

nixpanic commented Aug 3, 2021

/retest ci/centos/mini-e2e-helm/k8s-1.21

Failed due to etcdserver timeout (logs):

Aug  3 15:47:04.927: INFO: waiting for PVC raw-block-pvc (0 seconds elapsed)
Aug  3 15:47:11.936: INFO: Error getting pvc in namespace: '': etcdserver: request timed out
Aug  3 15:47:13.937: INFO: waiting for PVC  (9 seconds elapsed)
Aug  3 15:47:13.937: INFO: Error getting pvc in namespace: '': an empty namespace may not be set when a resource name is provided
Aug  3 15:47:13.937: FAIL: validating thick-provisioning failed: failed to expand PVC: failed to get pvc: an empty namespace may not be set when a resource name is provided

@nixpanic
Copy link
Member Author

nixpanic commented Aug 3, 2021

/retest ci/centos/mini-e2e-helm/k8s-1.19

@nixpanic
Copy link
Member Author

nixpanic commented Aug 4, 2021

@Mergifyio rebase

@nixpanic nixpanic force-pushed the rbd/encryption/VAULT_AUTH_MOUNT_PATH branch from 2c4dced to c22d034 Compare August 4, 2021 06:07
@mergify
Copy link
Contributor

mergify bot commented Aug 4, 2021

Command rebase: success

Branch has been successfully rebased

@mergify mergify bot closed this in #2354 Aug 4, 2021
@nixpanic
Copy link
Member Author

nixpanic commented Aug 4, 2021

This should not have been closed 😞

@nixpanic nixpanic reopened this Aug 4, 2021
@nixpanic
Copy link
Member Author

nixpanic commented Aug 4, 2021

/retest ci/centos/mini-e2e/k8s-1.21

@nixpanic
Copy link
Member Author

nixpanic commented Aug 4, 2021

/retest ci/centos/mini-e2e/k8s-1.21

e2e failed to deploy rbd component (logs):

Aug  4 10:46:40.250: INFO: Running '/usr/bin/kubectl --server=https://192.168.39.12:8443 --kubeconfig=/root/.kube/config --namespace=cephcsi-e2e-212c5ecc create -f -'
Aug  4 10:46:47.691: INFO: rc: 1
Aug  4 10:46:49.691: INFO: Running '/usr/bin/kubectl --server=https://192.168.39.12:8443 --kubeconfig=/root/.kube/config --namespace=cephcsi-e2e-212c5ecc create -f -'
Aug  4 10:46:50.116: INFO: rc: 1
Aug  4 10:46:50.117: INFO: will run kubectl (create) again (9 seconds elapsed)
Aug  4 10:46:50.117: FAIL: failed to create vault statefulset failed to run kubectl: error running /usr/bin/kubectl --server=https://192.168.39.12:8443 --kubeconfig=/root/.kube/config --namespace=cephcsi-e2e-212c5ecc create -f -:
Command stdout:

stderr:
Error from server (AlreadyExists): error when creating "STDIN": serviceaccounts "rbd-csi-vault-token-review" already exists
Error from server (AlreadyExists): error when creating "STDIN": clusterroles.rbac.authorization.k8s.io "rbd-csi-vault-token-review" already exists
Error from server (AlreadyExists): error when creating "STDIN": clusterrolebindings.rbac.authorization.k8s.io "rbd-csi-vault-token-review" already exists

error:
exit status 1

Should get fixed with #2329

@nixpanic
Copy link
Member Author

nixpanic commented Aug 4, 2021

/retest ci/centos/mini-e2e-helm/k8s-1.22

@nixpanic
Copy link
Member Author

nixpanic commented Aug 4, 2021

/retest ci/centos/mini-e2e-helm/k8s-1.22

resizing cephfs volume failed (logs):

Aug  4 11:56:29.209: INFO: current size in status {{1073741824 0} {<nil>} 1Gi BinarySI},expected size {{10737418240 0} {<nil>} 10Gi BinarySI}
Aug  4 11:56:29.209: INFO: waiting for PVC csi-cephfs-pvc (600 seconds elapsed)
Aug  4 11:56:29.212: INFO: current size in status {{1073741824 0} {<nil>} 1Gi BinarySI},expected size {{10737418240 0} {<nil>} 10Gi BinarySI}
Aug  4 11:56:29.212: FAIL: failed to resize PVC with error timed out waiting for the condition

@nixpanic
Copy link
Member Author

nixpanic commented Aug 4, 2021

/retest ci/centos/mini-e2e/k8s-1.21

@nixpanic
Copy link
Member Author

nixpanic commented Aug 4, 2021

/retest ci/centos/mini-e2e/k8s-1.21

@nixpanic
Copy link
Member Author

nixpanic commented Aug 4, 2021

@Mergifyio rebase

More PRs got merged, lets restart CI jobs

The VAULT_AUTH_MOUNT_PATH is a Vault configuration parameter that allows
a user to set a non default path for the Kubernetes ServiceAccount
integration. This can already be configured for the Vault KMS, and is
now added to the Vault Tenant SA KMS as well.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
@nixpanic nixpanic force-pushed the rbd/encryption/VAULT_AUTH_MOUNT_PATH branch from ddac0f3 to fa37ae8 Compare August 4, 2021 18:51
@mergify
Copy link
Contributor

mergify bot commented Aug 4, 2021

Command rebase: success

Branch has been successfully rebased

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Aug 5, 2021

/test ci/centos/mini-e2e/k8s-1.21

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Aug 5, 2021

/test ci/centos/mini-e2e/k8s-1.21

`Aug 4 20:23:22.683: INFO: >>> kubeConfig: /root/.kube/config
Aug 4 20:23:23.708: INFO: stdErr occurred: /bin/sh: 1: cannot create /var/lib/www/html/test: Read-only file system

Aug 4 20:23:23.708: FAIL: failed to write IO, err: command terminated with exit code 2, stdErr: /bin/sh: 1: cannot create /var/lib/www/html/test: Read-only file system
`
https://jenkins-ceph-csi.apps.ocp.ci.centos.org/blue/rest/organizations/jenkins/pipelines/mini-e2e_k8s-1.21/runs/624/nodes/87/steps/90/log/?start=0

@pkalever
Copy link

pkalever commented Aug 5, 2021

/test ci/centos/mini-e2e/k8s-1.21

`Aug 4 20:23:22.683: INFO: >>> kubeConfig: /root/.kube/config
Aug 4 20:23:23.708: INFO: stdErr occurred: /bin/sh: 1: cannot create /var/lib/www/html/test: Read-only file system

Aug 4 20:23:23.708: FAIL: failed to write IO, err: command terminated with exit code 2, stdErr: /bin/sh: 1: cannot create /var/lib/www/html/test: Read-only file system
`
https://jenkins-ceph-csi.apps.ocp.ci.centos.org/blue/rest/organizations/jenkins/pipelines/mini-e2e_k8s-1.21/runs/624/nodes/87/steps/90/log/?start=0

Cool!! good catch ceph-csi CI :-)

Looking into this now. And thanks for reporting this @Madhu-1 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/rbd Issues related to RBD component/util Utility functions shared between CephFS and RBD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants