Hello community,
here is the log from the commit of package salt for openSUSE:Factory checked in at 2014-10-23 14:20:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/salt (Old)
and /work/SRC/openSUSE:Factory/.salt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "salt"
Changes:
--------
--- /work/SRC/openSUSE:Factory/salt/salt.changes 2014-10-01 11:23:47.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.salt.new/salt.changes 2014-10-23 14:21:19.000000000 +0200
@@ -1,0 +2,15 @@
+Thu Oct 16 19:26:57 UTC 2014 - aboe76@gmail.com
+
+- Updated to 2014.1.13 a bugfix release on 2014.1.12
+ + fix module run exit code (issue 16420)
+ + salt cloud Check the exit status code of scp before assuming it has failed. (issue 16599)
+
+
+-------------------------------------------------------------------
+Fri Oct 10 18:47:07 UTC 2014 - aboe76@gmail.com
+ff
+- Updated to 2014.1.12 a bugfix release on 2014.1.11
+ + Fix scp_file always failing (which broke salt-cloud) (issue 16437)
+ + Fix regression in pillar in masterless (issue 16210, issue 16416, issue 16428)
+
+-------------------------------------------------------------------
@@ -471 +486 @@
-- Updated 0.17.0 Feauture Release
+- Updated 0.17.0 Feature Release
@@ -602 +617 @@
-- New Feautures in 0.16.0:
+- New Features in 0.16.0:
Old:
----
salt-2014.1.11.tar.gz
New:
----
salt-2014.1.13.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ salt.spec ++++++
--- /var/tmp/diff_new_pack.WFclNl/_old 2014-10-23 14:21:20.000000000 +0200
+++ /var/tmp/diff_new_pack.WFclNl/_new 2014-10-23 14:21:20.000000000 +0200
@@ -15,9 +15,8 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-
Name: salt
-Version: 2014.1.11
+Version: 2014.1.13
Release: 0
Summary: A parallel remote execution system
License: Apache-2.0
++++++ salt-2014.1.11.tar.gz -> salt-2014.1.13.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/PKG-INFO new/salt-2014.1.13/PKG-INFO
--- old/salt-2014.1.11/PKG-INFO 2014-09-09 22:43:03.000000000 +0200
+++ new/salt-2014.1.13/PKG-INFO 2014-10-15 17:26:12.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: salt
-Version: 2014.1.11
+Version: 2014.1.13
Summary: Portable, distributed, remote execution and configuration management system
Home-page: http://saltstack.org
Author: Thomas S Hatch
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/doc/topics/installation/fedora.rst new/salt-2014.1.13/doc/topics/installation/fedora.rst
--- old/salt-2014.1.11/doc/topics/installation/fedora.rst 2014-09-09 22:42:16.000000000 +0200
+++ new/salt-2014.1.13/doc/topics/installation/fedora.rst 2014-10-15 17:21:54.000000000 +0200
@@ -7,6 +7,12 @@
up to date versions of Salt than other members of the Red Hat family, which
makes it a great place to help improve Salt!
+**WARNING**: Fedora 19 comes with systemd 204. Systemd has known bugs fixed in
+later revisions that prevent the salt-master from starting reliably or opening
+the network connections that it needs to. It's not likely that a salt-master
+will start or run reliably on any distribution that uses systemd version 204 or
+earlier. Running salt-minions should be OK.
+
Installation
============
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/doc/topics/releases/2014.1.11.rst new/salt-2014.1.13/doc/topics/releases/2014.1.11.rst
--- old/salt-2014.1.11/doc/topics/releases/2014.1.11.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/salt-2014.1.13/doc/topics/releases/2014.1.11.rst 2014-10-03 22:21:36.000000000 +0200
@@ -0,0 +1,16 @@
+============================
+Salt 2014.1.11 Release Notes
+============================
+
+:release: 2014-08-29
+
+Version 2014.1.11 is another bugfix release for :doc:`2014.1.0
+`. Changes include:
+
+- Fix for minion_id with byte-order mark (BOM) (:issue:`12296`)
+- Fix ``runas`` deprecation in ``at`` module
+- Fix trailing slash befhavior for ``file.makedirs_`` (:issue:`14019`)
+- Fix chocolatey path (:issue:`13870`)
+- Fix git_pillar infinite loop issues (:issue:`14671`)
+- Fix json outputter ``null`` case
+- Fix for minion error if one of multiple masters are down (:issue:`14099`)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/doc/topics/releases/2014.1.12.rst new/salt-2014.1.13/doc/topics/releases/2014.1.12.rst
--- old/salt-2014.1.11/doc/topics/releases/2014.1.12.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/salt-2014.1.13/doc/topics/releases/2014.1.12.rst 2014-10-15 17:21:54.000000000 +0200
@@ -0,0 +1,12 @@
+============================
+Salt 2014.1.12 Release Notes
+============================
+
+:release: 2014-10-08
+
+Version 2014.1.12 is another bugfix release for :doc:`2014.1.0
+`. Changes include:
+
+- Fix ``scp_file`` always failing (which broke salt-cloud) (:issue:`16437`)
+- Fix regression in pillar in masterless (:issue:`16210`, :issue:`16416`,
+ :issue:`16428`)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/doc/topics/releases/2014.1.13.rst new/salt-2014.1.13/doc/topics/releases/2014.1.13.rst
--- old/salt-2014.1.11/doc/topics/releases/2014.1.13.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/salt-2014.1.13/doc/topics/releases/2014.1.13.rst 2014-10-15 17:21:54.000000000 +0200
@@ -0,0 +1,10 @@
+============================
+Salt 2014.1.13 Release Notes
+============================
+
+:release: 2014-10-14
+
+Version 2014.1.13 is another bugfix release for :doc:`2014.1.0
+`. Changes include:
+
+- Fix ``sftp_file`` by checking the exit status code of scp (which broke salt-cloud) (:issue:`16599`)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/doc/topics/tutorials/quickstart.rst new/salt-2014.1.13/doc/topics/tutorials/quickstart.rst
--- old/salt-2014.1.11/doc/topics/tutorials/quickstart.rst 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/doc/topics/tutorials/quickstart.rst 2014-10-15 17:21:54.000000000 +0200
@@ -17,6 +17,12 @@
salt-call --local state.highstate
+.. note::
+
+ When running Salt in masterless mode, do not run the salt-minion daemon.
+ Otherwise, it will attempt to connect to a master and fail. The salt-call
+ command stands on its own and does not need the salt-minion daemon.
+
Bootstrap Salt Minion
=====================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/doc/topics/tutorials/standalone_minion.rst new/salt-2014.1.13/doc/topics/tutorials/standalone_minion.rst
--- old/salt-2014.1.11/doc/topics/tutorials/standalone_minion.rst 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/doc/topics/tutorials/standalone_minion.rst 2014-10-15 17:21:54.000000000 +0200
@@ -10,6 +10,12 @@
- Use salt-call commands on a system without connectivity to a master
- Masterless States, run states entirely from files local to the minion
+.. note::
+
+ When running Salt in masterless mode, do not run the salt-minion daemon.
+ Otherwise, it will attempt to connect to a master and fail. The salt-call
+ command stands on its own and does not need the salt-minion daemon.
+
Telling Salt Call to Run Masterless
===================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/pkg/arch/salt-master.service new/salt-2014.1.13/pkg/arch/salt-master.service
--- old/salt-2014.1.11/pkg/arch/salt-master.service 2014-08-20 22:35:55.000000000 +0200
+++ new/salt-2014.1.13/pkg/arch/salt-master.service 2014-10-23 14:21:21.000000000 +0200
@@ -1,10 +1 @@
-[Unit]
-Description=The Salt Master Server
-After=syslog.target network.target
-
-[Service]
-Type=notify
-ExecStart=/usr/bin/salt-master
-
-[Install]
-WantedBy=multi-user.target
+symbolic link to ../salt-master.service
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/pkg/arch/salt-minion.service new/salt-2014.1.13/pkg/arch/salt-minion.service
--- old/salt-2014.1.11/pkg/arch/salt-minion.service 2014-03-11 20:18:21.000000000 +0100
+++ new/salt-2014.1.13/pkg/arch/salt-minion.service 2014-10-23 14:21:21.000000000 +0200
@@ -1,10 +1 @@
-[Unit]
-Description=The Salt Minion
-After=syslog.target network.target
-
-[Service]
-Type=simple
-ExecStart=/usr/bin/salt-minion
-
-[Install]
-WantedBy=multi-user.target
+symbolic link to ../salt-minion.service
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/pkg/arch/salt-syndic.service new/salt-2014.1.13/pkg/arch/salt-syndic.service
--- old/salt-2014.1.11/pkg/arch/salt-syndic.service 2014-03-11 20:18:21.000000000 +0100
+++ new/salt-2014.1.13/pkg/arch/salt-syndic.service 2014-10-23 14:21:20.000000000 +0200
@@ -1,10 +1 @@
-[Unit]
-Description=The Salt Master Server
-After=syslog.target network.target
-
-[Service]
-Type=simple
-ExecStart=/usr/bin/salt-syndic
-
-[Install]
-WantedBy=multi-user.target
+symbolic link to ../salt-syndic.service
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/pkg/rpm/salt-master.service new/salt-2014.1.13/pkg/rpm/salt-master.service
--- old/salt-2014.1.11/pkg/rpm/salt-master.service 2014-08-20 22:35:55.000000000 +0200
+++ new/salt-2014.1.13/pkg/rpm/salt-master.service 2014-10-23 14:21:21.000000000 +0200
@@ -1,10 +1 @@
-[Unit]
-Description=The Salt Master Server
-After=syslog.target network.target
-
-[Service]
-Type=notify
-ExecStart=/usr/bin/salt-master
-
-[Install]
-WantedBy=multi-user.target
+symbolic link to ../salt-master.service
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/pkg/rpm/salt-minion.service new/salt-2014.1.13/pkg/rpm/salt-minion.service
--- old/salt-2014.1.11/pkg/rpm/salt-minion.service 2014-03-11 20:18:21.000000000 +0100
+++ new/salt-2014.1.13/pkg/rpm/salt-minion.service 2014-10-23 14:21:21.000000000 +0200
@@ -1,10 +1 @@
-[Unit]
-Description=The Salt Minion
-After=syslog.target network.target
-
-[Service]
-Type=simple
-ExecStart=/usr/bin/salt-minion
-
-[Install]
-WantedBy=multi-user.target
+symbolic link to ../salt-minion.service
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/pkg/rpm/salt-syndic.service new/salt-2014.1.13/pkg/rpm/salt-syndic.service
--- old/salt-2014.1.11/pkg/rpm/salt-syndic.service 2014-03-11 20:18:21.000000000 +0100
+++ new/salt-2014.1.13/pkg/rpm/salt-syndic.service 2014-10-23 14:21:21.000000000 +0200
@@ -1,10 +1 @@
-[Unit]
-Description=The Salt Master Server
-After=syslog.target network.target
-
-[Service]
-Type=simple
-ExecStart=/usr/bin/salt-syndic
-
-[Install]
-WantedBy=multi-user.target
+symbolic link to ../salt-syndic.service
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/pkg/smartos/esky/build-tarball.sh new/salt-2014.1.13/pkg/smartos/esky/build-tarball.sh
--- old/salt-2014.1.11/pkg/smartos/esky/build-tarball.sh 2014-06-17 21:18:30.000000000 +0200
+++ new/salt-2014.1.13/pkg/smartos/esky/build-tarball.sh 2014-10-03 22:21:36.000000000 +0200
@@ -4,6 +4,7 @@
rm -rf dist/ $BUILD_DIR &&\
cp $PKG_DIR/_syspaths.py salt/ &&\
+python2.7 setup.py sdist &&\
python2.7 setup.py bdist &&\
python2.7 setup.py bdist_esky &&\
rm salt/_syspaths.py &&\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/pkg/smartos/esky/salt-minion.xml new/salt-2014.1.13/pkg/smartos/esky/salt-minion.xml
--- old/salt-2014.1.11/pkg/smartos/esky/salt-minion.xml 2014-08-20 22:35:55.000000000 +0200
+++ new/salt-2014.1.13/pkg/smartos/esky/salt-minion.xml 2014-10-03 22:21:36.000000000 +0200
@@ -28,7 +28,7 @@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/pkg/suse/salt-master.service new/salt-2014.1.13/pkg/suse/salt-master.service
--- old/salt-2014.1.11/pkg/suse/salt-master.service 2014-08-20 22:35:55.000000000 +0200
+++ new/salt-2014.1.13/pkg/suse/salt-master.service 2014-10-23 14:21:21.000000000 +0200
@@ -1,10 +1 @@
-[Unit]
-Description=The Salt Master Server
-After=syslog.target network.target
-
-[Service]
-Type=notify
-ExecStart=/usr/bin/salt-master
-
-[Install]
-WantedBy=multi-user.target
+symbolic link to ../salt-master.service
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/pkg/suse/salt-minion.service new/salt-2014.1.13/pkg/suse/salt-minion.service
--- old/salt-2014.1.11/pkg/suse/salt-minion.service 2014-03-11 20:18:21.000000000 +0100
+++ new/salt-2014.1.13/pkg/suse/salt-minion.service 2014-10-23 14:21:21.000000000 +0200
@@ -1,10 +1 @@
-[Unit]
-Description=The Salt Minion
-After=syslog.target network.target
-
-[Service]
-Type=simple
-ExecStart=/usr/bin/salt-minion
-
-[Install]
-WantedBy=multi-user.target
+symbolic link to ../salt-minion.service
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/pkg/suse/salt-syndic.service new/salt-2014.1.13/pkg/suse/salt-syndic.service
--- old/salt-2014.1.11/pkg/suse/salt-syndic.service 2014-03-11 20:18:21.000000000 +0100
+++ new/salt-2014.1.13/pkg/suse/salt-syndic.service 2014-10-23 14:21:21.000000000 +0200
@@ -1,10 +1 @@
-[Unit]
-Description=The Salt Master Server
-After=syslog.target network.target
-
-[Service]
-Type=simple
-ExecStart=/usr/bin/salt-syndic
-
-[Install]
-WantedBy=multi-user.target
+symbolic link to ../salt-syndic.service
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/pkg/suse/salt.logrotate new/salt-2014.1.13/pkg/suse/salt.logrotate
--- old/salt-2014.1.11/pkg/suse/salt.logrotate 2014-03-11 20:18:21.000000000 +0100
+++ new/salt-2014.1.13/pkg/suse/salt.logrotate 2014-10-23 14:21:21.000000000 +0200
@@ -1,23 +1 @@
-/var/log/salt/master {
- weekly
- missingok
- rotate 7
- compress
- notifempty
-}
-
-/var/log/salt/minion {
- weekly
- missingok
- rotate 7
- compress
- notifempty
-}
-
-/var/log/salt/key {
- weekly
- missingok
- rotate 7
- compress
- notifempty
-}
+symbolic link to ../salt-common.logrotate
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/_version.py new/salt-2014.1.13/salt/_version.py
--- old/salt-2014.1.11/salt/_version.py 2014-09-09 22:43:03.000000000 +0200
+++ new/salt-2014.1.13/salt/_version.py 2014-10-15 17:26:12.000000000 +0200
@@ -1,5 +1,5 @@
-# This file was auto-generated by salt's setup on Tuesday, 09 September 2014 @ 20:09:03 UTC.
+# This file was auto-generated by salt's setup on Wednesday, 15 October 2014 @ 15:10:12 UTC.
from salt.version import SaltStackVersion
-__saltstack_version__ = SaltStackVersion(2014, 1, 11, 0, 0, 0, None)
+__saltstack_version__ = SaltStackVersion(2014, 1, 13, 0, 0, 0, None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/cloud/clouds/ec2.py new/salt-2014.1.13/salt/cloud/clouds/ec2.py
--- old/salt-2014.1.11/salt/cloud/clouds/ec2.py 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/salt/cloud/clouds/ec2.py 2014-10-15 17:21:54.000000000 +0200
@@ -1541,7 +1541,7 @@
)
if 'instance_id' not in kwargs:
- kwargs['instance_id'] = _get_node(name)['instanceId']
+ kwargs['instance_id'] = _get_node(name)[name]['instanceId']
if type(kwargs['volumes']) is str:
volumes = yaml.safe_load(kwargs['volumes'])
@@ -1616,7 +1616,7 @@
log.info('Stopping node {0}'.format(name))
- instance_id = _get_node(name)['instanceId']
+ instance_id = _get_node(name)[name]['instanceId']
params = {'Action': 'StopInstances',
'InstanceId.1': instance_id}
@@ -1636,7 +1636,7 @@
log.info('Starting node {0}'.format(name))
- instance_id = _get_node(name)['instanceId']
+ instance_id = _get_node(name)[name]['instanceId']
params = {'Action': 'StartInstances',
'InstanceId.1': instance_id}
@@ -1659,7 +1659,7 @@
)
if instance_id is None:
- instance_id = _get_node(name, location)['instanceId']
+ instance_id = _get_node(name, location)[name]['instanceId']
params = {'Action': 'CreateTags',
'ResourceId.1': instance_id}
@@ -1748,7 +1748,7 @@
'A tag or tags must be specified using tags=list,of,tags'
)
- instance_id = _get_node(name)['instanceId']
+ instance_id = _get_node(name)[name]['instanceId']
params = {'Action': 'DeleteTags',
'ResourceId.1': instance_id}
@@ -1869,7 +1869,7 @@
salt-cloud -a reboot mymachine
'''
- instance_id = _get_node(name)['instanceId']
+ instance_id = _get_node(name)[name]['instanceId']
params = {'Action': 'RebootInstances',
'InstanceId.1': instance_id}
result = query(params)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/cloud/deploy/bootstrap-salt.sh new/salt-2014.1.13/salt/cloud/deploy/bootstrap-salt.sh
--- old/salt-2014.1.11/salt/cloud/deploy/bootstrap-salt.sh 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/salt/cloud/deploy/bootstrap-salt.sh 2014-10-15 17:21:54.000000000 +0200
@@ -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.09.24"
__ScriptName="bootstrap-salt.sh"
#======================================================================================================================
@@ -31,7 +31,7 @@
# * 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
#======================================================================================================================
@@ -702,6 +702,9 @@
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")
@@ -728,10 +731,11 @@
[ ! -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"
@@ -770,6 +774,10 @@
rv="$(__unquote_string "$(grep '^VERSION_ID=' /etc/os-release | sed -e 's/^VERSION_ID=\(.*\)$/\1/g')")"
[ "${rv}" != "" ] && v=$(__parse_version_string "$rv") || v=""
case $(echo "${nn}" | tr '[:upper:]' '[:lower:]') in
+ amzn )
+ # Amazon AMI's after 2014.9 match here
+ n="Amazon Linux AMI"
+ ;;
arch )
n="Arch Linux"
v="" # Arch Linux does not provide a version.
@@ -1153,7 +1161,7 @@
fi
else
__SHALLOW_CLONE="${BS_FALSE}"
- if [ "$(echo "$GIT_REV" | sed 's/^.*\(v[[:digit:]]\{1,4\}\.[[:digit:]]\{1,2\}\.[[:digit:]]\{1,2\}\).*$/MATCH/')" = "MATCH" ]; then
+ if [ "$(echo "$GIT_REV" | sed 's/^.*\(v[[:digit:]]\{1,4\}\.[[:digit:]]\{1,2\}\.[[:digit:]]\{1,2\}\)\?.*$/MATCH/')" = "MATCH" ]; then
echoinfo "Git revision matches a Salt version tag"
# Let's try shallow cloning to speed up.
# Test for "--single-branch" option introduced in git 1.7.10, the minimal version of git where the shallow
@@ -1690,7 +1698,7 @@
__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
@@ -1824,6 +1832,10 @@
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"
@@ -1837,11 +1849,13 @@
# 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
@@ -1871,10 +1885,13 @@
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
@@ -2292,6 +2309,10 @@
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
}
@@ -2300,11 +2321,13 @@
[ "$_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
@@ -2314,10 +2337,13 @@
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
@@ -2376,6 +2402,9 @@
[ $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
@@ -2418,6 +2447,9 @@
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
@@ -2428,10 +2460,13 @@
[ $_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
@@ -2441,10 +2476,13 @@
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
@@ -2483,7 +2521,7 @@
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}/e/epel-release-7-2.noarch.rpm" || return 1
else
echoerror "Failed add EPEL repository support."
return 1
@@ -2577,9 +2615,12 @@
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
@@ -2632,17 +2673,22 @@
}
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.
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
@@ -2667,9 +2713,12 @@
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
@@ -2718,10 +2767,13 @@
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
@@ -2765,7 +2817,7 @@
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
@@ -3339,6 +3391,9 @@
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 || (
@@ -3366,6 +3421,9 @@
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
@@ -3385,11 +3443,13 @@
[ $_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
@@ -3409,10 +3469,13 @@
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
@@ -3617,6 +3680,9 @@
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
@@ -3650,11 +3716,13 @@
[ $_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
@@ -3788,11 +3856,13 @@
[ $_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
@@ -3822,7 +3892,7 @@
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
@@ -3895,11 +3965,13 @@
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
@@ -3941,11 +4013,13 @@
[ $_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
@@ -3967,10 +4041,13 @@
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
@@ -4152,10 +4229,13 @@
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
@@ -4249,11 +4329,13 @@
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
@@ -4270,11 +4352,13 @@
[ $_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
@@ -4294,10 +4378,13 @@
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
@@ -4435,11 +4522,13 @@
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" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
# shellcheck disable=SC2009
@@ -4731,10 +4820,13 @@
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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/fileserver/s3fs.py new/salt-2014.1.13/salt/fileserver/s3fs.py
--- old/salt-2014.1.11/salt/fileserver/s3fs.py 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/salt/fileserver/s3fs.py 2014-10-15 17:21:40.000000000 +0200
@@ -61,6 +61,7 @@
'''
# Import python libs
+import datetime
import os
import hashlib
import time
@@ -506,22 +507,63 @@
Checks the local cache for the file, if it's old or missing go grab the
file from S3 and update the cache
'''
+ key, keyid, service_url = _get_s3_key()
# check the local cache...
if os.path.isfile(cached_file_path):
file_meta = _find_file_meta(metadata, bucket_name, saltenv, path)
- file_md5 = filter(str.isalnum, file_meta['ETag']) if file_meta else None
+ if file_meta:
+ file_etag = file_meta['ETag']
- cached_file_hash = hashlib.md5()
- with salt.utils.fopen(cached_file_path, 'rb') as fp_:
- cached_file_hash.update(fp_.read())
-
- # hashes match we have a cache hit
- if cached_file_hash.hexdigest() == file_md5:
- return
+ if file_etag.find('-') == -1:
+ file_md5 = file_etag
+ cached_file_hash = hashlib.md5()
+ with salt.utils.fopen(cached_file_path, 'rb') as fp_:
+ cached_file_hash.update(fp_.read())
+
+ # hashes match we have a cache hit
+ if cached_file_hash.hexdigest() == file_md5:
+ return
+ else:
+ cached_file_stat = os.stat(cached_file_path)
+ cached_file_size = cached_file_stat.st_size
+ cached_file_mtime = datetime.datetime.fromtimestamp(
+ cached_file_stat.st_mtime)
+
+ cached_file_lastmod = datetime.datetime.strptime(
+ file_meta['LastModified'], '%Y-%m-%dT%H:%M:%S.%fZ')
+ if (cached_file_size == int(file_meta['Size']) and
+ cached_file_mtime > cached_file_lastmod):
+ log.debug('cached file size equal to metadata size and '
+ 'cached file mtime later than metadata last '
+ 'modification time.')
+ ret = s3.query(
+ key=key,
+ keyid=keyid,
+ method='HEAD',
+ bucket=bucket_name,
+ service_url=service_url,
+ path=urllib.quote(path),
+ local_file=cached_file_path
+ )
+ for header in ret['headers']:
+ name, value = header.split(':', 1)
+ name = name.strip()
+ value = value.strip()
+ if name == 'Last-Modified':
+ s3_file_mtime = datetime.datetime.strptime(
+ value, '%a, %d %b %Y %H:%M:%S %Z')
+ elif name == 'Content-Length':
+ s3_file_size = int(value)
+ if (cached_file_size == s3_file_size and
+ cached_file_mtime > s3_file_mtime):
+ log.info(
+ '{0} - {1} : {2} skipped download since cached file size '
+ 'equal to and mtime after s3 values'.format(
+ bucket_name, saltenv, path))
+ return
# ... or get the file from S3
- key, keyid, service_url = _get_s3_key()
s3.query(
key=key,
keyid=keyid,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/grains/core.py new/salt-2014.1.13/salt/grains/core.py
--- old/salt-2014.1.11/salt/grains/core.py 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/salt/grains/core.py 2014-10-15 17:21:40.000000000 +0200
@@ -151,6 +151,7 @@
# dominant gpu vendors to search for (MUST be lowercase for matching below)
known_vendors = ['nvidia', 'amd', 'ati', 'intel']
+ gpu_classes = ('vga compatible controller', '3d controller')
devs = []
try:
@@ -165,9 +166,8 @@
for line in lspci_list:
# check for record-separating empty lines
if line == '':
- if cur_dev.get('Class', '') == 'VGA compatible controller':
+ if cur_dev.get('Class', '').lower() in gpu_classes:
devs.append(cur_dev)
- # XXX; may also need to search for "3D controller"
cur_dev = {}
continue
if re.match(r'^\w+:\s+.*', line):
@@ -983,7 +983,7 @@
# Load additional OS family grains
if grains['os_family'] == "RedHat":
- grains['osmajorrelease'] = grains['osrelease'].split('.', 1)
+ grains['osmajorrelease'] = grains['osrelease'].split('.', 1)[0]
grains['osfinger'] = '{os}-{ver}'.format(
os=grains['osfullname'],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/modules/cmdmod.py new/salt-2014.1.13/salt/modules/cmdmod.py
--- old/salt-2014.1.11/salt/modules/cmdmod.py 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/salt/modules/cmdmod.py 2014-10-15 17:21:40.000000000 +0200
@@ -331,6 +331,12 @@
env_runas = json.loads(env_json).get('data', {})
env_runas.update(env)
env = env_runas
+ # Encode unicode kwargs to filesystem encoding to avoid a
+ # UnicodeEncodeError when the subprocess is invoked.
+ fse = sys.getfilesystemencoding()
+ for key, val in env.iteritems():
+ if isinstance(val, unicode):
+ env[key] = val.encode(fse)
except ValueError:
raise CommandExecutionError(
'Environment could not be retrieved for User {0!r}'.format(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/modules/file.py new/salt-2014.1.13/salt/modules/file.py
--- old/salt-2014.1.11/salt/modules/file.py 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/salt/modules/file.py 2014-10-15 17:21:40.000000000 +0200
@@ -1019,7 +1019,7 @@
result = re.sub(cpattern, repl, line, count)
# Identity check each potential change until one change is made
- if has_changes is False and result is not line:
+ if has_changes is False and result != line:
has_changes = True
if show_changes:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/modules/mount.py new/salt-2014.1.13/salt/modules/mount.py
--- old/salt-2014.1.11/salt/modules/mount.py 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/salt/modules/mount.py 2014-10-15 17:21:54.000000000 +0200
@@ -238,7 +238,7 @@
# Invalid entry
lines.append(line)
continue
- if comps[0] == device:
+ if comps[1] == name or comps[0] == device:
# check to see if there are changes
# and fix them if there are any
present = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/modules/zfs.py new/salt-2014.1.13/salt/modules/zfs.py
--- old/salt-2014.1.11/salt/modules/zfs.py 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/salt/modules/zfs.py 2014-10-15 17:21:54.000000000 +0200
@@ -42,7 +42,7 @@
ret = {}
# Note that we append '|| :' as a unix hack to force return code to be 0.
res = salt_cmd.run_stderr(
- '{0} help || :'.format(zfs_path), output_loglevel='debug'
+ '{0} help || :'.format(zfs_path), output_loglevel='trace'
)
# This bit is dependent on specific output from `zfs help` - any major changes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/output/highstate.py new/salt-2014.1.13/salt/output/highstate.py
--- old/salt-2014.1.11/salt/output/highstate.py 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/salt/output/highstate.py 2014-10-15 17:21:54.000000000 +0200
@@ -137,8 +137,9 @@
}
hstrs.extend([sline.format(**svars) for sline in state_lines])
changes = ' Changes: ' + ctext
- hstrs.append(('{0}{1}{2[ENDC]}'
- .format(tcolor, changes, colors)))
+ hstrs.append(
+ u'{0}{1}{2[ENDC]}'.format(tcolor, changes, colors)
+ )
# Append result counts to end of output
colorfmt = '{0}{1}{2[ENDC]}'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/output/nested.py new/salt-2014.1.13/salt/output/nested.py
--- old/salt-2014.1.11/salt/output/nested.py 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/salt/output/nested.py 2014-10-15 17:21:54.000000000 +0200
@@ -3,10 +3,12 @@
Recursively display nested data, this is the default outputter.
'''
# Import python libs
+import re
from numbers import Number
# Import salt libs
import salt.utils
+from salt._compat import string_types
class NestDisplay(object):
@@ -16,59 +18,73 @@
def __init__(self):
self.colors = salt.utils.get_colors(__opts__.get('color'))
+ def ustring(self,
+ indent,
+ color,
+ msg,
+ prefix='',
+ suffix='',
+ endc=None,
+ encoding='utf-8'):
+ if endc is None:
+ endc = self.colors['ENDC']
+ try:
+ return u'{0}{1}{2}{3}{4}{5}\n'.format(
+ indent, color, prefix, msg, endc, suffix)
+ except UnicodeDecodeError:
+ return u'{0}{1}{2}{3}{4}{5}\n'.format(
+ indent, color, prefix, msg.decode(encoding), endc, suffix)
+
def display(self, ret, indent, prefix, out):
'''
Recursively iterate down through data structures to determine output
'''
if ret is None or ret is True or ret is False:
- out += '{0}{1}{2}{3}{4}\n'.format(
- ' ' * indent,
- self.colors['YELLOW'],
- prefix,
- ret,
- self.colors['ENDC'])
- # Number includes all python numbers types (float, int, long, complex, ...)
+ out += self.ustring(
+ ' ' * indent,
+ self.colors['YELLOW'],
+ ret,
+ prefix=prefix)
+ # Number includes all python numbers types
+ # (float, int, long, complex, ...)
elif isinstance(ret, Number):
- out += '{0}{1}{2}{3}{4}\n'.format(
- ' ' * indent,
- self.colors['YELLOW'],
- prefix,
- ret,
- self.colors['ENDC'])
- elif isinstance(ret, basestring):
- lines = ret.split('\n')
+ out += self.ustring(
+ ' ' * indent,
+ self.colors['YELLOW'],
+ ret,
+ prefix=prefix)
+ elif isinstance(ret, string_types):
+ lines = re.split(r'\r?\n', ret)
for line in lines:
- out += '{0}{1}{2}{3}{4}\n'.format(
- ' ' * indent,
- self.colors['GREEN'],
- prefix,
- line,
- self.colors['ENDC'])
+ out += self.ustring(
+ ' ' * indent,
+ self.colors['GREEN'],
+ line,
+ prefix=prefix)
elif isinstance(ret, list) or isinstance(ret, tuple):
for ind in ret:
- if isinstance(ind, (list, tuple)):
- out += '{0}{1}|_{2}\n'.format(
- ' ' * indent,
- self.colors['GREEN'],
- self.colors['ENDC'])
- out = self.display(ind, indent + 2, '- ', out)
+ if isinstance(ind, (list, tuple, dict)):
+ out += self.ustring(' ' * indent,
+ self.colors['GREEN'],
+ '|_')
+ prefix = '' if isinstance(ind, dict) else '- '
+ out = self.display(ind, indent + 2, prefix, out)
else:
out = self.display(ind, indent, '- ', out)
elif isinstance(ret, dict):
if indent:
- out += '{0}{1}{2}{3}\n'.format(
- ' ' * indent,
- self.colors['CYAN'],
- '-' * 10,
- self.colors['ENDC'])
+ out += self.ustring(
+ ' ' * indent,
+ self.colors['CYAN'],
+ '-' * 10)
for key in sorted(ret):
val = ret[key]
- out += '{0}{1}{2}{3}{4}:\n'.format(
- ' ' * indent,
- self.colors['CYAN'],
- prefix,
- key,
- self.colors['ENDC'])
+ out += self.ustring(
+ ' ' * indent,
+ self.colors['CYAN'],
+ key,
+ suffix=":",
+ prefix=prefix)
out = self.display(val, indent + 4, '', out)
return out
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/pillar/__init__.py new/salt-2014.1.13/salt/pillar/__init__.py
--- old/salt-2014.1.11/salt/pillar/__init__.py 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/salt/pillar/__init__.py 2014-10-15 17:21:54.000000000 +0200
@@ -480,18 +480,18 @@
def ext_pillar(self, pillar, pillar_dirs):
'''
- Render the external pillar data
+ Render the external pillar data, and merge with pillar data
'''
if 'ext_pillar' not in self.opts:
- return {}
+ return pillar
if not isinstance(self.opts['ext_pillar'], list):
log.critical('The "ext_pillar" option is malformed')
- return {}
+ return pillar
ext = None
for run in self.opts['ext_pillar']:
if not isinstance(run, dict):
log.critical('The "ext_pillar" option is malformed')
- return {}
+ return pillar
for key, val in run.items():
if key not in self.ext_pillars:
err = ('Specified ext_pillar interface {0} is '
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/state.py new/salt-2014.1.13/salt/state.py
--- old/salt-2014.1.11/salt/state.py 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/salt/state.py 2014-10-15 17:21:54.000000000 +0200
@@ -752,12 +752,15 @@
errors.append('High data is not a dictionary and is invalid')
reqs = {}
for name, body in high.items():
- if name.startswith('__'):
- continue
+ try:
+ if name.startswith('__'):
+ continue
+ except AttributeError:
+ pass
if not isinstance(name, string_types):
err = ('The name {0} in sls {1} is not formed as a '
- 'string but is a {2}').format(
- name, body['__sls__'], type(name))
+ 'string but is a {2}. It may need to be quoted.'
+ .format(name, body['__sls__'], type(name)))
errors.append(err)
if not isinstance(body, dict):
err = ('The type {0} in {1} is not formated as a dictionary'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/states/module.py new/salt-2014.1.13/salt/states/module.py
--- old/salt-2014.1.11/salt/states/module.py 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/salt/states/module.py 2014-10-15 17:21:54.000000000 +0200
@@ -11,7 +11,7 @@
mine.send:
module.run:
- - func: network.interfaces
+ - name: network.interfaces
Note that this example is probably unnecessary to use in practice, since the
``mine_functions`` and ``mine_interval`` config parameters can be used to
@@ -25,7 +25,7 @@
mine.send:
module.wait:
- - func: network.interfaces
+ - name: network.interfaces
- watch:
- file: /etc/network/interfaces
@@ -200,7 +200,7 @@
returners[kwargs['returner']](ret_ret)
ret['comment'] = 'Module function {0} executed'.format(name)
ret['result'] = True
- if ret['changes'].get('retcode', 0) != 0:
+ if ret['changes'].get('ret', {}).get('retcode', 0) != 0:
ret['result'] = False
return ret
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/templates/rh_ip/rh7_eth.jinja new/salt-2014.1.13/salt/templates/rh_ip/rh7_eth.jinja
--- old/salt-2014.1.11/salt/templates/rh_ip/rh7_eth.jinja 1970-01-01 01:00:00.000000000 +0100
+++ new/salt-2014.1.13/salt/templates/rh_ip/rh7_eth.jinja 2014-10-03 22:21:37.000000000 +0200
@@ -0,0 +1,30 @@
+DEVICE="{{name}}"
+{% if addr %}HWADDR="{{addr}}"
+{%endif%}{% if userctl %}USERCTL="{{userctl}}"
+{%endif%}{% if master %}MASTER="{{master}}"
+{%endif%}{% if slave %}SLAVE="{{slave}}"
+{%endif%}{% if vlan %}VLAN="{{vlan}}"
+{%endif%}{% if devtype %}TYPE="{{devtype}}"
+{%endif%}{% if proto %}BOOTPROTO="{{proto}}"
+{%endif%}{% if onboot %}ONBOOT="{{onboot}}"
+{%endif%}{% if onparent %}ONPARENT={{onparent}}
+{%endif%}{% if ipaddr %}IPADDR="{{ipaddr}}"
+{%endif%}{% if netmask %}NETMASK="{{netmask}}"
+{%endif%}{% if gateway %}GATEWAY="{{gateway}}"
+{%endif%}{% if enable_ipv6 %}IPV6INIT="yes"
+{% if ipv6_autoconf %}IPV6_AUTOCONF="{{ipv6_autoconf}}"
+{%endif%}{% if ipv6addr %}IPV6ADDR="{{ipv6addr}}"
+{%endif%}{% if ipv6gateway %}IPV6_DEFAULTGW="{{ipv6gateway}}"
+{%endif%}{%endif%}{% if srcaddr %}SRCADDR="{{srcaddr}}"
+{%endif%}{% if peerdns %}PEERDNS="{{peerdns}}"
+{%endif%}{% if defroute %}DEFROUTE="{{defroute}}"
+{%endif%}{% if bridge %}BRIDGE="{{bridge}}"
+{%endif%}{% if delay %}DELAY="{{delay}}"
+{%endif%}{% if my_inner_ipaddr %}MY_INNER_IPADDR={{my_inner_ipaddr}}
+{%endif%}{% if my_outer_ipaddr %}MY_OUTER_IPADDR={{my_outer_ipaddr}}
+{%endif%}{%if bonding %}BONDING_OPTS="{%for item in bonding %}{{item}}={{bonding[item]}} {%endfor%}"
+{%endif%}{% if ethtool %}ETHTOOL_OPTS="{%for item in ethtool %}{{item}} {{ethtool[item]}} {%endfor%}"
+{%endif%}{% if domain %}DOMAIN="{{ domain|join(' ') }}"
+{% endif %}{% for server in dns -%}
+DNS{{loop.index}}="{{server}}"
+{% endfor -%}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/salt/utils/cloud.py new/salt-2014.1.13/salt/utils/cloud.py
--- old/salt-2014.1.11/salt/utils/cloud.py 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/salt/utils/cloud.py 2014-10-15 17:21:54.000000000 +0200
@@ -391,7 +391,7 @@
log.debug('Using {0} as the key_filename'.format(key_filename))
elif password:
kwargs['password'] = password
- log.debug('Using password authentication'.format(password))
+ log.debug('Using password authentication')
trycount += 1
log.debug(
@@ -629,12 +629,12 @@
# Minion configuration
if minion_pem:
- scp_file('{0}/minion.pem'.format(tmp_dir), minion_pem, kwargs)
+ sftp_file('{0}/minion.pem'.format(tmp_dir), minion_pem, kwargs)
root_cmd('chmod 600 {0}/minion.pem'.format(tmp_dir),
tty, sudo, **kwargs)
if minion_pub:
- scp_file('{0}/minion.pub'.format(tmp_dir), minion_pub, kwargs)
+ sftp_file('{0}/minion.pub'.format(tmp_dir), minion_pub, kwargs)
if minion_conf:
if not isinstance(minion_conf, dict):
@@ -647,12 +647,12 @@
)
minion_grains = minion_conf.pop('grains', {})
if minion_grains:
- scp_file(
+ sftp_file(
'{0}/grains'.format(tmp_dir),
salt_config_to_yaml(minion_grains),
kwargs
)
- scp_file(
+ sftp_file(
'{0}/minion'.format(tmp_dir),
salt_config_to_yaml(minion_conf),
kwargs
@@ -660,12 +660,12 @@
# Master configuration
if master_pem:
- scp_file('{0}/master.pem'.format(tmp_dir), master_pem, kwargs)
+ sftp_file('{0}/master.pem'.format(tmp_dir), master_pem, kwargs)
root_cmd('chmod 600 {0}/master.pem'.format(tmp_dir),
tty, sudo, **kwargs)
if master_pub:
- scp_file('{0}/master.pub'.format(tmp_dir), master_pub, kwargs)
+ sftp_file('{0}/master.pub'.format(tmp_dir), master_pub, kwargs)
if master_conf:
if not isinstance(master_conf, dict):
@@ -677,7 +677,7 @@
'Loading from YAML ...'
)
- scp_file(
+ sftp_file(
'{0}/master'.format(tmp_dir),
salt_config_to_yaml(master_conf),
kwargs
@@ -709,7 +709,7 @@
rpath = os.path.join(
preseed_minion_keys_tempdir, minion_id
)
- scp_file(rpath, minion_key, kwargs)
+ sftp_file(rpath, minion_key, kwargs)
if kwargs['username'] != 'root':
root_cmd(
@@ -721,7 +721,7 @@
# The actual deploy script
if script:
- scp_file('{0}/deploy.sh'.format(tmp_dir), script, kwargs)
+ sftp_file('{0}/deploy.sh'.format(tmp_dir), script, kwargs)
root_cmd('chmod +x {0}/deploy.sh'.format(tmp_dir),
tty, sudo, **kwargs)
@@ -778,7 +778,7 @@
environ_script_contents.append(deploy_command)
# Upload our environ setter wrapper
- scp_file(
+ sftp_file(
'{0}/environ-deploy-wrapper.sh'.format(tmp_dir),
'\n'.join(environ_script_contents),
kwargs
@@ -975,7 +975,7 @@
log.debug('Uploading file(PID {0}): {1!r}'.format(proc.pid, dest_path))
sent_password = 0
- while proc.isalive():
+ while True:
stdout, stderr = proc.recv()
if stdout and SSH_PASSWORD_PROMP_RE.match(stdout):
if sent_password > 2:
@@ -983,15 +983,100 @@
log.warning(
'Asking for password again. Wrong one provided???'
)
- proc.terminate()
return 1
proc.sendline(kwargs['password'])
sent_password += 1
-
+ if not proc.isalive():
+ break
time.sleep(0.025)
+ if (proc.exitstatus != 0) and (allow_failure is False):
+ raise SaltCloudSystemExit(
+ 'Failed to upload {0} to {1}. Exit code: {2}'.format(
+ tmppath, dest_path, proc.exitstatus
+ )
+ )
+ return proc.exitstatus
+ except vt.TerminalException as err:
+ log.error(
+ 'Failed to upload file {0!r}: {1}\n'.format(
+ dest_path, err
+ ),
+ exc_info=True
+ )
+ finally:
proc.close(force=True)
- if allow_failure is False:
+
+ # Signal an error
+ return 1
+
+
+def sftp_file(dest_path, contents, kwargs, allow_failure=False):
+ '''
+ Use sftp to upload a file to a server
+ '''
+ tmpfh, tmppath = tempfile.mkstemp()
+ with salt.utils.fopen(tmppath, 'w') as tmpfile:
+ tmpfile.write(contents)
+
+ log.debug('Uploading {0} to {1} (scp)'.format(dest_path, kwargs['hostname']))
+
+ ssh_args = [
+ # Don't add new hosts to the host key database
+ '-oStrictHostKeyChecking=no',
+ # Set hosts key database path to /dev/null, ie, non-existing
+ '-oUserKnownHostsFile=/dev/null',
+ # Don't re-use the SSH connection. Less failures.
+ '-oControlPath=none'
+ ]
+ if 'key_filename' in kwargs:
+ # There should never be both a password and an ssh key passed in, so
+ ssh_args.extend([
+ # tell SSH to skip password authentication
+ '-oPasswordAuthentication=no',
+ '-oChallengeResponseAuthentication=no',
+ # Make sure public key authentication is enabled
+ '-oPubkeyAuthentication=yes',
+ # No Keyboard interaction!
+ '-oKbdInteractiveAuthentication=no',
+ # Also, specify the location of the key file
+ '-i {0}'.format(kwargs['key_filename'])
+ ])
+
+ cmd = 'echo "put {0} {1}" | sftp {2} {3[username]}@{3[hostname]}'.format(
+ tmppath, dest_path, ' '.join(ssh_args), kwargs
+ )
+
+ log.debug('Upload file command command: {0!r}'.format(cmd))
+
+ try:
+ proc = vt.Terminal(
+ cmd,
+ shell=True,
+ log_stdout=True,
+ log_stderr=True,
+ stream_stdout=kwargs.get('display_ssh_output', True),
+ stream_stderr=kwargs.get('display_ssh_output', True)
+ )
+ log.debug('Uploading file(PID {0}): {1!r}'.format(proc.pid, dest_path))
+
+ sent_password = 0
+ while True:
+ stdout, stderr = proc.recv()
+ if stdout and SSH_PASSWORD_PROMP_RE.match(stdout):
+ if sent_password > 2:
+ # 3rd time??? Wrong password?
+ log.warning(
+ 'Asking for password again. Wrong one provided???'
+ )
+ return 1
+
+ proc.sendline(kwargs['password'])
+ sent_password += 1
+ if not proc.isalive():
+ break
+ time.sleep(0.025)
+ if allow_failure is False and proc.exitstatus != 0:
raise SaltCloudSystemExit(
'Failed to upload {0} to {1}. Exit code: {2}'.format(
tmppath, dest_path, proc.exitstatus
@@ -1005,6 +1090,8 @@
),
exc_info=True
)
+ finally:
+ proc.close(force=True)
# Signal an error
return 1
@@ -1127,7 +1214,7 @@
)
sent_password = False
- while proc.isalive():
+ while True:
stdout, stderr = proc.recv()
if stdout and SSH_PASSWORD_PROMP_RE.match(stdout):
if sent_password:
@@ -1135,15 +1222,14 @@
log.warning(
'Asking for password again. Wrong one provided???'
)
- proc.terminate()
return 1
proc.sendline(kwargs['password'])
sent_password = True
+ if not proc.isalive():
+ break
time.sleep(0.025)
-
- proc.close(force=True)
return proc.exitstatus
except vt.TerminalException as err:
log.error(
@@ -1152,6 +1238,8 @@
),
exc_info=True
)
+ finally:
+ proc.close(force=True)
# Signal an error
return 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/tests/integration/files/file/base/dest_sym new/salt-2014.1.13/tests/integration/files/file/base/dest_sym
--- old/salt-2014.1.11/tests/integration/files/file/base/dest_sym 2014-06-17 21:18:30.000000000 +0200
+++ new/salt-2014.1.13/tests/integration/files/file/base/dest_sym 2014-10-23 14:21:20.000000000 +0200
@@ -0,0 +1 @@
+symbolic link to source_sym
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/salt-2014.1.11/tests/integration/states/pkg.py new/salt-2014.1.13/tests/integration/states/pkg.py
--- old/salt-2014.1.11/tests/integration/states/pkg.py 2014-09-09 22:42:17.000000000 +0200
+++ new/salt-2014.1.13/tests/integration/states/pkg.py 2014-10-15 17:21:54.000000000 +0200
@@ -229,6 +229,11 @@
os_name = grains.get('os', '')
target = _PKG_TARGETS_32.get(os_name, '')
+ if os_name == 'CentOS' and grains['osrelease'].startswith('6'):
+ self.skipTest(
+ 'This test is running unreliably on CentOS 6. Skipping.'
+ )
+
# _PKG_TARGETS_32 is only populated for platforms for which Salt has to
# munge package names for 32-bit-on-x86_64 (Currently only Ubuntu and
# RHEL-based). Don't actually perform this test on other platforms.
++++++ use-forking-daemon.patch ++++++
--- /var/tmp/diff_new_pack.WFclNl/_old 2014-10-23 14:21:21.000000000 +0200
+++ /var/tmp/diff_new_pack.WFclNl/_new 2014-10-23 14:21:21.000000000 +0200
@@ -1,7 +1,7 @@
Index: salt-2014.1.8/pkg/salt-master.service
===================================================================
---- salt-2014.1.11.orig/pkg/salt-master.service
-+++ salt-2014.1.11/pkg/salt-master.service
+--- salt-2014.1.13.orig/pkg/salt-master.service
++++ salt-2014.1.13/pkg/salt-master.service
@@ -3,8 +3,10 @@ Description=The Salt Master Server
After=syslog.target network.target
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org