Skip to content

Commit ee66dc5

Browse files
committed
nvmeofgw*: fix no-listeners
Signed-off-by: Leonid Chernin <[email protected]>
1 parent 744eb5c commit ee66dc5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/mon/NVMeofGwMon.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,15 +625,15 @@ bool NVMeofGwMon::prepare_beacon(MonOpRequestRef op)
625625
avail = gw_availability_t::GW_CREATED;
626626
dout(20) << "No-subsystems condition detected for GW " << gw_id <<dendl;
627627
} else {
628-
bool listener_found = true;
628+
bool listener_found = false;
629629
for (auto &subs: sub) {
630-
if (subs.listeners.size() == 0) {
631-
listener_found = false;
632-
dout(10) << "No-listeners condition detected for GW " << gw_id << " for nqn " << subs.nqn << dendl;
630+
if (subs.listeners.size()) {
631+
listener_found = true;
633632
break;
634633
}
635634
}
636635
if (!listener_found) {
636+
dout(10) << "No-listeners condition detected for GW " << gw_id << dendl;
637637
avail = gw_availability_t::GW_CREATED;
638638
}
639639
}// for HA no-subsystems and no-listeners are same usecases

0 commit comments

Comments
 (0)