Skip to content

Commit 40c2289

Browse files
committed
Merge branch 'develop' into stable for v2014.08.30 stable release
2 parents c14c38b + 187ad5c commit 40c2289

File tree

3 files changed

+51
-14
lines changed

3 files changed

+51
-14
lines changed

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Boris Feld Lothiraldan
1414
bruce-one bruce-one
1515
Chris Rebert cvrebert chris.rebert@hulu.com
1616
Christer Edwards cedwards
17+
Dag Viggo Lokøen dagvl dag.viggo@lokoen.org
1718
Dan Mick dmick dan.mick@inktank.com
1819
deployboy deployboy
1920
Diego Woitasen diegows diego.woitasen@vhgroup.net

ChangeLog

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Version 2014.08.30:
2+
* Skip service checks for `salt-api`, since this should be an opt-in service not necessarily
3+
meant to start at boot time.
4+
* Distro Support Fixes:
5+
* Also install the salt-api service on RHEL based distributions for git based
6+
installations.
7+
* Properly detect Arch Linux when lsb-release is available
8+
* Updated the URL for EPEL 7
9+
110
Version 2014.08.23:
211
* Avoid redirect breakage when installing EPEL with rpm on RHEL 5
312
* Ensure python-apt is installed by the bootstrap script for Debian & Ubuntu minions. Thanks
@@ -15,7 +24,6 @@ Version 2014.08.23:
1524
running which ended up causing a most stubborn bug that's documented in
1625
https://github.com/saltstack/salt/issues/12248
1726

18-
1927
Version 2014.07.29:
2028
* Shallow clone Salt's repository for speed improvements. In case of failure, resume old
2129
behaviour.

bootstrap-salt.sh

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# CREATED: 10/15/2012 09:49:37 PM WEST
1818
#======================================================================================================================
1919
set -o nounset # Treat unset variables as an error
20-
__ScriptVersion="2014.08.23"
20+
__ScriptVersion="2014.08.30"
2121
__ScriptName="bootstrap-salt.sh"
2222

