Re: New Ceph Plugin - assistance
Hi, Depending of the Ceph version you can have the files in different places, but in any case is easy to search the file "module.py" in any of your manager hosts, the results will show you the location of the manager plugins. In Nautilus they are in "/usr/share/ceph/mgr/" You can see the active manager using the command "ceph -s" A good source of information to see what is happening is the manager log file (in var/log/ceph) in the manager host, You can change the log level to debug using: ceph daemon <your-mgr> config set debug_mgr 20/5 restore the log level: ceph daemon <your-mgr> config set debug_mgr 1/5 BR On Wed, Jan 8, 2020 at 4:01 PM Khoury, Rima (Nokia - IL/Kfar Sava) < rima.khoury@nokia.com> wrote:
Hi,
I did the steps as suggested in the documentation, but the plugin still can not run.
I have tried to get the mgr module path but there is no configuration option for that. Do you know how can I know what is the path?
And is there any command to get details on the active manager? Just to make sure it is running on my host.
Thanks,
*From:* Juan Miguel Olmo Martinez <jolmomar@redhat.com> *Sent:* Wednesday, January 8, 2020 4:21 PM *To:* Khoury, Rima (Nokia - IL/Kfar Sava) <rima.khoury@nokia.com> *Cc:* dev@ceph.io *Subject:* Re: New Ceph Plugin - assistance
Hi Rima,
- Review documentation:
https://docs.ceph.com/docs/master/mgr/modules/#creating-a-module
- Take a look at one example, in this folder you can find several of them:
https://github.com/jmolmo/ceph/tree/master/src/pybind/mgr
Hello: is the most simple manager module
ssh: the most updated
And ... be sure that your manager module files are located in the same host where the active manager is running.
BR
On Wed, Jan 8, 2020 at 2:55 PM Khoury, Rima (Nokia - IL/Kfar Sava) < rima.khoury@nokia.com> wrote:
Hi there,
I have been trying to add a new plugin to the ceph mgr but can't seem to figure out why it is not working. I have created a directory under /ceph/mgr/ and added the module.py file there. Afterwards I added the plugin's name to the file /usr/share/ceph-ansible/roles/ceph-mgr/defaults/main.yml under ceph_mgr_modules field. But when I run "ceph mgr module enable <plugin-name>" I get this error: Error ENOENT: module 'newplugin' reports that it cannot run on the active manager daemon: (pass --force to force enablement).
Did anyone try this before and can share some insights.
This matter is urgent to me so I would really appreciate any help I can get.
Thank you
_______________________________________________ Dev mailing list -- dev@ceph.io To unsubscribe send an email to dev-leave@ceph.io
--
*Juan Miguel Olmo Martínez*
Senior Software Engineer
Red Hat <https://www.redhat.com/>
jolmomar@redhat.com
[image: Image removed by sender.] <https://www.redhat.com/>
-- Juan Miguel Olmo Martínez Senior Software Engineer Red Hat <https://www.redhat.com/> jolmomar@redhat.com <https://www.redhat.com/>
On 9-1-2020 09:01, Juan Miguel Olmo Martinez wrote:
Hi,
Depending of the Ceph version you can have the files in different places, but in any case is easy to search the file "module.py" in any of your manager hosts, the results will show you the location of the manager plugins. In Nautilus they are in "/usr/share/ceph/mgr/"
You can see the active manager using the command "ceph -s"
A good source of information to see what is happening is the manager log file (in var/log/ceph) in the manager host,
You can change the log level to debug using: ceph daemon <your-mgr> config set debug_mgr 20/5 restore the log level: ceph daemon <your-mgr> config set debug_mgr 1/5
I had a lot of trouble getting plugins to work, since they needed py-libs that I did not (yet) have. Python tracebacks are logged in the ceph-mgr log file. And there is was usually quite fast clear what the problem was. Big chance that ceph-mgr is not loading you plugin due to loading errors but the traceback in the log should give you more info. --WjW
Thank you! The logs did help but I had to add log_to_file (as true) in the ceph.conf in order to see it. The plugin was successfully installed and did run as expected and could produce output as desired and implemented in the code. However, I tried to write a new function, but unfortunately it produced an error, but when I restored the working code I could not enable the plugin again. Now it says: " Error ENOENT: all mgr daemons do not support module 'newplugin', pass --force to force enablement". I tried restarting the ceph-mgr, and made sure to do all the steps I did before, but seems that it's still stuck on this error. Do you have any ideas of what might help? Could this be a bug in ceph? BTW I am using nautilus -----Original Message----- From: Willem Jan Withagen <wjw@digiware.nl> Sent: Thursday, January 9, 2020 1:41 PM To: Juan Miguel Olmo Martinez <jolmomar@redhat.com>; Khoury, Rima (Nokia - IL/Kfar Sava) <rima.khoury@nokia.com> Cc: dev@ceph.io Subject: Re: New Ceph Plugin - assistance On 9-1-2020 09:01, Juan Miguel Olmo Martinez wrote:
Hi,
Depending of the Ceph version you can have the files in different places, but in any case is easy to search the file "module.py" in any of your manager hosts, the results will show you the location of the manager plugins. In Nautilus they are in "/usr/share/ceph/mgr/"
You can see the active manager using the command "ceph -s"
A good source of information to see what is happening is the manager log file (in var/log/ceph) in the manager host,
You can change the log level to debug using: ceph daemon <your-mgr> config set debug_mgr 20/5 restore the log level: ceph daemon <your-mgr> config set debug_mgr 1/5
I had a lot of trouble getting plugins to work, since they needed py-libs that I did not (yet) have. Python tracebacks are logged in the ceph-mgr log file. And there is was usually quite fast clear what the problem was. Big chance that ceph-mgr is not loading you plugin due to loading errors but the traceback in the log should give you more info. --WjW
participants (3)
-
Juan Miguel Olmo Martinez
-
Khoury, Rima (Nokia - IL/Kfar Sava)
-
Willem Jan Withagen