Skip to content

Commit

Permalink
Fix CSI tests (#2712)
Browse files Browse the repository at this point in the history
  • Loading branch information
kayrus authored Nov 13, 2024
1 parent 16c269a commit 0d32a98
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
19 changes: 17 additions & 2 deletions tests/playbooks/roles/install-csi-cinder/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
cmd: |
kubectl -n kube-system get secret cloud-config >/dev/null 2>&1
if [ $? -eq 0 ]; then
exit 0
kubectl -n kube-system get secrets cloud-config -o json | jq -r '.data."cloud.conf"' | base64 -d
# replacing a cloud-config, created by the OCCM role
kubectl -n kube-system delete secret cloud-config
fi
set -ex
Expand All @@ -43,9 +45,12 @@
tenant-id=$tenant_id
domain-id=default
[LoadBalancer]
enabled=false
EOF
kubectl create secret -n kube-system generic cloud-config --from-file={{ ansible_user_dir }}/cloud.conf
kubectl -n kube-system get secrets cloud-config -o json | jq -r '.data."cloud.conf"' | base64 -d
- name: Replace manifests
shell:
Expand Down Expand Up @@ -139,11 +144,21 @@
set -x
set -e
mkdir -p /var/log/csi-pod
kubectl logs deployment/csi-cinder-controllerplugin -n kube-system -c cinder-csi-plugin
kubectl logs daemonset/csi-cinder-nodeplugin -n kube-system -c cinder-csi-plugin
kubectl logs deployment/csi-cinder-controllerplugin -n kube-system -c cinder-csi-plugin > /var/log/csi-pod/csi-cinder-controllerplugin.log
kubectl logs daemonset/csi-cinder-nodeplugin -n kube-system -c cinder-csi-plugin > /var/log/csi-pod/csi-cinder-nodeplugin.log
kubectl logs daemonset/csi-cinder-nodeplugin -n kube-system -c cinder-csi-plugin > /var/log/csi-pod/csi-cinder-nodeplugin.log
- name: Show openstack-cloud-controller-manager pod logs
shell:
executable: /bin/bash
cmd: |
kubectl -n kube-system logs ds/openstack-cloud-controller-manager
kubectl -n kube-system logs ds/openstack-cloud-controller-manager > /var/log/csi-pod/occm.log
- name: &failmsg Stop due to prior failure of csi-cinder-plugin
fail:
msg: *failmsg
Expand Down
14 changes: 13 additions & 1 deletion tests/playbooks/roles/install-csi-manila/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
cmd: |
kubectl -n kube-system get secret cloud-config >/dev/null 2>&1
if [ $? -eq 0 ]; then
exit 0
kubectl -n kube-system get secrets cloud-config -o json | jq -r '.data."cloud.conf"' | base64 -d
# replacing a cloud-config, created by the OCCM role
kubectl -n kube-system delete secret cloud-config
fi
set -ex
Expand All @@ -42,9 +44,13 @@
region=${OS_REGION_NAME}
tenant-id=$tenant_id
domain-id=default
[LoadBalancer]
enabled=false
EOF
kubectl create secret -n kube-system generic cloud-config --from-file={{ ansible_user_dir }}/cloud.conf
kubectl -n kube-system get secrets cloud-config -o json | jq -r '.data."cloud.conf"' | base64 -d
- name: Deploy Kubernetes VolumeSnapshot CRDs and snapshot controller
shell:
Expand Down Expand Up @@ -171,6 +177,12 @@
register: describe_csi
changed_when: false

- name: Show openstack-cloud-controller-manager pod logs
shell:
executable: /bin/bash
cmd: |
kubectl -n kube-system logs ds/openstack-cloud-controller-manager
- name: Log failed manila-csi-plugin deployment
debug:
var: describe_csi.stdout_lines
Expand Down

0 comments on commit 0d32a98

Please sign in to comment.