Skip to content

mon: should not take non-tell commands as tell ones#32517

Merged
tchaikov merged 1 commit intoceph:masterfrom
tchaikov:wip-mon-tell-command
Jan 8, 2020
Merged

mon: should not take non-tell commands as tell ones#32517
tchaikov merged 1 commit intoceph:masterfrom
tchaikov:wip-mon-tell-command

Conversation

@tchaikov
Copy link
Contributor

@tchaikov tchaikov commented Jan 7, 2020

this change addresses a regression introduced by a2c3479. in which, a
new flag, 'FLAG_TELL' was added. and it's used to check if a command is
"TELL" command. if it is, it's added to the tell/asok command registry
and monitor will handle the commands in this registry using asok hooks.

but there are some commands whose flag is "HIDDEN". and after
a2c3479, is_tell() takes HIDDEN commands as TELL command. that's why
ceph_test_admin_socket_output --all fails. because, "mds freeze" is
now wrongly considered as a TELL command. but monitor is not able to
handle is using the asok hooks.

after this change, is_tell() will not mistake "mds freeze" as a TELL
command anymore.

Signed-off-by: Kefu Chai kchai@redhat.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

this change addresses a regression introduced by a2c3479. in which, a
new flag, 'FLAG_TELL' was added. and it's used to check if a command is
"TELL" command. if it is, it's added to the tell/asok command registry
and monitor will handle the commands in this registry using asok hooks.

but there are some commands whose flag is "HIDDEN". and after
a2c3479, is_tell() takes HIDDEN commands as TELL command. that's why
`ceph_test_admin_socket_output --all` fails. because, "mds freeze" is
now wrongly considered as a TELL command. but monitor is not able to
handle is using the asok hooks.

after this change, is_tell() will not mistake "mds freeze" as a TELL
command anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov
Copy link
Contributor Author

tchaikov commented Jan 7, 2020

Copy link
Member

@jdurgin jdurgin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, I swear we've had the same exact bug in a flag check like this before, where we assumed power of 2 flags but incremented them sequentially instead

@tchaikov
Copy link
Contributor Author

tchaikov commented Jan 8, 2020

http://pulpito.ceph.com/kchai-2020-01-08_13:11:06-rados-wip-kefu-testing-2020-01-08-1745-distro-basic-smithi/4647543/

test finished. but failed due to

"2020-01-08T13:31:49.317658+0000 mon.a (mon.0) 181 : cluster [WRN] Health check failed: 1 filesystem is degraded (FS_DEGRADED)" in cluster log

fixed by #32549

@tchaikov tchaikov merged commit 52293ea into ceph:master Jan 8, 2020
@tchaikov tchaikov deleted the wip-mon-tell-command branch January 8, 2020 14:15
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.

3 participants