The "rbd-wnbd show" command will always report the device status
as "inactive". This patch adds the missing check, similar to the
one used by the "list" command.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit
94cf22e35217e33a48ab73a018c8b1015b887ca4)
}
auto conn_props = conn_info.Properties;
+ cfg.active = conn_info.DiskNumber > 0 && is_process_running(conn_props.Pid);
f->open_object_section("device");
f->dump_int("id", conn_props.Pid ? conn_props.Pid : -1);
f->dump_string("device", cfg.devpath);