Skip to content

Commit

Permalink
Fix cib.xml parsing for acl_version (bsc#1158681)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoub-belarbi committed Dec 17, 2019
1 parent ad46139 commit 20cbdcc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions hawk/lib/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,7 @@ def acl_enabled?

def acl_version
Rails.cache.fetch(:get_acl_version) do
m = safe_x(
'/usr/sbin/cibadmin',
'-t', '5',
'-Ql',
'--xpath',
'/cib[@validate-with]').lines.first.to_s.match(/validate-with=\"pacemaker-([0-9.]+)\"/)
m = `/usr/sbin/cibadmin -t 5 -Ql --xpath /cib[@validate-with]`.shellescape.lines.first.to_s.match(/validate-with=\"pacemaker-([0-9.]+)\"/)
return m.captures[0].to_f if m
2.0
end
Expand Down

0 comments on commit 20cbdcc

Please sign in to comment.