Skip to content

Commit 862ed6e

Browse files
authored
Merge pull request ceph#61113 from leonidc/wip-leonidc_no_listener_fix
nvmeofgw*: fix no-listeners
2 parents 8c4f592 + ee66dc5 commit 862ed6e

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
@@ -621,15 +621,15 @@ bool NVMeofGwMon::prepare_beacon(MonOpRequestRef op)
621621
avail = gw_availability_t::GW_CREATED;
622622
dout(20) << "No-subsystems condition detected for GW " << gw_id <<dendl;
623623
} else {
624-
bool listener_found = true;
624+
bool listener_found = false;
625625
for (auto &subs: sub) {
626-
if (subs.listeners.size() == 0) {
627-
listener_found = false;
628-
dout(10) << "No-listeners condition detected for GW " << gw_id << " for nqn " << subs.nqn << dendl;
626+
if (subs.listeners.size()) {
627+
listener_found = true;
629628
break;
630629
}
631630
}
632631
if (!listener_found) {
632+
dout(10) << "No-listeners condition detected for GW " << gw_id << dendl;
633633
avail = gw_availability_t::GW_CREATED;
634634
}
635635
}// for HA no-subsystems and no-listeners are same usecases

0 commit comments

Comments
 (0)