diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2016-02-28 16:32:38 -0500 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2016-03-03 09:05:42 -0500 |
commit | 7d561bd252a4ddc9e204f31144fbed7fecd99bff (patch) | |
tree | 372252fd59dfa4e1f576e54977375621858281d0 /playbooks/common/openshift-cluster/upgrades/files | |
parent | 6b25d27ca4ad9458688902d0c3e7c3a9c7b9c15d (diff) | |
download | openshift-7d561bd252a4ddc9e204f31144fbed7fecd99bff.tar.gz openshift-7d561bd252a4ddc9e204f31144fbed7fecd99bff.tar.bz2 openshift-7d561bd252a4ddc9e204f31144fbed7fecd99bff.tar.xz openshift-7d561bd252a4ddc9e204f31144fbed7fecd99bff.zip |
Correctly set the image tag for containerized installs (and upgrades)
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades/files')
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/files/ensure_system_units_have_version.sh | 3 | ||||
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/files/rpm_versions.sh | 20 |
2 files changed, 3 insertions, 20 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/files/ensure_system_units_have_version.sh b/playbooks/common/openshift-cluster/upgrades/files/ensure_system_units_have_version.sh index eb51ce6b2..239f43314 100644 --- a/playbooks/common/openshift-cluster/upgrades/files/ensure_system_units_have_version.sh +++ b/playbooks/common/openshift-cluster/upgrades/files/ensure_system_units_have_version.sh @@ -32,7 +32,7 @@ add_image_version_to_unit () { fi } -for unit_file in $(ls /etc/systemd/system/${SERVICE_TYPE}*.service | head -n1); do +for unit_file in $(ls /etc/systemd/system/${SERVICE_TYPE}*.service); do unit_name=$(basename -s .service ${unit_file}) add_image_version_to_sysconfig $VERSION $unit_name add_image_version_to_unit $DEPLOYMENT_TYPE $unit_file @@ -41,7 +41,6 @@ done if [ -e /etc/sysconfig/openvswitch ]; then add_image_version_to_sysconfig $VERSION openvswitch else - # TODO: add this to config.yml echo IMAGE_VERSION=${VERSION} > /etc/sysconfig/openvswitch fi if ! grep EnvironmentFile /etc/systemd/system/openvswitch.service > /dev/null; then diff --git a/playbooks/common/openshift-cluster/upgrades/files/rpm_versions.sh b/playbooks/common/openshift-cluster/upgrades/files/rpm_versions.sh index e06f7958f..a2a9579b5 100644 --- a/playbooks/common/openshift-cluster/upgrades/files/rpm_versions.sh +++ b/playbooks/common/openshift-cluster/upgrades/files/rpm_versions.sh @@ -1,23 +1,7 @@ #!/bin/bash -while getopts ":c" opt; do - case $opt in - c) - echo "-c was triggered!" >&2 - containerized="TRUE" - ;; - \?) - echo "Invalid option: -$OPTARG" >&2 - ;; - esac -done - -if [ "${containerized}" == "TRUE" ] ; then - docker exec atomic-openshift-master rpm -q atomic-openshift -else - installed=$(yum list installed -e 0 -q "$@" 2>&1 | tail -n +2 | awk '{ print $2 }' | sort -r | tr '\n' ' ') - available=$(yum list available -e 0 -q "$@" 2>&1 | tail -n +2 | grep -v 'el7ose' | awk '{ print $2 }' | sort -r | tr '\n' ' ') -fi +installed=$(yum list installed -e 0 -q "$@" 2>&1 | tail -n +2 | awk '{ print $2 }' | sort -r | tr '\n' ' ') +available=$(yum list available -e 0 -q "$@" 2>&1 | tail -n +2 | grep -v 'el7ose' | awk '{ print $2 }' | sort -r | tr '\n' ' ') echo "---" echo "curr_version: ${installed}" |