Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: cibtools: adjust to the new cibadmin format #281

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading