test: add canary test for encrypted osd in host-based clusters

It's better to test the creation of encrypted devices in host-based clusters.
This test will reduce the potential risks of regression when modifying
the osd-creation code.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
(cherry picked from commit 6b0f539f61)
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
This commit is contained in:
Satoru Takeuchi committed 2022-06-09 00:33:30 +00:00
1 parent dd1b3a0d19
commit e9a50d370a
3 files changed
+50 -3

No files matched your search

+47 -2
View File
@@ -340,7 +340,6 @@ jobs:
- name: use local disk as OSD
run: |
BLOCK=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1)
tests/scripts/github-action-helper.sh use_local_disk
tests/scripts/create-bluestore-partitions.sh --disk "$BLOCK" --wipe-only
@@ -374,6 +373,52 @@ jobs:
uses: mxschmitt/action-tmate@v3
timeout-minutes: 60
encryption:
runs-on: ubuntu-18.04
if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')"
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: setup cluster resources
uses: ./.github/workflows/setup-cluster-resources
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: validate-yaml
run: tests/scripts/github-action-helper.sh validate_yaml
- name: use local disk as OSD
run: |
BLOCK=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1)
tests/scripts/github-action-helper.sh use_local_disk
tests/scripts/create-bluestore-partitions.sh --disk "$BLOCK" --wipe-only
- name: deploy cluster
run: tests/scripts/github-action-helper.sh deploy_cluster encryptiton
- name: wait for prepare pod
run: tests/scripts/github-action-helper.sh wait_for_prepare_pod
- name: wait for ceph to be ready
run: tests/scripts/github-action-helper.sh wait_for_ceph_to_be_ready osd 1
- name: check-ownerreferences
run: tests/scripts/github-action-helper.sh check_ownerreferences
- name: collect common logs
if: always()
uses: ./.github/workflows/collect-logs
with:
name: canary
- name: setup tmate session for debugging when event is PR
if: failure() && github.event_name == 'pull_request'
uses: mxschmitt/action-tmate@v3
timeout-minutes: 60
pvc:
runs-on: ubuntu-18.04
if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')"
@@ -1211,7 +1256,7 @@ jobs:
fetch-depth: 0
- name: setup cluster resources
uses: ./.github/workflows/canary-test-config
uses: ./.github/workflows/setup-cluster-resources
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -50,7 +50,7 @@ kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.7
Ceph OSDs have a dependency on LVM in the following scenarios:
* OSDs are created on raw devices or partitions
* If encryption is enabled (`encryptedDevice: true` in the cluster CR)
* If encryption is enabled (`encryptedDevice: "true"` in the cluster CR)
* A `metadata` device is specified
LVM is not required for OSDs in these scenarios:
+2
View File
@@ -214,6 +214,8 @@ function deploy_cluster() {
sed -i "s|#deviceFilter:|deviceFilter: ${BLOCK/\/dev\/}\n config:\n osdsPerDevice: \"2\"|g" cluster-test.yaml
elif [ "$1" = "osd_with_metadata_device" ] ; then
sed -i "s|#deviceFilter:|deviceFilter: ${BLOCK/\/dev\/}\n config:\n metadataDevice: /dev/test-rook-vg/test-rook-lv|g" cluster-test.yaml
elif [ "$1" = "encryption" ] ; then
sed -i "s|#deviceFilter:|deviceFilter: ${BLOCK/\/dev\/}\n config:\n encryptedDevice: \"true\"|g" cluster-test.yaml
fi
kubectl create -f cluster-test.yaml
kubectl create -f object-test.yaml