Skip to content

mon: fix misc asok commands#30859

Merged
liewegas merged 20 commits intoceph:masterfrom
liewegas:wip-cleanup-mon-asok
Oct 24, 2019
Merged

mon: fix misc asok commands#30859
liewegas merged 20 commits intoceph:masterfrom
liewegas:wip-cleanup-mon-asok

Conversation

@liewegas
Copy link
Member

@liewegas liewegas commented Oct 11, 2019

In the big asok/tell cleanup, I missed a bunch of these commands that were registered as CLI commands but were really asok/tell commands.

Fixes: https://tracker.ceph.com/issues/42387

@liewegas liewegas added the core label Oct 11, 2019
@liewegas liewegas requested a review from jdurgin October 11, 2019 00:27
@liewegas liewegas requested a review from a team as a code owner October 11, 2019 14:31
These are handled by the generic cct's asok commands.

Signed-off-by: Sage Weil <sage@redhat.com>
Move to the right function, registery, and remove from the CLI command registry.

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas liewegas force-pushed the wip-cleanup-mon-asok branch from b2dd195 to 1bcba72 Compare October 11, 2019 14:34
Replace the 'ceph [mon] sync force' commands and just use the asok
sync_force command instead.  This is a low-level command that nobody should
reasonsbly using except in an emergency, so do not bother with trying to
maintain compatibility; it's a bit rediculous that we had 3 variations of
this to being with!

Signed-off-by: Sage Weil <sage@redhat.com>
Duplicate what the OSD is doing here.

Signed-off-by: Sage Weil <sage@redhat.com>
The tests were doing logs of 'ceph mon_status'; change that to
quorum_status or tell.

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
This allows redirecting prun/prunb to a file without using another
function. Also, write to the terminal if stderr is redirected to give a
visual glimpse of vstart's progress.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Otherwise, ceph-fuse cannot find them!

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
@liewegas
Copy link
Member Author

retest this please

These are now tell/asok commands.

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
I'm not really sure why this test expected EPERM before when it expects 0
a bit earlier, but it should certainly expect EPERM after the user is
deleted.

Signed-off-by: Sage Weil <sage@redhat.com>
This is part of mon_status, and qa/standalone/mon/misc.sh mon_features test
uses it.

Signed-off-by: Sage Weil <sage@redhat.com>
The mgr profile needs to do a tell command to the mon, which was restricted
to *only* allow_all (*) caps.  Additionally allow whitelisted commands,
and whitelist 'smart'.  This is somewhat imprecise since it conflates
tell vs cli commands in the MonCap, but since those don't overlap it should
be fine.

Signed-off-by: Sage Weil <sage@redhat.com>
Pre-octopus clients will send tell commands as CLI commands.  Explicitly
identify those and send them to the asok infrastructure.

Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas liewegas force-pushed the wip-cleanup-mon-asok branch from b6b331b to 0b6194a Compare October 23, 2019 00:46
EPERM means an operation requires superuser; EACCES more generally means
permission denied.  We use EACCES elsewhere for ceph auth denials; use it
here too for consistency.  This fixes qa/workunits/mon/caps.sh.

Signed-off-by: Sage Weil <sage@redhat.com>
liewegas added a commit that referenced this pull request Oct 24, 2019
* refs/pull/30859/head:
	auth: EACCES, not EPERM
	mon: shunt old tell commands from cli interface to asok
	mon: allow mgr to tell mon.foo smart
	mon: include quorum features in quorum_status
	qa/workunits/mon/caps.sh: fix test
	ceph_test_rados_api_cmd: fix MonDescribe test
	Merge branch 'vstart-fs-auth' of git://github.com/batrick/ceph into wip-cleanup-mon-asok
	test/pybind/test_ceph_argparse: fix tests
	vstart: add volume client keys to keyring
	vstart: use fs authorize to create master client key
	vstart: redirect some output to stderr
	vstart: output command strings to stderr
	qa/workunits/cephtool/test.sh: fix 'quorum enter' caller
	qa: change mon_status calls to quorum_status or tell commands
	mon: fix 'heap ...' command
	mon: consolidate 'sync force' commands
	mon: allow asok commands to return an error code
	mon: move 'quorum enter|exit' and 'mon_status' to asok
	mon: fix 'smart' asok command
	mon: remove old 'config set' and 'injectargs'

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
@liewegas liewegas merged commit ef3c42c into ceph:master Oct 24, 2019
@liewegas liewegas deleted the wip-cleanup-mon-asok branch October 24, 2019 02:06
tchaikov added a commit to tchaikov/ceph that referenced this pull request Oct 24, 2019
Fixes: https://tracker.ceph.com/issues/42455
Signed-off-by: Kefu Chai <kchai@redhat.com>

Conflicts: this change is not cherry-picked from master, because in
master, we had a massive refactor in asok. see
ceph#30859. and ceph#30859 is not backported
to nautilus.
epuertat added a commit to rhcs-dashboard/ceph-dev that referenced this pull request Oct 29, 2019
Due to changes in ceph/ceph#30859 (commit f12076f), now vstart fails (`"/dev/tty: No such device or address"`) when run in a pseudo-tty or a tty-less environment (like default docker containers).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants