Bug 1458715 - rbd feature disable command crashes if no feature specified in command.
Summary: rbd feature disable command crashes if no feature specified in command.
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat
Component: RBD
Version: 2.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 2.3
Assignee: Jason Dillaman
QA Contact: ceph-qe-bugs
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-05 10:01 UTC by Ramakrishnan Periyasamy
Modified: 2017-07-30 15:32 UTC (History)
6 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2017-06-19 13:33:50 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1497 normal SHIPPED_LIVE Red Hat Ceph Storage 2.3 bug fix and enhancement update 2017-06-19 17:24:11 UTC
Ceph Project Bug Tracker 20185 None None None 2017-06-05 17:03 UTC

Description Ramakrishnan Periyasamy 2017-06-05 10:01:59 UTC
Description of problem:
rbd feature disable command crashes if no feature specified in command. It will be good if command gives proper error message or missing params or help.

command output:
==============================================================
[root@host1 ~]# rbd feature disable --image rbd-img1
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_any_cast> >'
  what():  boost::bad_any_cast: failed conversion using boost::any_cast
*** Caught signal (Aborted) **
 in thread 7fcc6aa05d80 thread_name:rbd
 ceph version 10.2.7-21.el7cp (ebe0fca146985f59e6ab136a860d1f063a26c700)
 1: (()+0x208fca) [0x7fcc6ac45fca]
 2: (()+0xf370) [0x7fcc56fa8370]
 3: (gsignal()+0x37) [0x7fcc54ff41d7]
 4: (abort()+0x148) [0x7fcc54ff58c8]
 5: (__gnu_cxx::__verbose_terminate_handler()+0x165) [0x7fcc558f8ab5]
 6: (()+0x5ea26) [0x7fcc558f6a26]
 7: (()+0x5ea53) [0x7fcc558f6a53]
 8: (()+0x5ec73) [0x7fcc558f6c73]
 9: (()+0x14f03a) [0x7fcc6ab8c03a]
 10: (std::vector<std::string, std::allocator<std::string> > const& boost::any_cast<std::vector<std::string, std::allocator<std::string> > const&>(boost::any&)+0x92) [0x7fcc6ab90652]
 11: (rbd::action::feature::execute(boost::program_options::variables_map const&, bool)+0xdb) [0x7fcc6abb071b]
 12: (rbd::Shell::execute(std::vector<char const*, std::allocator<char const*> > const&)+0x87d) [0x7fcc6ab8ecfd]
 13: (main()+0x72) [0x7fcc6ab5df22]
 14: (__libc_start_main()+0xf5) [0x7fcc54fe0b35]
 15: (()+0x13ae57) [0x7fcc6ab77e57]
2017-06-05 15:23:20.742199 7fcc6aa05d80 -1 *** Caught signal (Aborted) **
 in thread 7fcc6aa05d80 thread_name:rbd

 ceph version 10.2.7-21.el7cp (ebe0fca146985f59e6ab136a860d1f063a26c700)
 1: (()+0x208fca) [0x7fcc6ac45fca]
 2: (()+0xf370) [0x7fcc56fa8370]
 3: (gsignal()+0x37) [0x7fcc54ff41d7]
 4: (abort()+0x148) [0x7fcc54ff58c8]
 5: (__gnu_cxx::__verbose_terminate_handler()+0x165) [0x7fcc558f8ab5]
 6: (()+0x5ea26) [0x7fcc558f6a26]
 7: (()+0x5ea53) [0x7fcc558f6a53]
 8: (()+0x5ec73) [0x7fcc558f6c73]
 9: (()+0x14f03a) [0x7fcc6ab8c03a]
 10: (std::vector<std::string, std::allocator<std::string> > const& boost::any_cast<std::vector<std::string, std::allocator<std::string> > const&>(boost::any&)+0x92) [0x7fcc6ab90652]
 11: (rbd::action::feature::execute(boost::program_options::variables_map const&, bool)+0xdb) [0x7fcc6abb071b]
 12: (rbd::Shell::execute(std::vector<char const*, std::allocator<char const*> > const&)+0x87d) [0x7fcc6ab8ecfd]
 13: (main()+0x72) [0x7fcc6ab5df22]
 14: (__libc_start_main()+0xf5) [0x7fcc54fe0b35]
 15: (()+0x13ae57) [0x7fcc6ab77e57]
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.

--- begin dump of recent events ---
   -14> 2017-06-05 15:23:20.736924 7fcc6aa05d80  5 asok(0x7fcc74f509d0) register_command perfcounters_dump hook 0x7fcc74f55860
   -13> 2017-06-05 15:23:20.736933 7fcc6aa05d80  5 asok(0x7fcc74f509d0) register_command 1 hook 0x7fcc74f55860
   -12> 2017-06-05 15:23:20.736935 7fcc6aa05d80  5 asok(0x7fcc74f509d0) register_command perf dump hook 0x7fcc74f55860
   -11> 2017-06-05 15:23:20.736938 7fcc6aa05d80  5 asok(0x7fcc74f509d0) register_command perfcounters_schema hook 0x7fcc74f55860
   -10> 2017-06-05 15:23:20.736940 7fcc6aa05d80  5 asok(0x7fcc74f509d0) register_command 2 hook 0x7fcc74f55860
    -9> 2017-06-05 15:23:20.736942 7fcc6aa05d80  5 asok(0x7fcc74f509d0) register_command perf schema hook 0x7fcc74f55860
    -8> 2017-06-05 15:23:20.736944 7fcc6aa05d80  5 asok(0x7fcc74f509d0) register_command perf reset hook 0x7fcc74f55860
    -7> 2017-06-05 15:23:20.736945 7fcc6aa05d80  5 asok(0x7fcc74f509d0) register_command config show hook 0x7fcc74f55860
    -6> 2017-06-05 15:23:20.736947 7fcc6aa05d80  5 asok(0x7fcc74f509d0) register_command config set hook 0x7fcc74f55860
    -5> 2017-06-05 15:23:20.736948 7fcc6aa05d80  5 asok(0x7fcc74f509d0) register_command config get hook 0x7fcc74f55860
    -4> 2017-06-05 15:23:20.736952 7fcc6aa05d80  5 asok(0x7fcc74f509d0) register_command config diff hook 0x7fcc74f55860
    -3> 2017-06-05 15:23:20.736954 7fcc6aa05d80  5 asok(0x7fcc74f509d0) register_command log flush hook 0x7fcc74f55860
    -2> 2017-06-05 15:23:20.736956 7fcc6aa05d80  5 asok(0x7fcc74f509d0) register_command log dump hook 0x7fcc74f55860
    -1> 2017-06-05 15:23:20.736963 7fcc6aa05d80  5 asok(0x7fcc74f509d0) register_command log reopen hook 0x7fcc74f55860
     0> 2017-06-05 15:23:20.742199 7fcc6aa05d80 -1 *** Caught signal (Aborted) **
 in thread 7fcc6aa05d80 thread_name:rbd

 ceph version 10.2.7-21.el7cp (ebe0fca146985f59e6ab136a860d1f063a26c700)
 1: (()+0x208fca) [0x7fcc6ac45fca]
 2: (()+0xf370) [0x7fcc56fa8370]
 3: (gsignal()+0x37) [0x7fcc54ff41d7]
 4: (abort()+0x148) [0x7fcc54ff58c8]
 5: (__gnu_cxx::__verbose_terminate_handler()+0x165) [0x7fcc558f8ab5]
 6: (()+0x5ea26) [0x7fcc558f6a26]
 7: (()+0x5ea53) [0x7fcc558f6a53]
 8: (()+0x5ec73) [0x7fcc558f6c73]
 9: (()+0x14f03a) [0x7fcc6ab8c03a]
 10: (std::vector<std::string, std::allocator<std::string> > const& boost::any_cast<std::vector<std::string, std::allocator<std::string> > const&>(boost::any&)+0x92) [0x7fcc6ab90652]
 11: (rbd::action::feature::execute(boost::program_options::variables_map const&, bool)+0xdb) [0x7fcc6abb071b]
 12: (rbd::Shell::execute(std::vector<char const*, std::allocator<char const*> > const&)+0x87d) [0x7fcc6ab8ecfd]
 13: (main()+0x72) [0x7fcc6ab5df22]
 14: (__libc_start_main()+0xf5) [0x7fcc54fe0b35]
 15: (()+0x13ae57) [0x7fcc6ab77e57]
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.

--- logging levels ---
   0/ 5 none
   0/ 1 lockdep
   0/ 1 context
   1/ 1 crush
   1/ 5 mds
   1/ 5 mds_balancer
   1/ 5 mds_locker
   1/ 5 mds_log
   1/ 5 mds_log_expire
   1/ 5 mds_migrator
   0/ 1 buffer
   0/ 1 timer
   0/ 1 filer
   0/ 1 striper
   0/ 1 objecter
   0/ 5 rados
   0/ 5 rbd
   0/ 5 rbd_mirror
   0/ 5 rbd_replay
   0/ 5 journaler
   0/ 5 objectcacher
   0/ 5 client
   0/ 5 osd
   0/ 5 optracker
   0/ 5 objclass
   1/ 3 filestore
   1/ 3 journal
   0/ 5 ms
   1/ 5 mon
   0/10 monc
   1/ 5 paxos
   0/ 5 tp
   1/ 5 auth
   1/ 5 crypto
   1/ 1 finisher
   1/ 5 heartbeatmap
   1/ 5 perfcounter
   1/ 5 rgw
   1/10 civetweb
   1/ 5 javaclient
   1/ 5 asok
   1/ 1 throttle
   0/ 0 refs
   1/ 5 xio
   1/ 5 compressor
   1/ 5 newstore
   1/ 5 bluestore
   1/ 5 bluefs
   1/ 3 bdev
   1/ 5 kstore
   4/ 5 rocksdb
   4/ 5 leveldb
   1/ 5 kinetic
   1/ 5 fuse
  -2/-2 (syslog threshold)
  99/99 (stderr threshold)
  max_recent       500
  max_new         1000
  log_file 
--- end dump of recent events ---
Aborted


Version-Release number of selected component (if applicable):
ceph: 10.2.7-21.el7cp (ebe0fca146985f59e6ab136a860d1f063a26c700)

How reproducible:
2/2

Steps to Reproduce:
1. Configure cluster 
2. Create rbd in a pool with default features.
      cmd used: "rbd create rbd-img1 -p rbd --size 1024000"
3. run below command.
      rbd feature disable --image rbd-img1

Actual results:
Command crashes.

Expected results:
Command should give proper error message or help information. it should not crash

Additional info:
NA

Comment 3 Jason Dillaman 2017-06-05 17:02:41 UTC
Trivial fix -- note that "rbd feature enable <image-spec>" does not crash, only when the image is specified using the optional.

Comment 4 Jason Dillaman 2017-06-05 17:18:44 UTC
Upstream PR: https://github.com/ceph/ceph/pull/15492

Comment 9 Ramakrishnan Periyasamy 2017-06-07 07:38:58 UTC
Moving this bug to verified state.

Command not crashing, output is below.

[root@host1 ~]# rbd feature disable --image rbd-img1
rbd: at least one feature name must be specified
[root@host1 ~]# rbd feature disable --image 
rbd: the required argument for option '--image' is missing
[root@host1 ~]# rbd feature disable --image rbd-img1
rbd: at least one feature name must be specified
[root@host1 ~]# rbd feature disable rbd-img1
rbd: at least one feature name must be specified
[root@host1 ~]# rbd feature disable 
rbd: image name was not specified
[root@host1 ~]# rbd feature disable pool1-img1
rbd: at least one feature name must be specified

Comment 11 errata-xmlrpc 2017-06-19 13:33:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1497


Note You need to log in before you can comment on or make changes to this bug.