salt-bootstrap icon indicating copy to clipboard operation
salt-bootstrap copied to clipboard

-X doesn't work on ubuntu

Open whytewolf opened this issue 7 years ago • 15 comments

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

whytewolf avatar Dec 28 '17 17:12 whytewolf

Thanks @whytewolf - I have marked this as a feature request.

rallytime avatar Jan 22 '18 17:01 rallytime

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.

stale[bot] avatar Jul 23 '18 18:07 stale[bot]

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

whytewolf avatar Jul 23 '18 19:07 whytewolf

Thank you for updating this issue. It is no longer marked as stale.

stale[bot] avatar Jul 23 '18 19:07 stale[bot]

This is still an issue as of v2018.3.3 and request for this feature in 2019.

alan-cugler avatar Jan 18 '19 17:01 alan-cugler

This is not currently assigned to anyone so if someone wants to grab it please feel free to submit a PR

Ch3LL avatar Jan 24 '19 15:01 Ch3LL

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.

stale[bot] avatar Jul 25 '19 15:07 stale[bot]

This is feasible to implement, I would like to allocate some time to it.

vutny avatar Jul 29 '19 08:07 vutny

Thank you for updating this issue. It is no longer marked as stale.

stale[bot] avatar Jul 29 '19 08:07 stale[bot]

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.

xpicio avatar Oct 02 '19 15:10 xpicio

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.

stale[bot] avatar Apr 01 '20 15:04 stale[bot]

This would still be a good feature

whytewolf avatar Apr 01 '20 16:04 whytewolf

Thank you for updating this issue. It is no longer marked as stale.

stale[bot] avatar Apr 01 '20 16:04 stale[bot]

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.

wolfpackmars2 avatar Jun 11 '20 02:06 wolfpackmars2

Any update on this?

Z10N0110 avatar Nov 03 '23 06:11 Z10N0110