When I attempt to call ceph.mon_create from the Ceph Execution Modules I get this error:
ID: create_mons Function: module.run Name: ceph.mon_create Result: False Comment: Module function ceph.mon_create threw an exception. Exception: Error: ceph returned an invalid version:'ceph version 12.2.5 (cad919881333ac92274171586c827e01f554a70a) luminous (stable)' Started: 22:10:38.744327 Duration: 123.002 ms Changes:
Repo containing setup is here.
Of note: the ceph_cfg Python module which salt.modules.ceph depends is not available via any means other than cloning from it's git repo, which is mostly >1y old. I've glanced at the code for it and can't quite find where it's balking on the version number, other than it could be expecting a simple short version string, rather than the long version that's actually returned by Ceph.
A simple highstate that installs ceph pkg, the dependent python module ceph_cfg and runs the ceph.mon_create exec module returns this error.
Master version report:
root@salt:/# salt --versions-report
Salt Version:
Salt: 2018.3.2Dependency Versions:
cffi: Not Installed
cherrypy: 3.5.0
dateutil: 2.5.3
docker-py: Not Installed
gitdb: 2.0.0
gitpython: 2.1.1
ioflo: Not Installed
Jinja2: 2.9.4
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.13 (default, Nov 24 2017, 17:33:09)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: 2.0.1
timelib: Not Installed
Tornado: 4.4.3
ZMQ: 4.2.1System Versions:
dist: debian 9.4
locale: ANSI_X3.4-1968
machine: armv7l
release: 4.14.34-hypriotos-v7+
system: Linux
version: debian 9.4
Targetted minion is running the same version of salt, on Ubuntu Bionic amd64.
@seffyroff Thanks for the report. Looks like the error is likely coming from the ceph_cfg library and the fact that it's 2+ years old we should be using something else.
Yep, definitely - There do seem to be several alternative Python Ceph instrumentations. Indeed, the Ceph Deploy tool appears to be Python-based..
ceph-deploy is unmaintained (or barely maintained) and will eventually go away, and even if that weren't the case, it's not suitable to build a salt-based solution on top of that codebase.
The ceph_cfg library mentioned above is also unmaintained, and being more than two years since the last commit is hopelessly out of date with respect to current ceph versions.
I'd suggest the current ceph execution module simply be deleted to avoid further confusion.
I opened a PR to remove the ceph execution module per my previous comment here, but @dwoz said:
We can't just remove the module without going through a depreciation path. Also, if the current
ceph module is broken, It'd be better to re-write it and/or fix the issues. Can you please open an
issue about the problems you've encountered so we can track the work that is needed?
So, I will add the following:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
The Ceph Execution module in salt is still terminally broken, and realistically nobody is ever going to fix it. See my above comment from November 20, 2019, and also bear in mind that since then the latest developments in ceph deployment with salt are happening in https://github.com/ceph/ceph-salt.
Can we please get this module removed from the core of salt? The only thing it's going to do is cause confusion.