service.enabled broken on debian jessie/systemd

47 views
Skip to first unread message

Dmitry Golubenko

unread,
May 13, 2016, 1:52:44 AM5/13/16
to salt-...@googlegroups.com
hi All,

it seems service.enabled broken in 2015.8.8.2, this breaks - enable:
True in service states:

salt-call service.enabled cron
[INFO ] Determining pillar cache
[INFO ] Executing command ['systemctl', 'is-enabled', 'cron.service']
in directory '/root'
local:
True

salt-call service.disable cron
[INFO ] Determining pillar cache
[INFO ] Executing command ['systemctl', 'status', 'cron.service',
'-n', '0'] in directory '/root'
[INFO ] Executing command ['systemctl', 'disable', 'cron.service'] in
directory '/root'
local:
True

salt-call service.enabled cron
[INFO ] Determining pillar cache
[INFO ] Executing command ['systemctl', 'is-enabled', 'cron.service']
in directory '/root'
[INFO ] Executing command 'runlevel' in directory '/root'
local:
True

debug output:
salt-call service.enabled cron -l debug
.....
[DEBUG ] LazyLoaded service.enabled
[DEBUG ] LazyLoaded cmd.retcode
[INFO ] Executing command ['systemctl', 'is-enabled', 'cron.service']
in directory '/root'
[DEBUG ] output: disabled
[INFO ] Executing command 'runlevel' in directory '/root'
[DEBUG ] output: N 5
[DEBUG ] LazyLoaded nested.output
local:
True


so it clearly gets `disabled' from systemctl, but still returns True.


PS. anacron.service also present on that system possibly confusing
parsing for cron.service

David Boucha

unread,
May 16, 2016, 4:17:23 PM5/16/16
to salt users list
Hi, can you open a bug report on this on Github?  Thanks!


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Justin Anderson

unread,
May 16, 2016, 5:09:48 PM5/16/16
to Salt-users, dmitry.g...@xiag.ch
Hi Dmitry,

I looked through this and wasn't able to reproduce it on a fresh Debian 8 vm. From my end, it appears to be working correctly.

root@debian:~# salt-call service.enabled cron

[INFO    ] Determining pillar cache

[INFO    ] Executing command ['systemctl', 'is-enabled', 'cron.service'] in directory '/root'

local:

    True

root@debian:~# salt-call service.disable cron -l debug

[DEBUG   ] Reading configuration from /etc/salt/minion

[DEBUG   ] Including configuration from '/etc/salt/minion.d/_schedule.conf'

[DEBUG   ] Reading configuration from /etc/salt/minion.d/_schedule.conf

[DEBUG   ] Configuration file path: /etc/salt/minion

……

[DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'jutt_deb8_2', 'tcp://166.78.60.247:4506', 'aes')

[DEBUG   ] Initializing new SAuth for ('/etc/salt/pki/minion', 'jutt_deb8_2', 'tcp://166.78.60.247:4506')

[DEBUG   ] LazyLoaded nested.output

local:

    True

root@debian:~# salt-call service.enabled cron -l debug

[DEBUG   ] Reading configuration from /etc/salt/minion

[DEBUG   ] Including configuration from '/etc/salt/minion.d/_schedule.conf'

[DEBUG   ] Reading configuration from /etc/salt/minion.d/_schedule.conf

[DEBUG   ] Configuration file path: /etc/salt/minion

……

[DEBUG   ] LazyLoaded service.enabled

[DEBUG   ] LazyLoaded cmd.retcode

[INFO    ] Executing command ['systemctl', 'is-enabled', 'cron.service'] in directory '/root'

[DEBUG   ] output: disabled

[INFO    ] Executing command 'runlevel' in directory '/root'

[DEBUG   ] output: N 5

[DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'jutt_deb8_2', 'tcp://166.78.60.247:4506', 'aes')

[DEBUG   ] Initializing new SAuth for ('/etc/salt/pki/minion', 'jutt_deb8_2', 'tcp://166.78.60.247:4506')

[DEBUG   ] LazyLoaded nested.output

local:

    False



Is there anything different on your machine vs this one, other than anacron.service? 
salt --versions-report
Salt Version:
           Salt: 2015.8.8.2

Dependency Versions:
         Jinja2: 2.7.3
       M2Crypto: 0.21.1
           Mako: Not Installed
         PyYAML: 3.11
          PyZMQ: 14.4.0
         Python: 2.7.9 (default, Mar  1 2015, 12:57:24)
           RAET: Not Installed
        Tornado: 4.3
            ZMQ: 4.0.5
           cffi: 0.8.6
       cherrypy: Not Installed
       dateutil: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
        libgit2: Not Installed
        libnacl: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.2
   mysql-python: 1.2.3
      pycparser: 2.10
       pycrypto: 2.6.1
         pygit2: Not Installed
   python-gnupg: Not Installed
          smmap: Not Installed
        timelib: Not Installed

System Versions:
           dist: debian 8.3
        machine: x86_64
        release: 4.5.0-x86_64-linode65
         system: debian 8.3

Thanks

Dmitry Golubenko

unread,
May 16, 2016, 11:16:35 PM5/16/16
to salt-...@googlegroups.com
В Пнд, 16/05/2016 в 14:17 -0600, David Boucha пишет:
> Hi, can you open a bug report on this on Github? Thanks!
sorry, I do not have github account.

Dmitry Golubenko

unread,
May 16, 2016, 11:21:04 PM5/16/16
to Justin Anderson, salt-...@googlegroups.com
В Пнд, 16/05/2016 в 14:09 -0700, Justin Anderson пишет:
> Hi Dmitry,
Hi Justin,

>
>
> I looked through this and wasn't able to reproduce it on a fresh
> Debian 8 vm. From my end, it appears to be working correctly.
please install anacron package(I mentioned it in the bottom of original
message), it triggers parsing bug is service.enabled

I suspect parser founds enabled anacron.service matching cron.service
pattern and reports it as enabled

Justin Anderson

unread,
May 17, 2016, 4:02:19 PM5/17/16
to Salt-users, jand...@saltstack.com, dmitry.g...@xiag.ch
Hi Dmitry,

I missed that in the original posting you made. This does appear to be a bug somewhere. Would you like me to file a github bug for you? 

Erik Johnson

unread,
May 17, 2016, 4:33:52 PM5/17/16
to Salt-users, jand...@saltstack.com, dmitry.g...@xiag.ch

Dmitry Golubenko

unread,
May 17, 2016, 11:26:48 PM5/17/16
to Justin Anderson, Salt-users
В Втр, 17/05/2016 в 13:02 -0700, Justin Anderson пишет:
> Hi Dmitry,
>
>
> I missed that in the original posting you made. This does appear to be
> a bug somewhere. Would you like me to file a github bug for you?
Thank you, look like terminalmage already opened issue and fixed bug.

Dmitry Golubenko

unread,
May 17, 2016, 11:28:37 PM5/17/16
to Erik Johnson, Salt-users, jand...@saltstack.com
В Втр, 17/05/2016 в 13:33 -0700, Erik Johnson пишет:
Thank you! will fix be included in 2015.8.9 ?


Reply all
Reply to author
Forward
0 new messages