Luke Bigum
2011-Sep-07 16:14 UTC
[Puppet Users] custom type treating a parameter as a method?
Hi list, I''m currently looking at the puppet-virt module at https://github.com/carlasouza/puppet-virt.git to see if it will work in my environment and I''ve run into a Puppet/Ruby problem I don''t know where to begin debugging. It looks like one of the custom type''s parameters is being interpreted as a method. Some puppet debug output: [root@host ~]# puppet apply ~/test.pp --debug --verbose info: Loading facts in mac_to_interface ... debug: Puppet::Type::Virt::ProviderLibvirt: Executing ''/usr/bin/virt- install --name f15test04 --ram 4096 --vcpus 2 --noautoconsole --force --accelerate --disk path=/var/lib/libvirt/images/f15test04/ f15test04.img,size=8 --pxe --network bridge=br10 --nographics'' err: /Stage[main]//Virt[f15test04]/ensure: change from absent to running failed: Could not set ''running on ensure: undefined method `interfaces='' for #<Puppet::Type::Virt::ProviderLibvirt: 0x7fdd7b86b9c8> at /root/test.pp:19 notice: Finished catalog run in 1.44 seconds Running the same manifest again while the VM instance is up and running (but broken) I get a slightly different error but roughly the same thing: err: /Stage[main]//Virt[f15test04]: Could not evaluate: undefined method `interfaces'' for #<Puppet::Type::Virt::ProviderLibvirt: 0x7fcc8fbe9e58> Here''s the test.pp resource to reproduce the problem: virt { "f15test04": hostname => "f15test04.dev.tradefair", desc => "Fedora 15 test VM 4", ensure => running, virt_type => ''kvm'', os_type => ''linux'', os_template => ''virtio26'', virt_path => ''/var/lib/libvirt/images/f15test04/f15test04.img'', memory => ''4096'', cpus => ''2'', graphics => ''disable'', disk_size => ''8'', autoboot => true, interfaces => "br10", } Does anyone successfully use that module to provision and manage VMs? Anyone want to take a stab at the error? Any help is much appreciated. Thanks, -Luke -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Carla Araujo
2011-Sep-07 17:06 UTC
Re: [Puppet Users] custom type treating a parameter as a method?
Hi Luke I have updated the virt type with ''interfaces'' as a new property instead of a parameter, like it was used do be in the last version. This change was made focused on the openvz provider but I forgot to apply the changes to the libvirt provider. My mistake :( I''ll fix that and I''ll notify you when I finish it. Cheers, Carla Souza On Wed, Sep 7, 2011 at 13:14, Luke Bigum <Luke.Bigum@lmax.com> wrote:> undefined method `interfaces='' >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Luke Bigum
2011-Sep-07 17:42 UTC
[Puppet Users] Re: custom type treating a parameter as a method?
Ahh, thanks Carla. I''ve hacked around that for the moment. I''ve also got a few other hacks on the libvirt provider I''ll provide back to you when I''m done. Another problem has risen out of what I''m doing, it''s not exactly related so deservers a new post. On Sep 7, 6:06 pm, Carla Araujo <carla.aso...@gmail.com> wrote:> Hi Luke > > I have updated the virt type with ''interfaces'' as a new property instead of > a parameter, like it was used do be in the last version. This change was > made focused on the openvz provider but I forgot to apply the changes to the > libvirt provider. My mistake :( > I''ll fix that and I''ll notify you when I finish it. > > Cheers, > > Carla Souza > > > > > > > > On Wed, Sep 7, 2011 at 13:14, Luke Bigum <Luke.Bi...@lmax.com> wrote: > > undefined method `interfaces=''-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.