File tree 1 file changed +8
-2
lines changed
src/hooks/dhcp/high_availability
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2941,6 +2941,10 @@ HAService::processMaintenanceCancel() {
2941
2941
" partner-in-maintenance state." ));
2942
2942
}
2943
2943
2944
+ // This is the state the server will transition to if the notification to the
2945
+ // partner is successful.
2946
+ int next_state = getPrevState () == HA_PARTNER_IN_MAINTENANCE_ST ? HA_WAITING_ST : getPrevState ();
2947
+
2944
2948
HAConfig::PeerConfigPtr remote_config = config_->getFailoverPeerConfig ();
2945
2949
2946
2950
// Create HTTP/1.1 request including ha-maintenance-notify command
@@ -2950,7 +2954,9 @@ HAService::processMaintenanceCancel() {
2950
2954
HostHttpHeader (remote_config->getUrl ().getStrippedHostname ()));
2951
2955
remote_config->addBasicAuthHttpHeader (request);
2952
2956
request->setBodyAsJson (CommandCreator::createMaintenanceNotify (config_->getThisServerName (),
2953
- true , getCurrState (), server_type_));
2957
+ true ,
2958
+ next_state,
2959
+ server_type_));
2954
2960
request->finalize ();
2955
2961
2956
2962
// Response object should also be created because the HTTP client needs
@@ -3048,7 +3054,7 @@ HAService::processMaintenanceCancel() {
3048
3054
// previous one. Avoid returning to the partner-in-maintenance if it was
3049
3055
// the previous state.
3050
3056
postNextEvent (HA_MAINTENANCE_CANCEL_EVT);
3051
- verboseTransition (getPrevState () == HA_PARTNER_IN_MAINTENANCE_ST ? HA_WAITING_ST : getPrevState () );
3057
+ verboseTransition (next_state );
3052
3058
runModel (NOP_EVT);
3053
3059
3054
3060
return (createAnswer (CONTROL_RESULT_SUCCESS,
You can’t perform that action at this time.
0 commit comments