某日,检查发现一台openeuler22.03 SP1系统的服务器上之前正常运行的saltstack客户端minion未运行,查看服务状态,报"Invalid version: 'cpython'"错,无法正常运行,本文记录问题处理过程。
一、检查salt-minion服务状态:
详细报错文本如下
[root@localhost ~]# systemctl status salt-minion
× salt-minion.service - The Salt Minion
Loaded: loaded (/usr/lib/systemd/system/salt-minion.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2023-06-25 15:26:07 CST; 1h 44min ago
Docs: man:salt-minion(1)
file:///usr/share/doc/salt/html/contents.html
https://docs.saltproject.io/en/latest/contents.html
Process: 9808 ExecStart=/usr/bin/salt-minion (code=exited, status=1/FAILURE)
Main PID: 9808 (code=exited, status=1/FAILURE)
Jun 25 15:26:07 localhost.localdomain salt-minion[9808]: File "/usr/local/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/specifiers.py", lin>
Jun 25 15:26:07 localhost.localdomain salt-minion[9808]: normalized_item = _coerce_version(item)
Jun 25 15:26:07 localhost.localdomain salt-minion[9808]: File "/usr/local/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/specifiers.py", lin>
Jun 25 15:26:07 localhost.localdomain salt-minion[9808]: version = Version(version)
Jun 25 15:26:07 localhost.localdomain salt-minion[9808]: File "/usr/local/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/version.py", line 1>
Jun 25 15:26:07 localhost.localdomain salt-minion[9808]: raise InvalidVersion(f"Invalid version: '{version}'")
Jun 25 15:26:07 localhost.localdomain salt-minion[9808]: pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: 'cpython'
Jun 25 15:26:07 localhost.localdomain systemd[1]: salt-minion.service: Main process exited, code=exited, status=1/FAILURE
Jun 25 15:26:07 localhost.localdomain systemd[1]: salt-minion.service: Failed with result 'exit-code'.
Jun 25 15:26:07 localhost.localdomain systemd[1]: Failed to start The Salt Minion.
查看状态,报"Invalid version: 'cpython'"错,服务无法正常运行。
[root@localhost ~]# journalctl -xeu salt-minion.service
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1475, in evaluate>
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: return marker.evaluate()
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: File "/usr/local/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/markers.py", line >
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: return _evaluate_markers(self._markers, current_environment)
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: File "/usr/local/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/markers.py", line >
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: groups[-1].append(_eval_op(lhs_value, op, rhs_value))
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: File "/usr/local/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/markers.py", line >
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: return spec.contains(lhs, prereleases=True)
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: File "/usr/local/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/specifiers.py", li>
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: normalized_item = _coerce_version(item)
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: File "/usr/local/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/specifiers.py", li>
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: version = Version(version)
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: File "/usr/local/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/version.py", line >
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: raise InvalidVersion(f"Invalid version: '{version}'")
Jun 26 14:40:27 localhost.localdomain salt-minion[82603]: pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: 'cpython'
Jun 26 14:40:27 localhost.localdomain systemd[1]: salt-minion.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ An ExecStart= process belonging to unit salt-minion.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Jun 26 14:40:27 localhost.localdomain systemd[1]: salt-minion.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit salt-minion.service has entered the 'failed' state with result 'exit-code'.
Jun 26 14:40:27 localhost.localdomain systemd[1]: Failed to start The Salt Minion.
░░ Subject: A start job for unit salt-minion.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit salt-minion.service has finished with a failure.
░░
░░ The job identifier is 6157 and the job result is failed.
二、排查过程
出错信息为cpython版本无效,判断因为cpython包版本发生变化所致。
1、对比异常主机和正常主机的python版本,均显示为Python3.9.9,没有问题:
# python3 --version
Python 3.9.9
2、用“pip list”指令对比两台主机上的python包,可以看到异常主机更新了setuptools和Jinja2等部分软件包。
异常系统 | 正常系统 | 对比 | ||
adagio | 0.2.4 | |||
antlr4-python3-runtime | 4.11.1 | |||
appdirs | 1.4.4 | |||
Babel | 2.9.1 | Babel | 2.9.1 | |
bcrypt | 4.0.1 | |||
cffi | 1.15.1 | |||
chardet | 5.0.0 | chardet | 5.0.0 | |
charset-normalizer | 2.0.12 | charset-normalizer | 2.0.12 | |
configobj | 5.0.6 | configobj | 5.0.6 | |
contourpy | 1.1.0 | |||
cryptography | 41.0.1 | |||
cycler | 0.11.0 | |||
datacompy | 0.10.1 | |||
dbus-python | 1.2.18 | dbus-python | 1.2.18 | |
DBUtils | 1.3 | |||
decorator | 5.0.9 | decorator | 5.0.9 | |
distro | 1.6.0 | distro | 1.6.0 | |
fonttools | 4.40.0 | |||
fs | 2.4.16 | |||
fugue | 0.8.4 | |||
fugue-sql-antlr | 0.1.6 | |||
gpg | 1.16.0 | gpg | 1.16.0 | |
greenlet | 2.0.2 | |||
idna | 3.2 | idna | 3.2 | |
importlib-resources | 5.12.0 | |||
Jinja2 | 3.1.2 | Jinja2 | 3.0.3 | 版本不一致 |
joblib | 1.2.0 | |||
kiwisolver | 1.4.4 | |||
libcomps | 0.1.18 | libcomps | 0.1.18 | |
MarkupSafe | 2.1.3 | MarkupSafe | 2.0.1 | 版本不一致 |
msgpack | 1.0.2 | msgpack | 1.0.2 | |
nftables | 0.1 | nftables | 0.1 | |
numpy | 1.24.0 | |||
ordered-set | 4.1.0 | |||
packaging | 23.1 | |||
pandas | 1.1.5 | |||
paramiko | 3.2.0 | |||
perf | 0.1 | perf | 0.1 | |
Pillow | 9.5.0 | |||
pip | 21.3.1 | pip | 21.3.1 | |
psutil | 5.9.0 | psutil | 5.9.0 | |
psycopg2-binary | 2.9.6 | |||
pyarrow | 12.0.1 | |||
pycairo | 1.21.0 | pycairo | 1.21.0 | |
pycparser | 2.21 | |||
pycryptodomex | 3.15.0 | pycryptodomex | 3.15.0 | |
pycurl | 7.44.1 | pycurl | 7.44.1 | |
PyGObject | 3.42.0 | PyGObject | 3.42.0 | |
PyMySQL | 1.0.3 | |||
PyNaCl | 1.5.0 | |||
pyparsing | 3.1.0 | pyparsing | 3.0.6 | 版本不一致 |
PySocks | 1.7.1 | PySocks | 1.7.1 | |
python-dateutil | 2.8.2 | python-dateutil | 2.8.2 | |
python-linux-procfs | 0.7.0 | python-linux-procfs | 0.7.0 | |
pytz | 2023.3 | pytz | 2021.3 | 版本不一致 |
pyudev | 0.24.0 | pyudev | 0.24.0 | |
PyYAML | 6 | PyYAML | 6 | |
pyzmq | 20.0.0 | pyzmq | 20.0.0 | |
qpd | 0.4.3 | |||
requests | 2.26.0 | requests | 2.26.0 | |
rpm | 4.17.0 | rpm | 4.17.0 | |
salt | 3003.3 | salt | 3003.3 | |
schedutils | 0.6 | schedutils | 0.6 | |
scikit-learn | 1.2.2 | |||
scipy | 1.10.1 | |||
setuptools | 67.8.0 | setuptools | 59.4.0 | 版本不一致 |
six | 1.16.0 | six | 1.16.0 | |
SQLAlchemy | 1.4.39 | |||
sqlglot | 16.3.1 | |||
SSSDConfig | 2.6.1 | SSSDConfig | 2.6.1 | |
threadpoolctl | 3.1.0 | |||
triad | 0.9.0 | |||
typing_extensions | 4.6.3 | |||
tzdata | 2023.3 | |||
urllib3 | 1.26.12 | urllib3 | 1.26.12 | |
wheel | 0.40.0 | |||
xlwt | 1.3.0 | |||
zipp | 3.15.0 |
3、本主机现在的salt-minion为rpm包安装,尝试卸载并重装salt-minion
[root@localhost ~]# yum remove salt-minion
Dependencies resolved.
============================================================================================================================================================
Package Architecture Version Repository Size
============================================================================================================================================================
Removing:
salt-minion noarch 3003.3-1 @salt 73 k
Removing unused dependencies:
libsodium x86_64 1.0.18-1.oe2203sp1 @OS 360 k
libtomcrypt x86_64 1.18.2-
...
Removed:
libsodium-1.0.18-1.oe2203sp1.x86_64 libtomcrypt-1.18.2-5.oe2203sp1.x86_64 libtommath-1.2.0-2.oe2203sp1.x86_64
libunwind-2:1.6.2-2.oe2203sp1.x86_64 openpgm-5.2.122-16.oe2203sp1.x86_64 python3-babel-2.9.1-2.oe2203sp1.noarch
python3-chardet-5.0.0-1.oe2203sp1.noarch python3-charset-normalizer-2.0.12-1.oe2203sp1.noarch python3-idna-3.2-2.oe2203sp1.noarch
python3-jinja2-3.0.3-2.oe2203sp1.noarch python3-markupsafe-2.0.1-3.oe2203sp1.x86_64 python3-msgpack-1.0.2-2.oe2203.x86_64
python3-psutil-5.9.0-1.oe2203sp1.x86_64 python3-pycryptodomex-3.15.0-1.oe2203sp1.x86_64 python3-pycurl-7.44.1-3.oe2203sp1.x86_64
python3-pysocks-1.7.1-2.oe2203sp1.noarch python3-pytz-2021.3-2.oe2203sp1.noarch python3-pyyaml-6.0-2.oe2203sp1.x86_64
python3-requests-2.26.0-7.oe2203sp1.noarch python3-urllib3-1.26.12-1.oe2203sp1.noarch python3-zmq-20.0.0-1.x86_64
salt-3003.3-1.noarch salt-minion-3003.3-1.noarch zeromq-4.3.4-3.oe2203sp1.x86_64
Complete!
(py399) [root@localhost py399]# yum install salt-minion
Last metadata expiration check: 4:40:25 ago on Mon 26 Jun 2023 11:45:58 AM CST.
Dependencies resolved.
============================================================================================================================================================
Package Architecture Version Repository Size
============================================================================================================================================================
Installing:
salt-minion noarch 3003.3-1 salt 33 k
Installing dependencies:
libsodium x86_64 1.0.18-1.oe2203sp1 OS 155 k
...
Installed:
libsodium-1.0.18-1.oe2203sp1.x86_64 libtomcrypt-1.18.2-5.oe2203sp1.x86_64 libtommath-1.2.0-2.oe2203sp1.x86_64
libunwind-2:1.6.2-2.oe2203sp1.x86_64 openpgm-5.2.122-16.oe2203sp1.x86_64 python3-babel-2.9.1-2.oe2203sp1.noarch
python3-chardet-5.0.0-1.oe2203sp1.noarch python3-charset-normalizer-2.0.12-1.oe2203sp1.noarch python3-idna-3.2-2.oe2203sp1.noarch
python3-jinja2-3.0.3-2.oe2203sp1.noarch python3-markupsafe-2.0.1-3.oe2203sp1.x86_64 python3-msgpack-1.0.2-2.oe2203.x86_64
python3-psutil-5.9.0-1.oe2203sp1.x86_64 python3-pycryptodomex-3.15.0-1.oe2203sp1.x86_64 python3-pycurl-7.44.1-3.oe2203sp1.x86_64
python3-pysocks-1.7.1-2.oe2203sp1.noarch python3-pytz-2021.3-2.oe2203sp1.noarch python3-pyyaml-6.0-2.oe2203sp1.x86_64
python3-requests-2.26.0-7.oe2203sp1.noarch python3-urllib3-1.26.12-1.oe2203sp1.noarch python3-zmq-20.0.0-1.x86_64
salt-3003.3-1.noarch salt-minion-3003.3-1.noarch zeromq-4.3.4-3.oe2203sp1.x86_64
Complete!
可以看到,相关rpm包已被重置,重启服务,问题依旧。仔细核对,卸载和重装清单中的rpm包版本一致,为salt-minion运行正常时的初始版本。可以确定是应用方使用pip安装了高版本的python程序包导致程序运行环境有问题,salt-minion不能正常运行了。
三、解决办法
既然rpm包重装不能解决pip安装引起的python环境问题,考虑转为通过pip方法安装salt-minion。
1、卸载salt-minion的rpm运行环境
[root@localhost ~]# yum remove salt-minion
Dependencies resolved.
============================================================================================================================================================
Package Architecture Version Repository Size
============================================================================================================================================================
Removing:
salt-minion noarch 3003.3-1 @salt 73 k
Removing unused dependencies:
libsodium x86_64 1.0.18-1.oe2203sp1 @OS 360 k
libtomcrypt x86_64 1.18.2-
...
Removed:
libsodium-1.0.18-1.oe2203sp1.x86_64 libtomcrypt-1.18.2-5.oe2203sp1.x86_64 libtommath-1.2.0-2.oe2203sp1.x86_64
libunwind-2:1.6.2-2.oe2203sp1.x86_64 openpgm-5.2.122-16.oe2203sp1.x86_64 python3-babel-2.9.1-2.oe2203sp1.noarch
python3-chardet-5.0.0-1.oe2203sp1.noarch python3-charset-normalizer-2.0.12-1.oe2203sp1.noarch python3-idna-3.2-2.oe2203sp1.noarch
python3-jinja2-3.0.3-2.oe2203sp1.noarch python3-markupsafe-2.0.1-3.oe2203sp1.x86_64 python3-msgpack-1.0.2-2.oe2203.x86_64
python3-psutil-5.9.0-1.oe2203sp1.x86_64 python3-pycryptodomex-3.15.0-1.oe2203sp1.x86_64 python3-pycurl-7.44.1-3.oe2203sp1.x86_64
python3-pysocks-1.7.1-2.oe2203sp1.noarch python3-pytz-2021.3-2.oe2203sp1.noarch python3-pyyaml-6.0-2.oe2203sp1.x86_64
python3-requests-2.26.0-7.oe2203sp1.noarch python3-urllib3-1.26.12-1.oe2203sp1.noarch python3-zmq-20.0.0-1.x86_64
salt-3003.3-1.noarch salt-minion-3003.3-1.noarch zeromq-4.3.4-3.oe2203sp1.x86_64
Complete!
2、通过pip安装salt-minion
请参见本人所写文章国产操作系统openEuler22.03LTS离线安装saltstack3003.1实践
[root@localhost]# sh salt-install.sh
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/certifi-2022.12.7-py3-none-any.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 155255 (152K) [application/octet-stream]
Saving to: ‘certifi-2022.12.7-py3-none-any.whl’
certifi-2022.12.7-py3-none-any.whl 100%[============================================================================>] 151.62K --.-KB/s in 0.004s
2023-06-26 16:38:21 (34.5 MB/s) - ‘certifi-2022.12.7-py3-none-any.whl’ saved [155255/155255]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/charset_normalizer-2.1.1-py3-none-any.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 39748 (39K) [application/octet-stream]
Saving to: ‘charset_normalizer-2.1.1-py3-none-any.whl’
charset_normalizer-2.1.1-py3-none-any. 100%[============================================================================>] 38.82K --.-KB/s in 0.001s
2023-06-26 16:38:21 (25.6 MB/s) - ‘charset_normalizer-2.1.1-py3-none-any.whl’ saved [39748/39748]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/idna-3.4-py3-none-any.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 61538 (60K) [application/octet-stream]
Saving to: ‘idna-3.4-py3-none-any.whl’
idna-3.4-py3-none-any.whl 100%[============================================================================>] 60.10K --.-KB/s in 0.004s
2023-06-26 16:38:21 (14.2 MB/s) - ‘idna-3.4-py3-none-any.whl’ saved [61538/61538]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/immutables-0.19-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 120382 (118K) [application/octet-stream]
Saving to: ‘immutables-0.19-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl’
immutables-0.19-cp39-cp39-manylinux_2_ 100%[============================================================================>] 117.56K --.-KB/s in 0.008s
2023-06-26 16:38:21 (14.1 MB/s) - ‘immutables-0.19-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl’ saved [120382/120382]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/Jinja2-3.0.0-py3-none-any.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 133357 (130K) [application/octet-stream]
Saving to: ‘Jinja2-3.0.0-py3-none-any.whl’
Jinja2-3.0.0-py3-none-any.whl 100%[============================================================================>] 130.23K --.-KB/s in 0.008s
2023-06-26 16:38:21 (16.3 MB/s) - ‘Jinja2-3.0.0-py3-none-any.whl’ saved [133357/133357]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/jmespath-1.0.1-py3-none-any.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20256 (20K) [application/octet-stream]
Saving to: ‘jmespath-1.0.1-py3-none-any.whl’
jmespath-1.0.1-py3-none-any.whl 100%[============================================================================>] 19.78K --.-KB/s in 0.003s
2023-06-26 16:38:21 (6.62 MB/s) - ‘jmespath-1.0.1-py3-none-any.whl’ saved [20256/20256]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25466 (25K) [application/octet-stream]
Saving to: ‘MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl’
MarkupSafe-2.1.1-cp39-cp39-manylinux_2 100%[============================================================================>] 24.87K --.-KB/s in 0.003s
2023-06-26 16:38:21 (7.77 MB/s) - ‘MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl’ saved [25466/25466]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 322372 (315K) [application/octet-stream]
Saving to: ‘msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl’
msgpack-1.0.4-cp39-cp39-manylinux_2_17 100%[============================================================================>] 314.82K 1.32MB/s in 0.2s
2023-06-26 16:38:21 (1.32 MB/s) - ‘msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl’ saved [322372/322372]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/psutil-5.9.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 280218 (274K) [application/octet-stream]
Saving to: ‘psutil-5.9.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl’
psutil-5.9.4-cp36-abi3-manylinux_2_12_ 100%[============================================================================>] 273.65K --.-KB/s in 0.002s
2023-06-26 16:38:21 (146 MB/s) - ‘psutil-5.9.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl’ saved [280218/280218]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/pycryptodomex-3.16.0-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2308483 (2.2M) [application/octet-stream]
Saving to: ‘pycryptodomex-3.16.0-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl’
pycryptodomex-3.16.0-cp35-abi3-manylin 100%[============================================================================>] 2.20M --.-KB/s in 0.01s
2023-06-26 16:38:21 (163 MB/s) - ‘pycryptodomex-3.16.0-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl’ saved [2308483/2308483]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 661819 (646K) [application/octet-stream]
Saving to: ‘PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl’
PyYAML-6.0-cp39-cp39-manylinux_2_5_x86 100%[============================================================================>] 646.31K --.-KB/s in 0.003s
2023-06-26 16:38:21 (245 MB/s) - ‘PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl’ saved [661819/661819]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/pyzmq-20.0.0-cp39-cp39-manylinux1_x86_64.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1082600 (1.0M) [application/octet-stream]
Saving to: ‘pyzmq-20.0.0-cp39-cp39-manylinux1_x86_64.whl’
pyzmq-20.0.0-cp39-cp39-manylinux1_x86_ 100%[============================================================================>] 1.03M --.-KB/s in 0.003s
2023-06-26 16:38:21 (387 MB/s) - ‘pyzmq-20.0.0-cp39-cp39-manylinux1_x86_64.whl’ saved [1082600/1082600]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/requests-2.28.1-py3-none-any.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 62843 (61K) [application/octet-stream]
Saving to: ‘requests-2.28.1-py3-none-any.whl’
requests-2.28.1-py3-none-any.whl 100%[============================================================================>] 61.37K --.-KB/s in 0s
2023-06-26 16:38:21 (143 MB/s) - ‘requests-2.28.1-py3-none-any.whl’ saved [62843/62843]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/requirements-salt.txt
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 261 [text/plain]
Saving to: ‘requirements-salt.txt’
requirements-salt.txt 100%[============================================================================>] 261 --.-KB/s in 0s
2023-06-26 16:38:21 (50.3 MB/s) - ‘requirements-salt.txt’ saved [261/261]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/urllib3-1.26.13-py2.py3-none-any.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 140572 (137K) [application/octet-stream]
Saving to: ‘urllib3-1.26.13-py2.py3-none-any.whl’
urllib3-1.26.13-py2.py3-none-any.whl 100%[============================================================================>] 137.28K --.-KB/s in 0.001s
2023-06-26 16:38:21 (177 MB/s) - ‘urllib3-1.26.13-py2.py3-none-any.whl’ saved [140572/140572]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/salt-3003.1-py3-none-any.whl
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9654100 (9.2M) [application/octet-stream]
Saving to: ‘salt-3003.1-py3-none-any.whl’
salt-3003.1-py3-none-any.whl 100%[============================================================================>] 9.21M --.-KB/s in 0.02s
2023-06-26 16:38:21 (378 MB/s) - ‘salt-3003.1-py3-none-any.whl’ saved [9654100/9654100]
--2023-06-26 16:38:21-- http://192.168.188.226/salt/openeuler22.03/contextvars-2.4.tar.gz
Connecting to 192.168.188.226:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9570 (9.3K) [application/octet-stream]
Saving to: ‘contextvars-2.4.tar.gz’
contextvars-2.4.tar.gz 100%[============================================================================>] 9.35K --.-KB/s in 0s
2023-06-26 16:38:21 (338 MB/s) - ‘contextvars-2.4.tar.gz’ saved [9570/9570]
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Looking in links: .
Processing ./certifi-2022.12.7-py3-none-any.whl
Processing ./charset_normalizer-2.1.1-py3-none-any.whl
Processing ./contextvars-2.4.tar.gz
Preparing metadata (setup.py) ... done
Processing ./idna-3.4-py3-none-any.whl
Processing ./immutables-0.19-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Processing ./Jinja2-3.0.0-py3-none-any.whl
Processing ./jmespath-1.0.1-py3-none-any.whl
Processing ./MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Processing ./msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Processing ./psutil-5.9.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Processing ./pycryptodomex-3.16.0-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Processing ./PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Processing ./pyzmq-20.0.0-cp39-cp39-manylinux1_x86_64.whl
Processing ./requests-2.28.1-py3-none-any.whl
Processing ./urllib3-1.26.13-py2.py3-none-any.whl
Processing ./salt-3003.1-py3-none-any.whl
Requirement already satisfied: distro>=1.0.1 in /usr/lib/python3.9/site-packages (from salt==3003.1->-r requirements-salt.txt (line 16)) (1.6.0)
Building wheels for collected packages: contextvars
Building wheel for contextvars (setup.py) ... done
Created wheel for contextvars: filename=contextvars-2.4-py3-none-any.whl size=7666 sha256=dbb18cc07b1392bc24a124fc121ed4e28dfc0171def30e1e2ba0632b2e2ba734
Stored in directory: /root/.cache/pip/wheels/bb/5f/16/d6721278108c7e5658c0e01b054a1f4459ea09d55478a81eec
Successfully built contextvars
Installing collected packages: urllib3, MarkupSafe, immutables, idna, charset-normalizer, certifi, requests, pyzmq, PyYAML, pycryptodomex, msgpack, Jinja2, contextvars, salt, psutil, jmespath
Attempting uninstall: MarkupSafe
Found existing installation: MarkupSafe 2.1.3
Uninstalling MarkupSafe-2.1.3:
Successfully uninstalled MarkupSafe-2.1.3
Attempting uninstall: Jinja2
Found existing installation: Jinja2 3.1.2
Uninstalling Jinja2-3.1.2:
Successfully uninstalled Jinja2-3.1.2
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
fugue 0.8.4 requires pandas>=1.2.0, but you have pandas 1.1.5 which is incompatible.
Successfully installed Jinja2-3.0.0 MarkupSafe-2.1.1 PyYAML-6.0 certifi-2022.12.7 charset-normalizer-2.1.1 contextvars-2.4 idna-3.4 immutables-0.19 jmespath-1.0.1 msgpack-1.0.4 psutil-5.9.4 pycryptodomex-3.16.0 pyzmq-20.0.0 requests-2.28.1 salt-3003.1 urllib3-1.26.13
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
/usr/local/bin/salt-minion
salt 3003.1
● salt-minion.service - The Salt Minion
Loaded: loaded (/usr/lib/systemd/system/salt-minion.service; disabled; vendor preset: disabled)
Active: active (running) since Mon 2023-06-26 16:38:33 CST; 10ms ago
Docs: man:salt-minion(1)
file:///usr/share/doc/salt/html/contents.html
https://docs.saltstack.com/en/latest/contents.html
Main PID: 89894 (salt-minion)
Tasks: 1 (limit: 1644176)
Memory: 21.0M
CGroup: /system.slice/salt-minion.service
└─ 89894 /usr/bin/python3 /usr/local/bin/salt-minion
Jun 26 16:38:33 localhost.localdomain systemd[1]: Starting The Salt Minion...
Jun 26 16:38:33 localhost.localdomain systemd[1]: Started The Salt Minion.
安装成功完成,salt-minion运行正常。在安装过程中还可以看,MarkupSafe包从2.1.3降至2.1.1,Jinja2包从3.1.2降至3.0.0,问题得以解决(期间有个报错信息,提示pandas包要求>=1.2.0, 现有系统pandas 1.1.5不兼容,但实际无影响,就未做进一步处理)。