2323
#======================================================================================================================
@@ -702,6 +702,9 @@ __gather_linux_system_info() {
702702
DISTRO_NAME="Oracle Linux"
703703
elif [ "${DISTRO_NAME}" = "AmazonAMI" ]; then
704704
DISTRO_NAME="Amazon Linux AMI"
705+
elif [ "${DISTRO_NAME}" = "Arch" ]; then
706+
DISTRO_NAME="Arch Linux"
707+
return
705708
fi
706709
rv=$(lsb_release -sr)
707710
[ "${rv}" != "" ] && DISTRO_VERSION=$(__parse_version_string "$rv")
@@ -1871,10 +1874,13 @@ install_ubuntu_restart_daemons() {
18711874

18721875
install_ubuntu_check_services() {
18731876
for fname in minion master syndic api; do
1877+
# Skip salt-api since the service should be opt-in and not necessarily started on boot
1878+
[ $fname = "api" ] && continue
1879+
18741880
# Skip if not meant to be installed
18751881
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
18761882
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
1877-
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
1883+
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
18781884
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
18791885
if [ -f /sbin/initctl ] && [ -f /etc/init/salt-${fname}.conf ]; then
18801886
__check_services_upstart salt-$fname || return 1
@@ -2314,10 +2320,13 @@ install_debian_restart_daemons() {
23142320

23152321
install_debian_check_services() {
23162322
for fname in minion master syndic api; do
2323+
# Skip salt-api since the service should be opt-in and not necessarily started on boot
2324+
[ $fname = "api" ] && continue
2325+
23172326
# Skip if not meant to be installed
23182327
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
23192328
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
2320-
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ ! -f "/etc/init.d/salt-$fname" ]) && continue
2329+
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ ! -f "/etc/init.d/salt-$fname" ]) && continue
23212330
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
23222331
__check_services_debian salt-$fname || return 1
23232332
done
@@ -2441,10 +2450,13 @@ install_fedora_restart_daemons() {
24412450

24422451
install_fedora_check_services() {
24432452
for fname in minion master syndic api; do
2453+
# Skip salt-api since the service should be opt-in and not necessarily started on boot
2454+
[ $fname = "api" ] && continue
2455+
24442456
# Skip if not meant to be installed
24452457
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
24462458
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
2447-
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
2459+
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
24482460
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
24492461
__check_services_systemd salt-$fname || return 1
24502462
done
@@ -2483,7 +2495,7 @@ __install_epel_repository() {
24832495
elif [ "$DISTRO_MAJOR_VERSION" -eq 6 ]; then
24842496
rpm -Uvh --force "http://download.fedoraproject.org/pub/epel/6/${EPEL_ARCH}/epel-release-6-8.noarch.rpm" || return 1
24852497
elif [ "$DISTRO_MAJOR_VERSION" -eq 7 ]; then
2486-
rpm -Uvh --force "http://download.fedoraproject.org/pub/epel/beta/7/${EPEL_ARCH}/epel-release-7-0.2.noarch.rpm" || return 1
2498+
rpm -Uvh --force "http://download.fedoraproject.org/pub/epel/7/${EPEL_ARCH}/epel-release-7-1.noarch.rpm" || return 1
24872499
else
24882500
echoerror "Failed add EPEL repository support."
24892501
return 1
@@ -2632,11 +2644,12 @@ install_centos_git() {
26322644
}
26332645

26342646
install_centos_git_post() {
2635-
for fname in master minion syndic; do
2647+
for fname in minion master minion api; do
26362648

26372649
# Skip if not meant to be installed
26382650
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
26392651
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
2652+
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
26402653
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
26412654

26422655
# While the RPM's use init.d, so will we.
@@ -2718,10 +2731,13 @@ install_centos_testing_post() {
27182731

27192732
install_centos_check_services() {
27202733
for fname in minion master syndic api; do
2734+
# Skip salt-api since the service should be opt-in and not necessarily started on boot
2735+
[ $fname = "api" ] && continue
2736+
27212737
# Skip if not meant to be installed
27222738
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
27232739
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
2724-
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
2740+
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
27252741
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
27262742
if [ -f /sbin/initctl ] && [ -f /etc/init/salt-${fname}.conf ]; then
27272743
__check_services_upstart salt-$fname || return 1
@@ -2765,7 +2781,7 @@ __test_rhel_optionals_packages() {
27652781
yum --config "${__YUM_CONF_FILE}" install -y ${package} --enablerepo=${_EPEL_REPO} >/dev/null 2>&1
27662782
fi
27672783
if [ $? -ne 0 ]; then
2768-
echoerror "Failed to find an installable '${package}' package. The optional repository or it's subscription might be missing."
2784+
echoerror "Failed to find an installable '${package}' package. The optional repository or its subscription might be missing."
27692785
rm -rf "${__YUM_CONF_DIR}"
27702786
return 1
27712787
fi
@@ -3409,10 +3425,13 @@ install_arch_check_services() {
34093425
fi
34103426

34113427
for fname in minion master syndic api; do
3428+
# Skip salt-api since the service should be opt-in and not necessarily started on boot
3429+
[ $fname = "api" ] && continue
3430+
34123431
# Skip if not meant to be installed
34133432
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
34143433
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
3415-
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
3434+
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
34163435
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
34173436
__check_services_systemd salt-$fname || return 1
34183437
done
@@ -3822,7 +3841,7 @@ install_opensuse_stable_deps() {
38223841

38233842
zypper --gpg-auto-import-keys --non-interactive refresh
38243843
if [ $? -ne 0 ] && [ $? -ne 4 ]; then
3825-
# If the exit code is not 0, and it's not 4(failed to update a
3844+
# If the exit code is not 0, and it's not 4 (failed to update a
38263845
# repository) return a failure. Otherwise continue.
38273846
return 1
38283847
fi
@@ -3967,10 +3986,13 @@ install_opensuse_check_services() {
39673986
fi
39683987

39693988
for fname in minion master syndic api; do
3989+
# Skip salt-api since the service should be opt-in and not necessarily started on boot
3990+
[ $fname = "api" ] && continue
3991+
39703992
# Skip if not meant to be installed
39713993
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
39723994
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
3973-
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
3995+
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
39743996
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
39753997
__check_services_systemd salt-$fname > /dev/null 2>&1 || __check_services_systemd salt-$fname.service > /dev/null 2>&1 || return 1
39763998
done
@@ -4152,10 +4174,13 @@ install_suse_check_services() {
41524174
fi
41534175

41544176
for fname in minion master syndic api; do
4177+
# Skip salt-api since the service should be opt-in and not necessarily started on boot
4178+
[ $fname = "api" ] && continue
4179+
41554180
# Skip if not meant to be installed
41564181
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
41574182
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
4158-
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
4183+
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
41594184
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
41604185
__check_services_systemd salt-$fname || return 1
41614186
done
@@ -4294,10 +4319,13 @@ install_gentoo_check_services() {
42944319
fi
42954320

42964321
for fname in minion master syndic api; do
4322+
# Skip salt-api since the service should be opt-in and not necessarily started on boot
4323+
[ $fname = "api" ] && continue
4324+
42974325
# Skip if not meant to be installed
42984326
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
42994327
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
4300-
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
4328+
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
43014329
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
43024330
__check_services_systemd salt-$fname || return 1
43034331
done

0 commit comments

Comments
 (0)