I got this error message:
Error: /Virt[test-1]: Could not evaluate: Execution of '/usr/sbin/vzctl status Unable' returned 21: Bad CT ID Unable
Looking in puppet-virt/lib/puppet/provider/virt/openvz.rb I see:
# Returns all host's guests
def self.instances
guests = []
execpipe "#{vzlist} --no-header -a -o ctid" do |process|
process.collect do |line|
next unless options = parse(line)
guests << new(options)
end
end
guests
end
Unfortunately if I run:
$ sudo vzlist --no-header -a -o ctid
I get
Unable to open /proc/vz/veinfo: No such file or directory
Unable to open /proc/user_beancounters: No such file or directory
(as OpenVZ is not properly set up) Unfortunately vzlist does not return an error code in this case. Perhaps some validation of its output would solve this problem and prevent garbage spreading through the code.
I got this error message: Error: /Virt[test-1]: Could not evaluate: Execution of '/usr/sbin/vzctl status Unable' returned 21: Bad CT ID Unable
Looking in puppet-virt/lib/puppet/provider/virt/openvz.rb I see:
Unfortunately if I run:
I get
(as OpenVZ is not properly set up) Unfortunately vzlist does not return an error code in this case. Perhaps some validation of its output would solve this problem and prevent garbage spreading through the code.