diff --git a/Dockerfile b/Dockerfile index 34a426459d09bfc42fe78bb959a13842d07e862f..d7ffb2a36a11cd70b4745d1fe58e762fa85f1e1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,14 +6,15 @@ LABEL maintainer="Drupal Admins <drupal-admins@cern.ch>" # TODO: Download the binary for restic install, instead of using copart/restic repo ARG restic_version=0.12.1 -RUN yum install epel-release -y && \ +RUN yum update -y && \ + yum install epel-release -y && \ # install restic yum install yum-plugin-copr -y && \ yum copr enable copart/restic -y && \ yum install restic-${restic_version} -y && \ # we need this to interact with manila OpenStack to get CephFS information - yum install centos-release-openstack-train -y && \ - yum install -y /usr/bin/openstack --disableplugin=protectbase && \ + yum install centos-release-openstack-xena -y && \ + yum install -y /usr/bin/openstack python3-requests-kerberos && \ yum clean all COPY ./tekton-task-templates /tekton-task-templates diff --git a/chart/drupal-operations/templates/drupalsite-backup.yaml b/chart/drupal-operations/templates/drupalsite-backup.yaml index 964d32a393cc3b6f4534201e493123bbb2a00842..855da4a660e8a4a8f8dabcfd1d500784392f2a03 100644 --- a/chart/drupal-operations/templates/drupalsite-backup.yaml +++ b/chart/drupal-operations/templates/drupalsite-backup.yaml @@ -38,6 +38,6 @@ spec: export PROJECT_HASH=$(printf '%s' "$NAMESPACE" | md5sum | awk '{print $1}') export VELERO_NAMESPACE={{ .Values.veleroNamespace }} envsubst < /tekton-task-templates/backup_resource.yaml | oc create -f - - timeout 120s sh -c -- 'while [ $(oc get backup/$RESOURCE_NAME -n $VELERO_NAMESPACE -o jsonpath='{.status.phase}') != "Completed" ]; do printf "Backup in progress\n"; sleep 2s; done' + timeout 120s sh -c -- 'while [[ $(oc get "backup/$RESOURCE_NAME" -n "$VELERO_NAMESPACE" -o jsonpath='{.status.phase}') != "Completed" ]]; do printf "Backup in progress\n"; sleep 2s; done' backupStatus=$(oc get backup/$RESOURCE_NAME -n $VELERO_NAMESPACE -o=jsonpath='{.status.phase}' | grep -i -E 'failed|completed|partiallyfailed' || echo "Failed") echo "DrupalSite backup status: $backupStatus"