Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
416
Issues
416
List
Boards
Labels
Service Desk
Milestones
Merge Requests
66
Merge Requests
66
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
Kea
Commits
365c86bc
Commit
365c86bc
authored
Jul 11, 2018
by
Marcin Siodelski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[5674] Added logs when state machine (un)paused.
parent
717006b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
3 deletions
+31
-3
src/hooks/dhcp/high_availability/ha_messages.mes
src/hooks/dhcp/high_availability/ha_messages.mes
+15
-0
src/hooks/dhcp/high_availability/ha_state_machine_control.cc
src/hooks/dhcp/high_availability/ha_state_machine_control.cc
+15
-0
src/hooks/dhcp/high_availability/ha_state_machine_control.h
src/hooks/dhcp/high_availability/ha_state_machine_control.h
+1
-3
No files found.
src/hooks/dhcp/high_availability/ha_messages.mes
View file @
365c86bc
...
...
@@ -296,6 +296,21 @@ of server startup or reconfiguration. The first argument provides the HA mode.
The second argument specifies the role of this server instance in this
configuration.
% HA_STATE_MACHINE_CONTINUED state machine is un-paused
This informational message is issued when the HA state machine is un-paused.
This unlocks the server from the current state. It may transition to any
other state if it needs to do so, e.g. 'partner-down' if its partner appears
to be offline. The server may also remain in the current state if the HA
setup state warrants such behavior.
% HA_STATE_MACHINE_PAUSED state machine paused in state %1
This informational message is issued when the HA state machine is paused.
HA state machine may be paused in certain states specified in the HA hooks library
confuguration. When the state machine is paused, the server remains in the given
state until it is explicitly unpaused (via ha-continue command). If the state
machine is paused, the server operates normally but can't transition to any
other state.
% HA_STATE_TRANSITION server transitions from %1 to %2 state, partner state is %3
This informational message is issued when the server transitions to a new
state as a result of some interaction (or lack of thereof) with its partner.
...
...
src/hooks/dhcp/high_availability/ha_state_machine_control.cc
View file @
365c86bc
...
...
@@ -4,7 +4,10 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <ha_log.h>
#include <ha_service_states.h>
#include <ha_state_machine_control.h>
#include <boost/algorithm/string.hpp>
namespace
isc
{
namespace
ha
{
...
...
@@ -33,10 +36,22 @@ HAStateMachineControl::notify(const int state) {
if
((
state_config
->
getPausing
()
==
HAConfig
::
StateConfig
::
PAUSE_ALWAYS
)
||
((
state_config
->
getPausing
()
==
HAConfig
::
StateConfig
::
PAUSE_ONCE
)
&&
first_visit
))
{
std
::
string
state_name
=
stateToString
(
state
);
boost
::
to_upper
(
state_name
);
LOG_INFO
(
ha_logger
,
HA_STATE_MACHINE_PAUSED
)
.
arg
(
state_name
);
paused_
=
true
;
}
}
}
void
HAStateMachineControl
::
unpause
()
{
if
(
amPaused
())
{
LOG_INFO
(
ha_logger
,
HA_STATE_MACHINE_CONTINUED
);
paused_
=
false
;
}
}
}
// end of namespace isc::ha
}
// end of namespace isc
src/hooks/dhcp/high_availability/ha_state_machine_control.h
View file @
365c86bc
...
...
@@ -58,9 +58,7 @@ public:
}
/// @brief Clears flag indicating that the state machine is paused.
void
unpause
()
{
paused_
=
false
;
}
void
unpause
();
private:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment