-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] systemd offline when restarting service on OpenSUSE MicroOS #62311
Comments
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
It works when removing transactional_update module executor and using direct_call only. ( The list of modules delegated to be routed via transactional_update executor does not contain service/system, but contains cmd which systemd module uses to check wether systemd is online/offline.
|
@meaksh @agraul @vzhestkov Maybe you can chime in here too? I stumbled across this by accident too. |
In "transactional systems", like OpenSUSE MicroOS, the "transactional_update" executor is enabled by default in the minion configuration. This means all Salt actions are, by default, processed by this executor (unless you pass This "transactional update" executor implements a map of Salt functions (module.name) and also execution modules that have to be executed using a special wrapper function (implemented in the transactional update module) in order to make the execution to happen in a separated transaction (not in the running system which is readonly). Important thing to notice is that, the Now, with that said, there are some Salt states modules, and execution modules, that are not expected to work in this context (when running inside transaction) as, for example, DBUS is not available inside the new transaction. Particularly, looking at your SLS, the In any case your desire and your SLS is expected to run on the running system (not in a transaction), then I guess you should call
Hth! |
Thanks @meaksh - I agree, it actually does make sense when you consider /etc, configuration, service-state etc. as part of the "Immutability". I can't speak to whether that is the "mainstream" perception among MicroOS users, but I'll bite. |
Hi,
And unfortunately,
It makes perfect sense that services cannot be started/stopped inside the transactional update, however enabling/disabling should be possible, given that merely translating to placing/removing symlinks in /etc. Is this a bug / missing feature or am I missing some option? Ugly workaround:
|
Hi @tacerus, Another workaround could be:
Hth! |
Hi @meaksh, thanks for getting back! Your workaround sounds like a good alternative as well. I understand the DBus limitation, but it's unfortunate that this does not scale, as many existing Salt states (for example, ones shipped with the popular formulas) do not implement such special handling for transactional systems and require custom patching. Would it make sense to implement such special handling inside the execution and state modules instead? For example, in addition to an |
This allows the Salt Minion to be enabled on transactional systems. Should be moved to the infrastructure.salt formula if needed on more ems. saltstack/salt#62311 (comment) Signed-off-by: Georg Pfuetzenreuter <[email protected]>
Salt 3004+ introduced additional systemctl checks for it service module, which is not compatible with the systemctl we have on YARN images. As a workaround, these were replaced with equivalent cmd.run commands for YARN images. Similar issue with the suggested workaround: saltstack/salt#62311 (comment)
Salt 3004+ introduced additional systemctl checks for it service module, which is not compatible with the systemctl we have on YARN images. As a workaround, these were replaced with equivalent cmd.run commands for YARN images. Similar issue with the suggested workaround: saltstack/salt#62311 (comment)
Salt 3004+ introduced additional systemctl checks for it service module, which is not compatible with the systemctl we have on YARN images. As a workaround, these were replaced with equivalent cmd.run commands for YARN images. Similar issue with the suggested workaround: saltstack/salt#62311 (comment) Also had to bump Salt version to 3006.5: saltstack/salt#65114 (comment)
Salt 3004+ introduced additional systemctl checks for it service module, which is not compatible with the systemctl we have on YARN images. As a workaround, these were replaced with equivalent cmd.run commands for YARN images. Similar issue with the suggested workaround: saltstack/salt#62311 (comment) Also had to bump Salt version to 3006.5: saltstack/salt#65114 (comment)
Salt 3004+ introduced additional systemctl checks for it service module, which is not compatible with the systemctl we have on YARN images. As a workaround, these were replaced with equivalent cmd.run commands for YARN images. Similar issue with the suggested workaround: saltstack/salt#62311 (comment) Also had to bump Salt version to 3006.5: saltstack/salt#65114 (comment)
Description
Modifying a config-file and restarting a systemd-service when that config-file changes (ip6tables in this case) gives systemd offline error once the service-restart is triggered.
Setup
Both salt-master and minion runs on OpenSUSE MicroOS (Immutable)
Steps to Reproduce the behavior
Statefile
systemd-service
Output/Error when running state (and config-file being changed)
Expected behavior
Service being restarted
Versions Report
Additional context
I think I'm hitting this error:
https://github.com/saltstack/salt/blob/master/salt/modules/systemd_service.py#L104
which, accodring to [1], should be equal to running
If I understand correct it somehow returns True when being triggered by the watch/file-change, which results in the error.
I suspect it might have something to do with running on OpenSuSE MicroOS (immutable, but /etc should be writeable). The offline-check seems new (based on source history) in version 3004 which, in release notes[1], mentions exactly MicroOS, but only around transactional-update / reboot.
[0]
salt/salt/modules/systemd_service.py
Line 1465 in e68cd5e
[1] https://docs.saltproject.io/en/latest/topics/releases/3004.html#release-3004
The text was updated successfully, but these errors were encountered: