break;
case gw_states_per_group_t::GW_WAIT_FAILBACK_PREPARED:
+ {
+ auto& gw_id_st = created_gws[group_key][gw_id];
cancel_timer(gw_id, group_key, grpid);
map_modified = true;
for (auto& gw_st: created_gws[group_key]) {
if (st.sm_state[grpid] ==
gw_states_per_group_t::GW_OWNER_WAIT_FAILBACK_PREPARED) {
dout(4) << "Warning: Outgoing Failback when GW is without subsystems"
- << " - to rollback it" <<" GW " << gw_id << "for ANA Group "
+ <<" Owner GW set to standby state " << gw_st.first << "for ANA Group "
<< grpid << dendl;
st.standby_state(grpid);
break;
}
}
- break;
+ dout(4) << "Warning: Outgoing Failback when GW is without subsystems"
+ <<" Failback GW set to standby state " << gw_id << "for ANA Group "
+ << grpid << dendl;
+ gw_id_st.standby_state(grpid);
+ }
+ break;
case gw_states_per_group_t::GW_OWNER_WAIT_FAILBACK_PREPARED:
case gw_states_per_group_t::GW_ACTIVE_STATE:
break;
case gw_states_per_group_t::GW_WAIT_FAILBACK_PREPARED:
+ {
+ auto& gw_id_st = created_gws[group_key][gw_id];
cancel_timer(gw_id, group_key, grpid);
map_modified = true;
for (auto& gw_st: created_gws[group_key]) {
if (st.sm_state[grpid] ==
gw_states_per_group_t::GW_OWNER_WAIT_FAILBACK_PREPARED) {
dout(4) << "Warning: Outgoing Failback when GW is down back"
- << " - to rollback it" <<" GW " << gw_id << "for ANA Group "
+ <<"Owner GW set to standby state " << gw_id << "for ANA Group "
<< grpid << dendl;
st.standby_state(grpid);
break;
}
}
- break;
+ dout(4) << "Warning: Outgoing Failback when GW is down back"
+ <<" Failback GW set to standby state " << gw_id << "for ANA Group "
+ << grpid << dendl;
+ gw_id_st.standby_state(grpid);
+ }
+ break;
case gw_states_per_group_t::GW_OWNER_WAIT_FAILBACK_PREPARED:
// nothing to do - let failback timer expire
if (sub.size() == 0) {
avail = gw_availability_t::GW_CREATED;
+ dout(20) << "No-subsystems condition detected for GW " << gw_id <<dendl;
} else {
- bool listener_found = false;
+ bool listener_found = true;
for (auto &subs: sub) {
- if (subs.listeners.size()) {
- listener_found = true;
+ if (subs.listeners.size() == 0) {
+ listener_found = false;
+ dout(10) << "No-listeners condition detected for GW " << gw_id << " for nqn " << subs.nqn << dendl;
break;
}
}