Closed gaozhekang closed 3 years ago
ISO can be downloaded here(If this can do help) https://repo.openeuler.org/openEuler-20.03-LTS/
Since the os_family is "openEuler" the change probably just needs to be made to yumpkg.py's virtual function:
Specifically:
enabled = ("amazon", "xcp", "xenserver", "virtuozzolinux", "virtuozzo")
Needs to be changed to
enabled = ("amazon", "openEuler", "xcp", "xenserver", "virtuozzolinux", "virtuozzo")
Would you like to open a PR for that change?
Since the os_family is "openEuler" the change probably just needs to be made to yumpkg.py's virtual function:
Specifically:
enabled = ("amazon", "xcp", "xenserver", "virtuozzolinux", "virtuozzo")
Needs to be changed to
enabled = ("amazon", "openEuler", "xcp", "xenserver", "virtuozzolinux", "virtuozzo")
Would you like to open a PR for that change?
It solves the problem. Very grateful! I'm ready to open a PR for my code and spec adaption on openEuler. But salt I'm using is an old version released in 2015. I'm not clear that if the same adaption on master branch is effective, I will have a test before that, so see you soon!
This is also an issue for CentOS 8 Stream minions.
CentOS 8 Stream os_family:
$ salt-call --local grains.get os_family
local:
CentOS Stream
salt-minion log when attempting to use pkg.installed on a CentOS 8 Stream minion:
[ERROR ] State 'pkg.installed' was not found in SLS 'pkg'
Reason: 'pkg' __virtual__ returned False: pkg module could not be loaded
I'm not sure if CentOS 8 Stream's os_family should be set to Redhat (like CentOS 7 was) or if CentOS Stream should be added to this enable list
I'm also having the same issue with CentOS 8 Stream:
[vagrant@windefender-box ~]$ sudo salt-call state.sls cockpit.package
[INFO ] Loading fresh modules for state activity
[INFO ] Executing command ['git', '--version'] in directory '/root'
[INFO ] Running state [cockpit-and-addons-present] at time 10:29:41.276228
[ERROR ] State 'pkg.installed' was not found in SLS 'cockpit.package.present'
Reason: 'pkg' __virtual__ returned False: pkg module could not be loaded
local:
----------
ID: cockpit-and-addons-present
Function: pkg.installed
Result: False
Comment: State 'pkg.installed' was not found in SLS 'cockpit.package.present'
Reason: 'pkg' __virtual__ returned False: pkg module could not be loaded
Changes:
Summary for local
------------
Succeeded: 0
Failed: 1
------------
Total states run: 1
Total run time: 0.000 ms
[vagrant@windefender-box ~]$
Versions Report
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
Steps to Reproduce the behavior
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 :