File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
chef/cookbooks/crowbar-pacemaker Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ module CrowbarPacemaker
2020 module MaintenanceModeHelpers
2121 def maintenance_mode?
2222 # See https://bugzilla.suse.com/show_bug.cgi?id=870696
23- !! ( %x( crm_attribute -G -N #{ node . hostname } -n maintenance -q) =~ /^on$/ )
23+ ` crm_attribute -G -N #{ node . hostname } -n maintenance -q` =~ /^on$/
2424 end
2525
2626 def set_maintenance_mode_via_this_chef_run
@@ -32,14 +32,14 @@ def set_maintenance_mode_via_this_chef_run
3232 #
3333 # We use a default attribute so that it will get reset at the
3434 # beginning of each chef-client run.
35- node . default [ :pacemaker ] [ :maintenance_mode ] [ $$ ] [ :via_chef ] = true
35+ node . default [ :pacemaker ] [ :maintenance_mode ] [ $PID ] [ :via_chef ] = true
3636 end
3737
3838 def maintenance_mode_set_via_this_chef_run?
3939 # The "== true" is required because Chef::Node::Attribute does
4040 # auto-vivification on read (!), so the value will be initialized
4141 # to an empty Chef::Node::Attribute if not already set to true.
42- node . default [ :pacemaker ] [ :maintenance_mode ] [ $$ ] [ :via_chef ] == true
42+ node . default [ :pacemaker ] [ :maintenance_mode ] [ $PID ] [ :via_chef ] == true
4343 end
4444 end
4545end
Original file line number Diff line number Diff line change 5757if loaded
5858 Chef ::Log . debug ( "Pacemaker maintenance handlers already installed" )
5959else
60- Chef ::Log . info ( "Pacemaker maintenance handlers not installed; " +
60+ Chef ::Log . info ( "Pacemaker maintenance handlers not installed; " \
6161 "scheduling Chef config reload" )
6262 ruby_block "reload_chef_client_config" do
6363 block { Chef ::Config . from_file ( "/etc/chef/client.rb" ) }
You can’t perform that action at this time.
0 commit comments