Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: using krew for running admin socket commands #77

Open
ideepika opened this issue Dec 13, 2022 · 4 comments
Open

feature: using krew for running admin socket commands #77

ideepika opened this issue Dec 13, 2022 · 4 comments

Comments

@ideepika
Copy link

generally for running admin socket commands for example, when we try to check mon_status,
we'd have to ssh into to pod and the run the command:
Learn more about admin socket: https://docs.ceph.com/en/latest/rados/troubleshooting/troubleshooting-mon/#using-the-monitor-s-admin-socket

$ ceph --admin-daemon <full_path_to_asok_file> <command>

instead, since admin sockets are more widely used for debugging ceph or provided advanced commands like checking CephFS mirroring sync status, we can have them supported directly by krew plugin.

@travisn
Copy link
Member

travisn commented Dec 13, 2022

Perhaps the command could be:

kubectl rook-ceph admin <daemon> <command> <args>

The plugin could lookup which pod to connect to based on the daemon name, such as mon.a or osd.0

@travisn
Copy link
Member

travisn commented Aug 3, 2023

Will this already work with kubectl rook-ceph ceph --admin-daemon ...?

@ideepika
Copy link
Author

ideepika commented Aug 7, 2023

Will this already work with kubectl rook-ceph ceph --admin-daemon ...?

not sure, but this will be running in toolbox pod, while admin socket files are present on individual containers?

➜  kubectl-rook-ceph git:(master) kubectl rook-ceph ceph --admin-daemon /var/run/ceph/ceph-osd.0.asok
Warning: rook version 'rook: v1.12.0-alpha.0.104.g7aaf46e11' is running a pre-release version of Rook.

Info: running 'ceph' command with args: [--admin-daemon /var/run/ceph/ceph-osd.0.asok]
admin_socket: exception getting command descriptions: [Errno 13] Permission denied
Error: command terminated with exit code 22

@travisn
Copy link
Member

travisn commented Aug 7, 2023

Oh right, the kubectl rook-ceph ceph commands would run in the operator pod, but the admin-daemon commands need to run in a specific daemon pod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants