Skip to content

[BUG] State 'pkg.installed' was not found  #57490

@gaozhekang

Description

@gaozhekang

Description
I got a problem when using salt on openEuler linux(both master and minion), which is an opensource linux system and uses rpm for pkg management & systemd for service management, like what Centos do.

It reports an error as ”State 'pkg.installed' was not found”. I guess it's because openEuler systems can not be recognized, while it's very similar to Centos or fedora. So is there some way I can tell salt that the system is centos-like, or that rpm and systemd are used on this system?

Or maybe this can be fixed? I really like Salt because it's arch independent and has detailed documents, so that I can easily manage my systems.

Setup

top.sls
base:
  '*':
     - system
system.sls
auditd:
    pkg.installed: []
    service.running:
        - require:
            - pkg: audit

Steps to Reproduce the behavior

$ salt '*' state.apply
m1:
    ----------
    pkg_|-auditd_|-auditd_|-installed:
        ----------
        __run_num__:
            0
        changes:
            ----------
        comment:
            **State 'pkg.installed' was not found in SLS 'system'**
            **Reason: Module 'pkg' is not available.**
        name:
            auditd
        result:
            False
    service_|-auditd_|-auditd_|-running:
        ----------
        __run_num__:
            1
        __sls__:
            system
        changes:
            ----------
        comment:
            **The following requisites were not found:
                               require:
                                   pkg: audit**
        result:
            False

Versions Report

salt --versions-report
salt-call --versions-report
           Salt: 2015.5.10
         Python: 2.7.16 (default, Mar 23 2020, 19:07:51)
         Jinja2: 2.10
       M2Crypto: 0.30.1
 msgpack-python: 0.5.6
   msgpack-pure: Not Installed
       pycrypto: 2.6.1
        libnacl: Not Installed
         PyYAML: 5.1.2
          ioflo: Not Installed
          PyZMQ: 14.7.0
           RAET: Not Installed
            ZMQ: 4.1.4
           Mako: Not Installed
        Tornado: Not Installed
        timelib: Not Installed
       dateutil: Not Installed

Additional context
The system info is :

$ salt-call --local grains.get os_family
local:
    openEuler

Metadata

Metadata

Assignees

No one assigned

    Labels

    Execution-Modulebugbroken, incorrect, or confusing behavior

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions