|
On evsadm (and many other commands), it takes null value to reset a specific parameter. i.e.)
-
evsadm set-evsprop -p maxbw= HR
This command will reset the value of maxbw of the evs instance, HR. (Please note that maxbw is blank, not HR. HR is the evs name )
This makes total sense since there is no default value for maxbw and null(blank) means that a user wants to reset it to none.
This method works fine with Puppet when you do 'apply'.
-
puppet apply -e "evs {'sys-global/HR': maxbw=>''}
" Notice: Compiled catalog for bamd-sfb-01.us.oracle.com in environment production in 0.07 seconds Notice: /Stage[main]/Main/Evs[sys-global/HR]/maxbw: maxbw changed '1G' to '' Notice: Finished catalog run in 6.28 seconds
However Puppet resource doesn't seem happy with null value for a parameter.
-
puppet resource evs sys-global/HR maxbw='' --debug
Error: Could not run: Invalid parameter setting maxbw=
Puppet should allow setting an empty parameter by the puppet command.
The values:
maxbw= maxbw=''
From the puppet command's perspective, are exactly the same thing, and should really be valid.
Taking a look at the code, it would seem to be that...
In the file:
/usr/ruby/1.9/lib/amd64/ruby/vendor_ruby/1.9.1/puppet/application/resource.rb
The first problem that I see in the code is:
args.each do |setting| if setting =~ /^(\w+)=(.+)$/ params[$1] = $2 else raise "Invalid parameter setting # {setting}
" end end
What I get from reading this is that the value after the '=' must contain at least one character, which of course something like 'maxbw=' doesn't...
|