From a71b938942cb3369dac504c1fac7fae73fadc21d Mon Sep 17 00:00:00 2001 From: Pedro Paulo Vezza Campos Date: Tue, 2 Sep 2014 09:37:31 -0300 Subject: [PATCH 01/11] Fixing EPEL7 url after 404 --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 21df06619..d7d266ef6 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2495,7 +2495,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/7/${EPEL_ARCH}/epel-release-7-1.noarch.rpm" || return 1 + rpm -Uvh --force "http://download.fedoraproject.org/pub/epel/7/${EPEL_ARCH}/e/epel-release-7-1.noarch.rpm" || return 1 else echoerror "Failed add EPEL repository support." return 1 From 4f5eb17d0545a71fd152b92d581177f7a5b824dd Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sun, 7 Sep 2014 01:55:33 +0100 Subject: [PATCH 02/11] Add Pedro Paulo(@pedropaulovc) to AUTHORS --- AUTHORS.rst | 1 + bootstrap-salt.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 49f35ed44..af5115c9d 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -41,6 +41,7 @@ nevins-b nevins-b Niels Abspoel aboe76 Paul Brian lifeisstillgood paul@mikadosoftware.com Pedro Algarvio s0undt3ch pedro@algarvio.me +Pedro Paulo pedropaulovc Raymond Barbiero visualphoenix Roberto Aguilar rca roberto@baremetal.io Tate Eskew tateeskew diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index d7d266ef6..49d55fd25 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1693,7 +1693,7 @@ install_ubuntu_deps() { __PIP_PACKAGES="" else check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package 'requests'" - __apt_get_install_noinput python-pip + __apt_get_install_noinput python-setuptools python-pip __PIP_PACKAGES="requests" pip install requests fi From ab53b5ca08fa39e67595dead8274d8fdfd0c5628 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sun, 7 Sep 2014 01:57:37 +0100 Subject: [PATCH 03/11] Update changes log --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index f11da3041..60076eaec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Version 2014.xx.xx: + * Distro Support Fixes: + * Updated the URL for EPEL 7 + * PIP based installations on Ubuntu 10.04 need setuptools installed + 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. From 5b1e5b45cf32bdc60dffc01dc798320499e03e14 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sun, 7 Sep 2014 03:51:16 +0100 Subject: [PATCH 04/11] Arch stopped providing the version information on `/etc/arch-release` Fixes #457 --- bootstrap-salt.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 49d55fd25..842ade954 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -731,10 +731,11 @@ __gather_linux_system_info() { [ ! -f "/etc/${rsource}" ] && continue # Does not exist n=$(echo "${rsource}" | sed -e 's/[_-]release$//' -e 's/[_-]version$//') + shortname=$(echo "${n}" | tr '[:upper:]' '[:lower:]') rv=$( (grep VERSION "/etc/${rsource}"; cat "/etc/${rsource}") | grep '[0-9]' | sed -e 'q' ) - [ "${rv}" = "" ] && continue # There's no version information. Continue to next rsource + [ "${rv}" = "" ] && [ "$shortname" != "arch" ] && continue # There's no version information. Continue to next rsource v=$(__parse_version_string "$rv") - case $(echo "${n}" | tr '[:upper:]' '[:lower:]') in + case $shortname in redhat ) if [ "$(egrep 'CentOS' /etc/${rsource})" != "" ]; then n="CentOS" From ce80fbc7a87c13d8e0b0aae58d10f309b4cb0813 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sun, 7 Sep 2014 03:52:30 +0100 Subject: [PATCH 05/11] Update changes log --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 60076eaec..64d09fe73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ Version 2014.xx.xx: * Distro Support Fixes: * Updated the URL for EPEL 7 * PIP based installations on Ubuntu 10.04 need setuptools installed + * Arch stopped providing the version information on `/etc/arch-release` Version 2014.08.30: * Skip service checks for `salt-api`, since this should be an opt-in service not necessarily From 3ce46506e0851cc969d72011f0d62b92331f7a84 Mon Sep 17 00:00:00 2001 From: Skyler Berg Date: Sun, 7 Sep 2014 17:23:53 -0700 Subject: [PATCH 06/11] Fix typo in environment variable comment --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 842ade954..ecfd74141 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -31,7 +31,7 @@ __ScriptName="bootstrap-salt.sh" # * BS_FORCE_OVERWRITE: Force overriding copied files(config, init.d, etc) # * BS_UPGRADE_SYS: If 1 and an option, upgrade system. Default 0. # * BS_GENTOO_USE_BINHOST: If 1 add `--getbinpkg` to gentoo's emerge -# * BS__SALT_MASTER_ADDRESS: The IP or DNS name of the salt-master the minion should connect to +# * BS_SALT_MASTER_ADDRESS: The IP or DNS name of the salt-master the minion should connect to # * BS_SALT_GIT_CHECKOUT_DIR: The directory where to clone Salt on git installations #====================================================================================================================== From 3b36eff3afcbfe44abc44ccd3c4ab1b0c5fc0bdd Mon Sep 17 00:00:00 2001 From: mattmb Date: Mon, 8 Sep 2014 16:30:13 +0100 Subject: [PATCH 07/11] Don't check api is running, breaks deployment --- bootstrap-salt.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index ecfd74141..a324f38fb 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4468,7 +4468,8 @@ daemons_running() { # 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 = "api" ] && continue [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue # shellcheck disable=SC2009 From 91af839814b0d0a56c71a9efb3c576a0a2098931 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 9 Sep 2014 20:29:46 +0100 Subject: [PATCH 08/11] Add Matthew Mead-Briggs(@mattmb) to AUTHORS --- AUTHORS.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index af5115c9d..14b60e5a3 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -25,7 +25,7 @@ Geoff Garside geoffgarside geoff@geoffgarside.co.uk Giuseppe Iannello giannello giuseppe.iannello@brokenloop.net Gregory Meno GregMeno gregory.meno@inktank.com Guillaume Derval GuillaumeDerval guillaume@guillaumederval.be - gweis +gweis gweis Henrik Holmboe holmboe Jeff Hui jeffh jeff@jeffhui.net Jeff Strunk jstrunk @@ -34,6 +34,7 @@ Karl Grzeszczak karlgrz Kenneth Wilke KennethWilke Liu Xiaohui oreh herolxh@gmail.com Matthew Garrett cingeyedog matt@clemson.edu +Matthew Mead-Briggs mattmb Matthew Willson ixela Matthieu Guegan mguegan Mike Carlson m87carlson mike@bayphoto.com From db84d578d9da455a4392fd8631e321eb7bbfe41b Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 9 Sep 2014 20:40:49 +0100 Subject: [PATCH 09/11] Finish salt-api checks skiping. Refs #450 --- bootstrap-salt.sh | 86 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 72 insertions(+), 14 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index a324f38fb..95ae8864b 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1828,6 +1828,10 @@ install_ubuntu_git_post() { echodebug "Copying ${__SALT_GIT_CHECKOUT_DIR}/debian/salt-${fname}.init to /etc/init.d/salt-$fname" copyfile "${__SALT_GIT_CHECKOUT_DIR}/debian/salt-${fname}.init" "/etc/init.d/salt-$fname" chmod +x /etc/init.d/salt-$fname + + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + update-rc.d salt-$fname defaults else echoerror "Neither upstart not init.d was setup for salt-$fname" @@ -1841,11 +1845,13 @@ install_ubuntu_restart_daemons() { # Ensure upstart configs are loaded [ -f /sbin/initctl ] && /sbin/initctl reload-configuration 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 ]; then @@ -2299,6 +2305,10 @@ install_debian_git_post() { continue fi chmod +x "/etc/init.d/salt-$fname" + + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + update-rc.d "salt-$fname" defaults done } @@ -2307,11 +2317,13 @@ install_debian_restart_daemons() { [ "$_START_DAEMONS" -eq $BS_FALSE ] && return 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 /etc/init.d/salt-$fname stop > /dev/null 2>&1 @@ -2386,6 +2398,9 @@ install_fedora_stable_post() { [ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + systemctl is-enabled salt-$fname.service || (systemctl preset salt-$fname.service && systemctl enable salt-$fname.service) sleep 0.1 systemctl daemon-reload @@ -2428,6 +2443,9 @@ install_fedora_git_post() { copyfile "${__SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service" + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + systemctl is-enabled salt-$fname.service || (systemctl preset salt-$fname.service && systemctl enable salt-$fname.service) sleep 0.1 systemctl daemon-reload @@ -2438,10 +2456,13 @@ install_fedora_restart_daemons() { [ $_START_DAEMONS -eq $BS_FALSE ] && return 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 systemctl stop salt-$fname > /dev/null 2>&1 @@ -2590,9 +2611,12 @@ install_centos_stable() { install_centos_stable_post() { for fname in minion master syndic api; do # Skip if not meant to be installed + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + [ $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 /etc/init.d/salt-$fname ]; then @@ -2657,6 +2681,10 @@ install_centos_git_post() { if [ ! -f /etc/init.d/salt-$fname ] || ([ -f /etc/init.d/salt-$fname ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]); then copyfile "${__SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}" /etc/init.d/ chmod +x /etc/init.d/salt-${fname} + + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + /sbin/chkconfig salt-${fname} on fi @@ -2681,9 +2709,12 @@ install_centos_restart_daemons() { for fname in minion master syndic api; do # Skip if not meant to be installed + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + [ $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 @@ -3356,6 +3387,9 @@ install_arch_linux_post() { copyfile "$_SALT_ETC_DIR/$fname.pacorig" "$_SALT_ETC_DIR/$fname" $BS_TRUE fi + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + if [ -f /usr/bin/systemctl ]; then # Using systemd /usr/bin/systemctl is-enabled salt-$fname.service > /dev/null 2>&1 || ( @@ -3383,6 +3417,9 @@ install_arch_linux_git_post() { if [ -f /usr/bin/systemctl ]; then copyfile "${__SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service" + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + /usr/bin/systemctl is-enabled salt-${fname}.service > /dev/null 2>&1 || ( /usr/bin/systemctl preset salt-${fname}.service > /dev/null 2>&1 && /usr/bin/systemctl enable salt-${fname}.service > /dev/null 2>&1 @@ -3402,11 +3439,13 @@ install_arch_linux_restart_daemons() { [ $_START_DAEMONS -eq $BS_FALSE ] && return 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 /usr/bin/systemctl ]; then @@ -3637,6 +3676,9 @@ install_freebsd_git() { install_freebsd_9_stable_post() { 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 @@ -3670,11 +3712,13 @@ install_freebsd_restart_daemons() { [ $_START_DAEMONS -eq $BS_FALSE ] && return 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 service salt_$fname stop > /dev/null 2>&1 @@ -3808,11 +3852,13 @@ install_smartos_restart_daemons() { [ $_START_DAEMONS -eq $BS_FALSE ] && return 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 # Stop if running && Start service @@ -3915,11 +3961,13 @@ install_opensuse_git() { install_opensuse_stable_post() { 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 /bin/systemctl ]; then @@ -3961,11 +4009,13 @@ install_opensuse_restart_daemons() { [ $_START_DAEMONS -eq $BS_FALSE ] && return 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 /bin/systemctl ]; then @@ -4275,11 +4325,13 @@ install_gentoo_git() { install_gentoo_post() { 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 [ -d "/run/systemd/system" ]; then @@ -4296,11 +4348,13 @@ install_gentoo_restart_daemons() { [ $_START_DAEMONS -eq $BS_FALSE ] && return 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 [ -d "/run/systemd/system" ]; then @@ -4464,12 +4518,13 @@ daemons_running() { FAILED_DAEMONS=0 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" ] && continue [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue # shellcheck disable=SC2009 @@ -4761,10 +4816,13 @@ if [ "$DAEMONS_RUNNING_FUNC" != "null" ] && [ $_START_DAEMONS -eq $BS_TRUE ]; th echoerror "Failed to run ${DAEMONS_RUNNING_FUNC}()!!!" 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 [ "$_ECHO_DEBUG" -eq $BS_FALSE ]; then From c12d6ac5b6c144e3269fa64c803c905ad4a038cf Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 9 Sep 2014 20:41:42 +0100 Subject: [PATCH 10/11] Update changes log --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 64d09fe73..123ef6069 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ Version 2014.xx.xx: * Updated the URL for EPEL 7 * PIP based installations on Ubuntu 10.04 need setuptools installed * Arch stopped providing the version information on `/etc/arch-release` + * Complete `salt-api` services checking. #450 Version 2014.08.30: * Skip service checks for `salt-api`, since this should be an opt-in service not necessarily From 0a7d35fd1e4850f444c51822bc4c3c56f1934aeb Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 9 Sep 2014 23:07:16 +0100 Subject: [PATCH 11/11] Bump release --- ChangeLog | 2 +- bootstrap-salt.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 123ef6069..114539ce9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -Version 2014.xx.xx: +Version 2014.09.09: * Distro Support Fixes: * Updated the URL for EPEL 7 * PIP based installations on Ubuntu 10.04 need setuptools installed diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 95ae8864b..ebce31601 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.30" +__ScriptVersion="2014.09.09" __ScriptName="bootstrap-salt.sh" #======================================================================================================================