Ceph: permissions to access admin socket

How to chmod Ceph admin socket via ceph.conf

George Shuklin
OpsOps
2 min readJun 25, 2018

--

I run into a (minor?) trouble while configuring a monitoring for Ceph: Ceph have its admin socket heavily restricted, and I want to relax it to allow members of ceph group to have access to this socket for R/W:

Google shows no definitive answer, init script tells nothing. I dug into the sources and found this in src/common/common_init.cc:

I’m not a C++ guru, but I see conf->admin_socket_mode here.

Amazingly, Google is still mute about this.

Further reading The Documentation™ shows this in src/common/options.cc:

But a google still instincts it knows nothing about this.

Experimenting

I added this option into [mon] section of ceph.conf:

restarted my ceph monitor (systemctl restart ceph-mon@mon2), and…

Conclusion

There is an undocumented option admin socket mode which allows Ceph to change an access mode for the admin socket. Reading The Documentation™ in the form of source code is hard, but useful.

--

--

George Shuklin
OpsOps

I work at Servers.com, most of my stories are about Ansible, Ceph, Python, Openstack and Linux. My hobby is Rust.