mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
336fbb03bc
* Fix master hanging after a request from minion with removed key. (#33333) * ZMQ monitor for MWorker connections. * Reauth minion if the key was removed on the master side. * Allow concurrency mode in state runs if using sudo (#33325) Closes #30130 * Disambiguate non-exact matches when checking if sysv service is enabled (#33324) Fixes #33323 * remove redundant, incorrect sudo_runas config documentation (#33318) * remove sudo_runas documentation `sudo_runas` was renamed to `sudo_user` and the documentation was not updated accordingly. * conf/minion: update sudo_user description The description from sudo_runas was better. * import ps from psutil_compat in beacons (#33334) * beacons.network_info: import gate psutil * beacons.ps: import gate psutil * Add docs for mine_functions config var (#33326) * Add docs for mine_functions config var * Note that mine_enabled essentially just doesn't add the mine update function to the scheduler. * Bp 28467 calm mine (#33327) * make minion mine update behavior more configurable * Add docs for mine_functions config var * Remove config dup from mine config options Refs #28467 * 2015.8 does not have _DFLT_MULTIPROCESSING_MODE * This won't be in until 2015.8.10. * Fix network.managed for windows (#33312) * Fix some link errors in the test writing tutorial (#33347) * Describes parameters in register_instances function (#33339) * Fix UnboundLocalError in git.latest (#33340) Resolves #32260. * Expanded documentation for boto_elb state and module (#33341) * Describes what happens when the CNAME parameter is given. * Describes what the recognized attributes are for for ELBs. * Properly detect newer Linux Mint distros (#33359) * Properly detect newer Linux Mint distros LMDE 2 and Linux Mint 17.3 changed the DISTRIB_ID in /etc/lsb-release to ``LinuxMint``, breaking OS detection for these distros. This commit fixes that by adding an entry to the OS_NAME_MAP in the core grains. * Remove LinuxMint os_family from aptpkg.py It is no longer necessary as the distro is now detected properly, which will lead to an os_family of Debian. * Update job_cache and keep_jobs docs to be more specific to their behavior (#33328) * Update job_cache and keep_jobs docs to be more specific to their behavior Also fixed a bug discovered when investigating job_cache/keep_jobs functionality where the jid directory and files were removed by the cache cleaner, but not the original jid clash detection directory created in /var/cache/salt/master/jobs/. Fixes #29286 * Add testcase for the changes in the local_cache.clean_old_jobs func * Mark tests as destructive * Put destructive test decorator in correct location * Remove mentions of windows not supporting pkgs param (#33361) Fixes #33313 * Updates docs version to 2015.8.9 Adds note regarding the os grain on Mint Linux Adds an FAQ regarding grains that change due to upstream changes * revved 2015.8 branch to .9 in version selector * Add initscripts, SystemD service units and environment files for Debian (#32857) * Add note to docs about api settings for Hipchat API v2 (#33365) Fixes #27779 * Add win_pkg to list of modules that support "version" in pkg.installed (#33362) Fixes #32913 * Add note about name parameter in git_pillar docs (#33369) Fixes #27737 * Better YAML syntax error handling (#33375) Closes #26574 * Improve doc clarity for disable_modules documentation (#33379) * Improve doc clarity for disable_modules documentation * Additional clarification on blacklisted name * maintain the fallabck because I am totally sick of this crap * blast, put the try/except int he right place * restore whitespace * Fix traceback in logging for config validation (#33386) * 2015.8.10 release notes * Sync pillarstack to latest upstream version (#33391) * Don't lay down all available opts (#33385) * Don't lay down all available opts * We need at least one opt in there * Condense defaults * Put the default hash type back
108 lines
2.9 KiB
Bash
Executable File
108 lines
2.9 KiB
Bash
Executable File
#!/bin/sh
|
|
### BEGIN INIT INFO
|
|
# Provides: salt-minion
|
|
# Required-Start: $remote_fs $network
|
|
# Required-Stop: $remote_fs $network
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 1 6
|
|
# Short-Description: The Salt Minion daemon
|
|
# Description: The Salt Minion is the agent component of Salt. It listens
|
|
# for instructions from the Master, runs jobs, and returns
|
|
# results back to the Salt Master
|
|
### END INIT INFO
|
|
|
|
# Author: Michael Prokop <mika@debian.org>
|
|
|
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
|
DESC="The Salt Minion daemon"
|
|
NAME=salt-minion
|
|
DAEMON=/usr/bin/salt-minion
|
|
DAEMON_ARGS="-d"
|
|
PIDFILE=/var/run/$NAME.pid
|
|
SCRIPTNAME=/etc/init.d/$NAME
|
|
|
|
# Exit if the package is not installed
|
|
[ -x "$DAEMON" ] || exit 0
|
|
|
|
# Read configuration variable file if it is present
|
|
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
|
|
|
. /lib/lsb/init-functions
|
|
|
|
do_start() {
|
|
# Return
|
|
# 0 if daemon has been started
|
|
# 1 if daemon was already running
|
|
# 2 if daemon could not be started
|
|
pid=$(pidofproc -p $PIDFILE $DAEMON)
|
|
if [ -n "$pid" ] ; then
|
|
return 1
|
|
fi
|
|
|
|
start-stop-daemon --start --quiet --background --pidfile $PIDFILE --exec $DAEMON -- \
|
|
$DAEMON_ARGS \
|
|
|| return 2
|
|
}
|
|
|
|
do_stop() {
|
|
# Return
|
|
# 0 if daemon has been stopped
|
|
# 1 if daemon was already stopped
|
|
# 2 if daemon could not be stopped
|
|
# other if a failure occurred
|
|
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
|
|
RETVAL="$?"
|
|
[ "$RETVAL" = 2 ] && return 2
|
|
rm -f $PIDFILE
|
|
return "$RETVAL"
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
|
do_start
|
|
case "$?" in
|
|
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
|
esac
|
|
;;
|
|
stop)
|
|
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
|
do_stop
|
|
case "$?" in
|
|
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
|
esac
|
|
;;
|
|
status)
|
|
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
|
;;
|
|
#reload)
|
|
# not implemented
|
|
#;;
|
|
restart|force-reload)
|
|
log_daemon_msg "Restarting $DESC" "$NAME"
|
|
do_stop
|
|
case "$?" in
|
|
0|1)
|
|
do_start
|
|
case "$?" in
|
|
0) log_end_msg 0 ;;
|
|
1) log_end_msg 1 ;; # Old process is still running
|
|
*) log_end_msg 1 ;; # Failed to start
|
|
esac
|
|
;;
|
|
*)
|
|
# Failed to stop
|
|
log_end_msg 1
|
|
;;
|
|
esac
|
|
;;
|
|
*)
|
|
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
|
exit 3
|
|
;;
|
|
esac
|
|
|
|
exit 0
|