salt-bootstrap
salt-bootstrap copied to clipboard
-X doesn't work on ubuntu
Description of Issue/Question
Because deb and ubuntu both autostart after installation. This can cause all sorts of issues with autostarted minions when config has not been completed yet. and when working with kitchen-salt can cause no end of headaches. it would be nice if -X worked with ubuntu, instead of just displaying a warning that it doesn't work.
on ubuntu 14.04 and earlier this behavior can be disabled with
echo 'manual' > /etc/init/salt-minion.override
on ubuntu 16.04 and later since they switched to systemd masking can be used.
ln -s /dev/null /etc/systemd/system/salt-minion.service
Setup
ubuntu 14.04, 16.04
Steps to Reproduce Issue
run the bootstrap on ubuntu any version with -X and then check to see if salt-minion is running.
Versions and Systems
I, [2017-12-28T08:42:22.962575 #8615] INFO -- default-ubuntu-trusty64: * INFO: Running version: 2017.12.13
I, [2017-12-28T08:42:22.962848 #8615] INFO -- default-ubuntu-trusty64: * INFO: Executed by: sh
I, [2017-12-28T08:42:22.963073 #8615] INFO -- default-ubuntu-trusty64: * INFO: Command line: '/tmp/bootstrap-salt.sh -D -X stable 2017.7.2'
I, [2017-12-28T08:42:23.078223 #8615] INFO -- default-ubuntu-trusty64:
I, [2017-12-28T08:42:23.078530 #8615] INFO -- default-ubuntu-trusty64: * INFO: System Information:
I, [2017-12-28T08:42:23.078781 #8615] INFO -- default-ubuntu-trusty64: * INFO: CPU: GenuineIntel
I, [2017-12-28T08:42:23.078988 #8615] INFO -- default-ubuntu-trusty64: * INFO: CPU Arch: x86_64
I, [2017-12-28T08:42:23.079211 #8615] INFO -- default-ubuntu-trusty64: * INFO: OS Name: Linux
I, [2017-12-28T08:42:23.079415 #8615] INFO -- default-ubuntu-trusty64: * INFO: OS Version: 3.13.0-137-generic
I, [2017-12-28T08:42:23.079662 #8615] INFO -- default-ubuntu-trusty64: * INFO: Distribution: Ubuntu 14.04
I, [2017-12-28T08:44:07.593743 #8615] INFO -- default-ubuntu-xenial64: * INFO: Running version: 2017.12.13
I, [2017-12-28T08:44:07.593809 #8615] INFO -- default-ubuntu-xenial64: * INFO: Executed by: sh
I, [2017-12-28T08:44:07.593836 #8615] INFO -- default-ubuntu-xenial64: * INFO: Command line: '/tmp/bootstrap-salt.sh -D -X stable 2017.7.2'
I, [2017-12-28T08:44:07.714634 #8615] INFO -- default-ubuntu-xenial64:
I, [2017-12-28T08:44:07.714719 #8615] INFO -- default-ubuntu-xenial64: * INFO: System Information:
I, [2017-12-28T08:44:07.714763 #8615] INFO -- default-ubuntu-xenial64: * INFO: CPU: GenuineIntel
I, [2017-12-28T08:44:07.714843 #8615] INFO -- default-ubuntu-xenial64: * INFO: CPU Arch: x86_64
I, [2017-12-28T08:44:07.714875 #8615] INFO -- default-ubuntu-xenial64: * INFO: OS Name: Linux
I, [2017-12-28T08:44:07.714903 #8615] INFO -- default-ubuntu-xenial64: * INFO: OS Version: 4.4.0-104-generic
I, [2017-12-28T08:44:07.714932 #8615] INFO -- default-ubuntu-xenial64: * INFO: Distribution: Ubuntu 16.04
Thanks @whytewolf - I have marked this as a feature request.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
I don't think this has seen the light of day yet. and would still be a good feature since Ubuntu and Debian still autostart
Thank you for updating this issue. It is no longer marked as stale.
This is still an issue as of v2018.3.3 and request for this feature in 2019.
This is not currently assigned to anyone so if someone wants to grab it please feel free to submit a PR
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
This is feasible to implement, I would like to allocate some time to it.
Thank you for updating this issue. It is no longer marked as stale.
Is there any kind of workaround about that question ? Because i really need to preseed the minion with keys obtained from API https://salt-api-master.com/keys and the service should be stopped.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
This would still be a good feature
Thank you for updating this issue. It is no longer marked as stale.
Would systemd masking prevent the service from starting on reboot? the admin would need to remember to re-enable the service. would masking also prevent the admin from starting the service manually with systemctl?
I don't know enough about how systemctl works and its options, but maybe there's a cleaner way to prevent the service from automatically starting after the package is installed but still enabling the service?
More information here: https://major.io/2016/05/05/preventing-ubuntu-16-04-starting-daemons-package-installed/ and here (old): http://lifeonubuntu.com/how-to-prevent-server-daemons-from-starting-during-apt-get-install/
This might be doable by masking the services then before the bootstrapper exits, enabling the service. This might provide a better user experience. If the user reboots or tries to manually start the service, it will work without any errors.
Any update on this?