From 2f23e5598ad6ddea2a535ba2532ae56a0709d7aa Mon Sep 17 00:00:00 2001 From: Christian Hudon Date: Fri, 29 Aug 2014 14:38:39 -0400 Subject: [PATCH 01/10] Fix typo --- bootstrap-salt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index b9dc2da..2bf0d4d 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2765,7 +2765,7 @@ __test_rhel_optionals_packages() { yum --config "${__YUM_CONF_FILE}" install -y ${package} --enablerepo=${_EPEL_REPO} >/dev/null 2>&1 fi if [ $? -ne 0 ]; then - echoerror "Failed to find an installable '${package}' package. The optional repository or it's subscription might be missing." + echoerror "Failed to find an installable '${package}' package. The optional repository or its subscription might be missing." rm -rf "${__YUM_CONF_DIR}" return 1 fi @@ -3822,7 +3822,7 @@ install_opensuse_stable_deps() { zypper --gpg-auto-import-keys --non-interactive refresh if [ $? -ne 0 ] && [ $? -ne 4 ]; then - # If the exit code is not 0, and it's not 4(failed to update a + # If the exit code is not 0, and it's not 4 (failed to update a # repository) return a failure. Otherwise continue. return 1 fi From 0632629223cc59ddf992e084175fe83372dbf108 Mon Sep 17 00:00:00 2001 From: Dag Viggo Lokoeen Date: Fri, 29 Aug 2014 12:32:53 -0700 Subject: [PATCH 02/10] Updated EPEL url for CentOS 7 to match the new EPEL release --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 2bf0d4d..5a08d75 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2483,7 +2483,7 @@ __install_epel_repository() { elif [ "$DISTRO_MAJOR_VERSION" -eq 6 ]; then rpm -Uvh --force "http://download.fedoraproject.org/pub/epel/6/${EPEL_ARCH}/epel-release-6-8.noarch.rpm" || return 1 elif [ "$DISTRO_MAJOR_VERSION" -eq 7 ]; then - rpm -Uvh --force "http://download.fedoraproject.org/pub/epel/beta/7/${EPEL_ARCH}/epel-release-7-0.2.noarch.rpm" || return 1 + rpm -Uvh --force "http://download.fedoraproject.org/pub/epel/7/${EPEL_ARCH}/epel-release-7-1.noarch.rpm" || return 1 else echoerror "Failed add EPEL repository support." return 1 From f01fb09e8adb64adbe637a73e965663a47de648d Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 23 Aug 2014 23:23:29 +0100 Subject: [PATCH 03/10] Include missing `salt-api` on cent post function --- bootstrap-salt.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 2bf0d4d..7901f2b 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2632,11 +2632,12 @@ install_centos_git() { } install_centos_git_post() { - for fname in master minion syndic; do + for fname in minion master minion api; do # Skip if not meant to be installed [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue + [ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue # While the RPM's use init.d, so will we. From 63bde1f970405f80e7689f066f0adda7734e8804 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 23 Aug 2014 23:28:09 +0100 Subject: [PATCH 04/10] Skip service checks for `salt-api` Since this should be an opt-in service not necessarily meant to start at boot time. Fixes #450 --- bootstrap-salt.sh | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 7901f2b..25f94ab 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1871,10 +1871,13 @@ install_ubuntu_restart_daemons() { install_ubuntu_check_services() { for fname in minion master syndic api; do + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + # Skip if not meant to be installed [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue - [ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue + #[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue if [ -f /sbin/initctl ] && [ -f /etc/init/salt-${fname}.conf ]; then __check_services_upstart salt-$fname || return 1 @@ -2314,10 +2317,13 @@ install_debian_restart_daemons() { install_debian_check_services() { for fname in minion master syndic api; do + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + # Skip if not meant to be installed [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue - [ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ ! -f "/etc/init.d/salt-$fname" ]) && continue + #[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ ! -f "/etc/init.d/salt-$fname" ]) && continue [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue __check_services_debian salt-$fname || return 1 done @@ -2441,10 +2447,13 @@ install_fedora_restart_daemons() { install_fedora_check_services() { for fname in minion master syndic api; do + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + # Skip if not meant to be installed [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue - [ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue + #[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue __check_services_systemd salt-$fname || return 1 done @@ -2719,10 +2728,13 @@ install_centos_testing_post() { install_centos_check_services() { for fname in minion master syndic api; do + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + # Skip if not meant to be installed [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue - [ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue + #[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue if [ -f /sbin/initctl ] && [ -f /etc/init/salt-${fname}.conf ]; then __check_services_upstart salt-$fname || return 1 @@ -3410,10 +3422,13 @@ install_arch_check_services() { fi for fname in minion master syndic api; do + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + # Skip if not meant to be installed [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue - [ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue + #[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue __check_services_systemd salt-$fname || return 1 done @@ -3968,10 +3983,13 @@ install_opensuse_check_services() { fi for fname in minion master syndic api; do + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + # Skip if not meant to be installed [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue - [ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue + #[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue __check_services_systemd salt-$fname > /dev/null 2>&1 || __check_services_systemd salt-$fname.service > /dev/null 2>&1 || return 1 done @@ -4153,10 +4171,13 @@ install_suse_check_services() { fi for fname in minion master syndic api; do + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + # Skip if not meant to be installed [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue - [ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue + #[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue __check_services_systemd salt-$fname || return 1 done @@ -4295,10 +4316,13 @@ install_gentoo_check_services() { fi for fname in minion master syndic api; do + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + # Skip if not meant to be installed [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue - [ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue + #[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue __check_services_systemd salt-$fname || return 1 done From fedaac365de1abf176cfda8aee0f3f8af1d81587 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 23 Aug 2014 23:32:03 +0100 Subject: [PATCH 05/10] Update changes log --- ChangeLog | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8501f7b..1e4b31a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Version 2014.xx.xx: + * Skip service checks for `salt-api`, since this should be an opt-in service not necessarily + meant to start at boot time. + * Distro Support Fixes: + * Also install the salt-api service on RHEL based distributions for git based + installations. + + Version 2014.08.23: * Avoid redirect breakage when installing EPEL with rpm on RHEL 5 * Ensure python-apt is installed by the bootstrap script for Debian & Ubuntu minions. Thanks @@ -15,7 +23,6 @@ Version 2014.08.23: running which ended up causing a most stubborn bug that's documented in https://github.com/saltstack/salt/issues/12248 - Version 2014.07.29: * Shallow clone Salt's repository for speed improvements. In case of failure, resume old behaviour. From cd3a2f2bc9a4e174eec2de59cd72554155450c1d Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 29 Aug 2014 20:24:40 +0100 Subject: [PATCH 06/10] Properly detect Arch Linux when lsb-release is available --- bootstrap-salt.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 25f94ab..53274d6 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -702,6 +702,9 @@ __gather_linux_system_info() { DISTRO_NAME="Oracle Linux" elif [ "${DISTRO_NAME}" = "AmazonAMI" ]; then DISTRO_NAME="Amazon Linux AMI" + elif [ "${DISTRO_NAME}" = "Arch" ]; then + DISTRO_NAME="Arch Linux" + return fi rv=$(lsb_release -sr) [ "${rv}" != "" ] && DISTRO_VERSION=$(__parse_version_string "$rv") From 6ce9c120b3d65c10ae31d63e1ed8e9dbc6584a0e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 29 Aug 2014 20:42:54 +0100 Subject: [PATCH 07/10] Update changes log --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 1e4b31a..9ebdf78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ Version 2014.xx.xx: * Distro Support Fixes: * Also install the salt-api service on RHEL based distributions for git based installations. + * Properly detect Arch Linux when lsb-release is available Version 2014.08.23: From 0f70da350bc44cc1f4ea8cf050426114ba480b2a Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 29 Aug 2014 21:05:15 +0100 Subject: [PATCH 08/10] Update changes log --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 9ebdf78..9dd3d93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ Version 2014.xx.xx: * Also install the salt-api service on RHEL based distributions for git based installations. * Properly detect Arch Linux when lsb-release is available + * Updated the URL for EPEL 7 Version 2014.08.23: From e47c491c9bd464ef6a957b54d8d6ee43727aa965 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 29 Aug 2014 21:05:44 +0100 Subject: [PATCH 09/10] =?UTF-8?q?Add=20Dag=20Viggo=20Lok=C3=B8en(@dagvl)?= =?UTF-8?q?=20to=20AUTHORS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index cf7ede4..49f35ed 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -14,6 +14,7 @@ Boris Feld Lothiraldan bruce-one bruce-one Chris Rebert cvrebert chris.rebert@hulu.com Christer Edwards cedwards +Dag Viggo Lokøen dagvl dag.viggo@lokoen.org Dan Mick dmick dan.mick@inktank.com deployboy deployboy Diego Woitasen diegows diego.woitasen@vhgroup.net From 187ad5c300cc0b6ee4604e53dc6cd29b839a52e1 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 30 Aug 2014 14:28:32 +0100 Subject: [PATCH 10/10] Bump version for stable release --- ChangeLog | 3 +-- bootstrap-salt.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9dd3d93..f11da30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -Version 2014.xx.xx: +Version 2014.08.30: * Skip service checks for `salt-api`, since this should be an opt-in service not necessarily meant to start at boot time. * Distro Support Fixes: @@ -7,7 +7,6 @@ Version 2014.xx.xx: * Properly detect Arch Linux when lsb-release is available * Updated the URL for EPEL 7 - Version 2014.08.23: * Avoid redirect breakage when installing EPEL with rpm on RHEL 5 * Ensure python-apt is installed by the bootstrap script for Debian & Ubuntu minions. Thanks diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 44139bc..21df066 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -17,7 +17,7 @@ # CREATED: 10/15/2012 09:49:37 PM WEST #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2014.08.23" +__ScriptVersion="2014.08.30" __ScriptName="bootstrap-salt.sh" #======================================================================================================================