Skip to content

Commit

Permalink
Merge pull request #281 from aleksei-burlakov/fix-in_ccm
Browse files Browse the repository at this point in the history
Fix: cibtools: adjust to the new cibadmin format
  • Loading branch information
aleksei-burlakov authored Jul 19, 2024
2 parents a8881f4 + f7f8b98 commit dfdc98d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hawk/app/lib/cibtools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def determine_online_status_fencing(ns)
expected_up = get_xml_attr(ns, 'shutdown', '0') == 0

state = :unclean
if in_ccm && crm_state == 'online'
if in_ccm && (crm_state == 'online' || Util.numeric?(crm_state) && crm_state.to_i > 0)
case join_state
when 'member' # rock 'n' roll (online)
state = :online
Expand All @@ -52,6 +52,8 @@ def determine_online_status_fencing(ns)
state = :offline # not online, but cleanly
elsif expected_up
state = :unclean # expected to be up, mark it unclean
elsif in_ccm && Util.numeric?(crm_state) && crm_state.to_i == 0
state = :offline # offline (explicitely)
else
state = :offline # offline
end
Expand All @@ -73,7 +75,7 @@ def determine_online_status_no_fencing(ns)
state = :unclean
if !in_ccm
state = :offline
elsif crm_state == 'online'
elsif crm_state == 'online' || Util.numeric?(crm_state) && crm_state.to_i > 0
if join_state == 'member'
state = :online
else
Expand Down

0 comments on commit dfdc98d

Please sign in to comment.