diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 82e54bc8..17d12b68 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -7,26 +7,6 @@ env: # Mount the docker.sock as to the docker container, so that we are able to # run docker build command and kind is spawned as a sibling container. steps: - - name: "Upgrade Test" - command: - - apk add g++ make bash gcompat curl mysql mysql-client libc6-compat - - wget https://golang.org/dl/$GO_VERSION_FILE - - tar -C /usr/local -xzf $GO_VERSION_FILE - - export PATH=$PATH:/usr/local/go/bin:/bin - - rm $GO_VERSION_FILE - - ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 - - make upgrade-test - concurrency: 1 - concurrency_group: 'vtop/upgrade-downgrade-test' - timeout_in_minutes: 60 - plugins: - - docker#v3.12.0: - image: "docker:latest" - propagate-environment: true - propagate-uid-gid: true - volumes: - - "/var/run/docker.sock:/var/run/docker.sock" - - name: "Backup Restore Test" command: - apk add g++ make bash gcompat curl mysql mysql-client libc6-compat @@ -35,7 +15,6 @@ steps: - export PATH=$PATH:/usr/local/go/bin:/bin - rm $GO_VERSION_FILE - ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 - - make backup-restore-test concurrency: 1 concurrency_group: 'vtop/backup-restore-test' timeout_in_minutes: 60 @@ -43,86 +22,5 @@ steps: - docker#v3.12.0: image: "docker:latest" propagate-environment: true - propagate-uid-gid: true - volumes: - - "/var/run/docker.sock:/var/run/docker.sock" - - - name: "Backup Schedule Test" - command: - - apk add g++ make bash gcompat curl mysql mysql-client libc6-compat - - wget https://golang.org/dl/$GO_VERSION_FILE - - tar -C /usr/local -xzf $GO_VERSION_FILE - - export PATH=$PATH:/usr/local/go/bin:/bin - - rm $GO_VERSION_FILE - - ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 - - make backup-schedule-test - concurrency: 1 - concurrency_group: 'vtop/backup-schedule-test' - timeout_in_minutes: 60 - plugins: - - docker#v3.12.0: - image: "docker:latest" - propagate-environment: true - propagate-uid-gid: true - volumes: - - "/var/run/docker.sock:/var/run/docker.sock" - - - name: "VTOrc and VTAdmin Test" - command: - - apk add g++ make bash gcompat curl mysql mysql-client libc6-compat chromium - - wget https://golang.org/dl/$GO_VERSION_FILE - - tar -C /usr/local -xzf $GO_VERSION_FILE - - export PATH=$PATH:/usr/local/go/bin:/bin - - rm $GO_VERSION_FILE - - ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 - - make vtorc-vtadmin-test - concurrency: 1 - concurrency_group: 'vtop/vtorc-vtadmin-test' - timeout_in_minutes: 60 - plugins: - - docker#v3.12.0: - image: "docker:latest" - propagate-environment: true - propagate-uid-gid: true - volumes: - - "/var/run/docker.sock:/var/run/docker.sock" - - - name: "Unmanaged Tablet Test" - command: - - apk add g++ make bash gcompat curl mysql mysql-client libc6-compat chromium coreutils - - wget https://golang.org/dl/$GO_VERSION_FILE - - tar -C /usr/local -xzf $GO_VERSION_FILE - - export PATH=$PATH:/usr/local/go/bin:/bin - - rm $GO_VERSION_FILE - - ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 - - make unmanaged-tablet-test - concurrency: 1 - concurrency_group: 'vtop/unmanaged-tablet-test' - timeout_in_minutes: 60 - plugins: - - docker#v3.12.0: - image: "docker:latest" - propagate-environment: true - propagate-uid-gid: true - volumes: - - "/var/run/docker.sock:/var/run/docker.sock" - - - name: "HPA Test" - command: - - apk add g++ make bash gcompat curl mysql mysql-client libc6-compat - - wget https://golang.org/dl/$GO_VERSION_FILE - - tar -C /usr/local -xzf $GO_VERSION_FILE - - export PATH=$PATH:/usr/local/go/bin:/bin - - rm $GO_VERSION_FILE - - ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 - - make hpa-test - concurrency: 1 - concurrency_group: 'vtop/hpa-test' - timeout_in_minutes: 60 - plugins: - - docker#v3.12.0: - image: "docker:latest" - propagate-environment: true - propagate-uid-gid: true volumes: - "/var/run/docker.sock:/var/run/docker.sock" diff --git a/test/endtoend/backup_restore_test.sh b/test/endtoend/backup_restore_test.sh index c85ccd33..edbeb058 100755 --- a/test/endtoend/backup_restore_test.sh +++ b/test/endtoend/backup_restore_test.sh @@ -93,7 +93,7 @@ function setupKindConfig() { # Test setup STARTING_DIR="$PWD" echo "Make temporary directory for the test" -mkdir -p -m 777 ./vtdataroot/backup +mkdir -p -m 770 ./vtdataroot/backup echo "Building the docker image" docker build -f build/Dockerfile.release -t vitess-operator-pr:latest . echo "Setting up the kind config" diff --git a/test/endtoend/utils.sh b/test/endtoend/utils.sh index bf685730..c2d9185a 100644 --- a/test/endtoend/utils.sh +++ b/test/endtoend/utils.sh @@ -91,23 +91,22 @@ function takeBackup() { # issue the backupShard command to vtctldclient vtctldclient BackupShard "$keyspaceShard" - for i in {1..600} ; do - out=$(kubectl get vtb --no-headers | wc -l) - echo "$out" | grep "$finalBackupCount" > /dev/null 2>&1 - if [[ $? -eq 0 ]]; then - echo "Backup created" - return 0 - fi - sleep 3 - done - echo -e "ERROR: Backup not created - $out. $backupCount backups expected." - exit 1 + if [[ $? -ne 0 ]]; then + echo "Backup failed" + exit 1 + fi + chown -R 1001:1001 /vt/backups + echo "Backup completed" } function verifyListBackupsOutput() { - backupCount=$(kubectl get vtb --no-headers | wc -l) - for i in {1..600} ; do - out=$(vtctldclient LegacyVtctlCommand -- ListBackups "$keyspaceShard" | wc -l) + echo "UID info: $(id)" + echo "GetBackups output: $(vtctldclient GetBackups "$keyspaceShard")" + for i in {1..10} ; do + backupCount=$(kubectl get vtb --no-headers | wc -l) + echo "Kubectl backup count is ${backupCount}" + out=$(vtctldclient GetBackups "$keyspaceShard" | wc -l) + echo "vtctldclient backup count is ${out}" echo "$out" | grep "$backupCount" > /dev/null 2>&1 if [[ $? -eq 0 ]]; then echo "ListBackupsOutputCorrect" @@ -115,7 +114,7 @@ function verifyListBackupsOutput() { fi sleep 3 done - echo -e "ERROR: ListBackups output not correct - $out. $backupCount backups expected." + echo -e "ERROR: GetBackups output not correct - $out. $backupCount backups expected." exit 1 }