* * 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
This patch will use a new, "pending" computer name when joining a
Windows system to an Active Directory domain. This allows a user
to rename a computer, then join a domain, and the new computer
name will be used for the computer account. Without this patch,
the old computer name would be used for the domain computer account.
This flag has been tested to work even if the computer name is not
changing.
See https://msdn.microsoft.com/en-us/library/windows/desktop/aa370433(v=vs.85).aspx.
* Disallow negative value for fib number
Fibonacci number is supposed to be nonnegative. Add this new feature to
disallow negative value to be passed in for fib number.
* Minimize code duplication
* Use /etc/adjtime for Gentoo
* Add integration test for timezone module
* Fix servermanager module
- Added check for 2008 version of windows
- Added Import-Module ServerManager to _pshell_json.
Apparently this needs to run each time we issue a
servermanager command.
* Fix list_available
Method _finger_fail method from SAuth to AsyncAuth class to make method available
in both class and fix an issue where _finger_Fail is called inside AsyncAuth.
* Create win_functions utility
- Create win_verify_env to create directories for windows minion
and master. Uses functions from win_functions
- Fix stacktrace when minion starts when there's already a minion
running. os.getppid doesn't work in windows. Created a function
in win_functions to duplicate that functionality.
* Fix permissions for PKI dir
* Fix some lint issues
* Fix one more lint item
* Fix win_verify_env for tests
* Fix duplicate import, incorrect virtual name
* Fix permissions
salt/fileclient.py:
- For `RemoteClient.get_file`, sometimes `self.channel` is
a `salt.filesystem.FSChan` object. When this is the case, it is
not getting the data from a remote system, so the returned dict
keys are already string objects (as opposed to when getting them
remotely, the dict keys are bytes objects due to raw mode). To
account for this, convert all the top-level keys in the returned
dict to strings so that the logic may correctly process them.
Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
* salt-cloud: fix ipv6-only virtual machines
* fix hostname for rsync fallback in scp_file function
* use 4 spaces instead of 2
* remove global variable, use direct socket call instead