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

Wrong init system used in virtual module "service" on Manjaro #48316

Closed
ralex opened this Issue Jun 26, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@ralex
Contributor

ralex commented Jun 26, 2018

Description of Issue/Question

I have installed a salt master+minion on my Manjaro setup.
The init system used for service module seems to be sysvinit despite systemd has been detected on the minion.

Also, I have tried to fix this behaviour by modifying salt/modules/service.py.
Adding 'Manjaro' in this list helped to "make it work":

def __virtual__():
    '''
    Only work on systems which exclusively use sysvinit
    '''
    # Disable on these platforms, specific service modules exist:
    disable = set((
[...]

Steps to Reproduce Issue

salt '*' service.start salt-minion
minion:
    ERROR: Unable to run command '[u'/etc/init.d/salt-minion', u'start']' with the context '{u'timeout': None, u'with_communicate': True, u'shell': False, u'bg': False, u'stderr': -2, u'env': {'LANG': 'fr_FR.UTF-8', 'LC_NUMERIC': 'C', 'NOTIFY_SOCKET': '/run/systemd/notify', 'LC_MESSAGES': 'C', 'JOURNAL_STREAM': '9:20172', 'LC_IDENTIFICATION': 'C', 'LC_ADDRESS': 'C', 'LC_NAME': 'C', 'LC_COLLATE': 'C', 'LC_CTYPE': 'C', 'LC_TELEPHONE': 'C', 'LC_MEASUREMENT': 'C', 'LC_PAPER': 'C', 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/bin', 'LC_TIME': 'C', 'INVOCATION_ID': 'd357a9306fbc482298bf08bd7d2d60ee', 'LC_MONETARY': 'C'}, u'stdout': -1, u'close_fds': True, u'stdin': None, u'cwd': u'/root'}', reason: command not found

Some relevant grains that could help:

salt '*' grains.item lsb_distrib_id init os_family os osfinger osrelease systemd kernel
minion:
    ----------
    init:
        systemd
    kernel:
        Linux
    lsb_distrib_id:
        ManjaroLinux
    os:
        Manjaro
    os_family:
        Arch
    osfinger:
        ManjaroLinux-17
    osrelease:
        17.1.10
    systemd:
        ----------
        features:
            +PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN +PCRE2 default-hierarchy=hybrid
        version:
            238

Versions Report

Salt Version:
           Salt: 2018.3.0
 
Dependency Versions:
           cffi: 1.11.5
       cherrypy: Not Installed
       dateutil: 2.7.3
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: 0.27.0
        libnacl: Not Installed
       M2Crypto: 0.30.1
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: 2.18
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 0.27.1
         Python: 2.7.15 (default, May  1 2018, 20:16:04)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 16.0.3
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.2.2
 
System Versions:
           dist:   
         locale: UTF-8
        machine: x86_64
        release: 4.14.48-2-MANJARO
         system: Linux
        version: Not Installed

@DmitryKuzmenko

This comment has been minimized.

Contributor

DmitryKuzmenko commented Jun 26, 2018

As for me it looks it's better to use 'os_family' grain value. In this case we'll have the only base distros to set in the disabled list.

@gtmanfred

This comment has been minimized.

Contributor

gtmanfred commented Jun 26, 2018

Sounds like Manjaro changed their name in os-release or something again. They have done this before.

PR would be welcome to fix this.

Thanks,
Daniel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment