Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
expect_false "ceph osd blacklist $bl/-1"
expect_false "ceph osd blacklist $bl/foo"
+ # test with wrong address
+ expect_false "ceph osd blacklist 1234.56.78.90/100"
+
# Test `clear`
ceph osd blacklist add $bl
ceph osd blacklist ls | grep $bl
string addrstr;
cmd_getval(g_ceph_context, cmdmap, "addr", addrstr);
entity_addr_t addr;
- if (!addr.parse(addrstr.c_str(), 0))
+ if (!addr.parse(addrstr.c_str(), 0)) {
ss << "unable to parse address " << addrstr;
+ err = -EINVAL;
+ goto reply;
+ }
else {
string blacklistop;
cmd_getval(g_ceph_context, cmdmap, "blacklistop", blacklistop);