Commit Graph

129 Commits

Author SHA1 Message Date
Mike Place
4cd698ca33 Merge pull request #39104 from githubcdr/develop
Do not use name resolving for --notrim check
2017-02-01 11:25:27 -07:00
cDR
351c039257 Do not use name resolving for --notrim check
This causes a significant delay on servers with many open connections
2017-02-01 11:02:10 +01:00
rallytime
efb8a8ddf5 Merge branch '2016.3' into '2016.11'
Conflicts:
  - doc/ref/configuration/minion.rst
  - salt/config/__init__.py
  - salt/minion.py
2016-12-22 10:39:14 -07:00
Michael Calmer
de6ec05ec0 add try-restart to fix autorestarting on SUSE systems 2016-12-21 10:31:18 +00:00
Denys Havrysh
c94e798b8a SysV init script for rpm: get and show unique PIDs only 2016-12-14 12:31:42 +02:00
Denys Havrysh
8ff68c4128 Fix initscript for RHEL5 (SysV) to pick up proper python version 2016-11-29 16:23:48 +02:00
rallytime
3b56f8bce1 Merge branch '2016.3' into 'carbon'
Conflicts:
  - doc/topics/event/master_events.rst
2016-11-07 08:13:57 -07:00
Michael Calmer
1fb2c4dfcf fix status handling in sysv init scripts 2016-11-06 18:49:12 +01:00
Thayne Harbaugh
aab8e23975 Minor tweaks/improvements to the salt-minion SysV init script.
* Test "reload" before probing minion configuration
* change indent
2016-07-28 12:12:45 -06:00
plastikos
0efbbcd17f * Improve init script: specifically manage salt configurations rather than arbitrary salt processes (#32666)
* * Improve init script: specifically manage salt configurations rather than arbitrary salt processes

Unfortunately SysV init scripts tend to rummage through PIDs filtering for
appropriate processes to manage.  Unfortunately the filters are usually weak
and don't account for similar processes run by other users, PIDs of dead
processes being re-used for completely different executables, etc..  These
weaknesses can result in killing unrelated processes with potentially serious
results.

These improvements to the SysV init script is a complete rewrite with the
following improvements:

  * Specifically manage individual salt configurations rather than looking for
    salt minion-like processes.
  * Obtain salt minion information from the salt configuration - use the
    information to manage the specifically configured process.
  * Drop all of the platform-specific helper functions that allow the
    previously-mentioned weaknesses.

    + Unfortunately this means that the output information may not match the
      specific platform (this could easily be corrected).

  * Now can manage multiple salt processes started by different users

    + Unfortunately starts/stops/restarts as a group and is unable to manage
      them both as a group or as individual processes (this could easily be
      corrected)

The new initscript also allows various control variables to be overridden by
environment variables or through settings put in ``/etc/sysconf/salt`` or
``/etc/default/salt``.

:SALTMINION_DEBUG: Dump each line expansion before execution, output system
                   information on failure.  Default: unset

:SALTMINION_BINDIR: Location of ``salt-minion``, ``salt-call`` and other
                    executables.  Default: ``/usr/bin``

:SALTMINION_SYSCONFDIR: The parent directory for the ``salt`` configuration
                        directory and the ``sysconfig`` or ``default``
                        directory.

* Add lines that went missing in the rebase+squash
2016-05-09 10:57:13 -07:00
Erik Johnson
764af33faf Add salt.bash symlink 2016-04-04 16:53:56 -05:00
rallytime
031a75ca33 Merge branch '2015.8' into '2016.3'
Conflicts:
  - Contributing.rst
  - conf/master
  - doc/index.rst
  - doc/man/salt.7
  - pkg/suse/README.suse
  - salt/client/ssh/state.py
  - salt/minion.py
  - salt/modules/zypper.py
  - salt/utils/schedule.py
  - tests/unit/modules/zypper_test.py
2016-03-02 10:26:13 -07:00
Denys Havrysh
bbcad93a8d Fix trailing white spaces in Salt PRM spec file 2016-03-02 10:42:00 +02:00
Denys Havrysh
fbfc3abccf Remove trailing white spaces in files under pkg/ dir 2016-03-01 17:37:18 +02:00
Craig Rodrigues
381e8cc144 Use print as a function [PEP 3105].
This reduces warnings from the 2to3 utility
and future proofs the code when it is time to move to Python 3.
2015-12-04 16:17:35 -08:00
Zach Malone
d8767959d6 Removing $? after "echo" for other startup scripts 2015-10-23 09:57:53 -06:00
Colton Myers
d3d0e004d9 Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    salt/minion.py
    salt/modules/gpg.py
    salt/modules/keystone.py
    salt/modules/pw_user.py
    salt/states/reg.py
    setup.py
2015-08-17 16:54:16 -06:00
Bastiaan Bakker
ec8d4b0470 test wether RETVAL is 0 with -eq rather than =. 2015-08-17 17:20:33 +02:00
Bastiaan Bakker
a83a5de41e fix issue #26161: on RedHat family systems touch /var/lock/subsys/$SERVICE to ensure the daemon will be stopped on shutdown. 2015-08-17 11:11:12 +02:00
Stephen Spencer
8483fd37b7 Old crufty patches 2015-03-27 15:48:26 -05:00
Stephen Spencer
88be7b38d6 This is the (RPM) spec file used by Erik Johnson for building EPEL
packages.

The only change:
avoid replacing the salt*.service files. Systemd ignores
/etc/security/limits*; it, instead, uses its own directives that are
required to exist in the service file itself.

See systemd.directives(7), systemd.exec(5), systemd-system.conf(5)
2015-03-27 15:26:32 -05:00
Stephen Spencer
ab4bd93576 The spec file for salt-api is anachronistic at this point 2015-03-27 15:20:46 -05:00
Erik Johnson
33a74e422e Update Fedora/RHEL spec for 2014.1.13 2014-10-17 10:46:14 -05:00
Erik Johnson
b18ae95f84 Update RPM spec for 2014.1.11 2014-10-01 18:35:23 -05:00
Thomas S Hatch
2f6ae96f37 Merge branch '2014.7' into develop
Conflicts:
	salt/client/ssh/__init__.py
2014-09-03 14:43:07 -06:00
Erik Johnson
cbdee403bd Add salt-api unit file symlink 2014-09-03 13:42:21 -05:00
Erik Johnson
17049624ea Fix incorrect conditional in spec 2014-08-10 12:20:30 -05:00
Erik Johnson
5f9931636a Deploy /var/cache/salt with common RPM
Also changed the deprecated $RPM_BUILD_ROOT to %{buildroot}.
2014-08-05 22:15:34 -05:00
Erik Johnson
670e315c19 Update RPM spec for 2014.1.10 2014-08-05 17:02:35 -05:00
Seth House
95f31c591d Fix 'stop' for RedHat salt-api init script 2014-07-21 20:46:26 -06:00
Erik Johnson
1197a06716 Update spec for 2014.1.7 2014-07-10 20:52:00 -06:00
Thomas S Hatch
199b2bc2a9 Merge pull request #13895 from jeteokeeffe/patch-2
Adding logrotate script for salt in rpm
2014-07-02 10:16:47 -06:00
Jete
31c3267e59 Adding logrotate script for salt in rpm 2014-07-01 17:05:27 -04:00
Jete
323de1e833 Adding logrotate file
Adding logrotate file for salt logs
2014-07-01 17:02:20 -04:00
bhepple
ed3166990c Update salt-minion
On our RHEL5 systems we're getting 2 and sometimes 3 or more salt-minions started. Somehow the check on /var/run/salt-minion.pid doesn't prevent this.

This patch stops the registered process and kills any further salt-minion processes, first trying -TERM and then -KILL signals.

It may be that other distros would like to use this same logic to tidy up, in which case the new code can be moved into place as appropriate.
2014-06-25 14:58:02 +10:00
Seth House
53bab586f4 Merged salt-api into Salt
Woot!

The conflicts below are intentional because they contained salt-api-isms
that needed to be included into the corresponding Salt files.

Conflicts:
	debian/changelog
	debian/control
	doc/conf.py
	doc/index.rst
	opt_requirements.txt
	salt/config.py
	salt/loader.py
2014-06-18 22:13:56 -06:00
Seth House
210ecf4a50 Moved salt-api.spec file to corresponding Salt-core directory 2014-06-18 19:25:56 -06:00
Erik Johnson
82960a7480 Update RPM spec for 2014.1.4 2014-05-10 00:06:33 -05:00
Erik Johnson
5ed7be5b2e Update spec file for 2014.1.3 2014-04-18 18:19:14 -05:00
Erik Johnson
3007e6882c Update spec file for 2014.1.0 2014-02-20 21:06:10 -06:00
Tom Atkinson
4c87afbdc8 Fix service restart over salt 2014-02-18 20:37:53 +01:00
Erik Johnson
708a95ddf4 Update RPM spec for 0.17.5 2014-01-27 15:54:26 -06:00
Nathan Rini
73a839d637 Fix bug to allow for multiple PIDs to be returned
Bug:
```
[root@pronghorn04 ~]# service salt-minion restart
Stopping salt-minion daemon:                               [  OK  ]
Starting salt-minion daemon: /etc/init.d/salt-minion: line 67: [: 22610:
unary operator expected
                                                           [  OK  ]
```

Traced bug:
```
++ pidof -c -o 21702 -o 21341 -o %PPID -x salt-minion
+ '[' 22610 7606 ']'
/etc/init.d/salt-minion: line 67: [: 22610: unary operator expected
```
2014-01-15 15:50:41 -07:00
Michael Birtwell
9100506a64 Fix pkg/rpm/build.py when it's a release candidate
Uses version.py to generate the complete version string
2014-01-09 15:45:40 -07:00
Michael Birtwell
ead7af6fa0 Correctly filter the rpm SOURCES 2014-01-09 15:45:33 -07:00
Damian Myerscough
65cde36f94 Fix #9511 multiple PID's cause unary operator expected 2014-01-06 19:46:33 +01:00
Damian Myerscough
c6ed4980dc Fix #9511 multiple PID's cause unary operator expected 2014-01-06 19:41:34 +01:00
Erik Johnson
9718b9d024 Update RPM spec for 0.17.4 2013-12-19 11:33:02 -06:00
Mathieu Le Marec - Pasquet
5f46962e80 pep8 fixes 2013-12-04 00:25:50 +00:00
Thomas S Hatch
ae06ed74b3 Minor clean up on convenience rpm building function 2013-12-02 11:10:03 -07:00