puppet-virt icon indicating copy to clipboard operation
puppet-virt copied to clipboard

Duplicate declaration: Service[undef] is already declared in file virt/manifests/init.pp.

Open wica128 opened this issue 13 years ago • 2 comments

Hi,

puppet: 2.7.18 ubuntu: 12.04 LTS puppet-virt: git, today

I had a issue with virt/manifests/init.pp

"err: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Service[undef] is already declared in file /etc/puppet/modules/virt/manifests/init.pp at line 18; cannot redeclare at /etc/puppet/modules/virt/manifests/init.pp:23 on node example.com"

I solve this by changing "service { $servicename:" to "service { $virt::params::servicename:" in file /etc/puppet/modules/virt/manifests/init.pp.

Almost forgot, thnx for the work :)

wica128 avatar Sep 28 '12 21:09 wica128

On ubuntu 12.04 LTS the init script is called libvirt-bin.

I do not know how the change params.pp correct. So my workaround (I have only ubuntu systems on puppet) is changing "/^physical|^kvm/: { $servicename = 'libvirtd'"

into

"/^physical|^kvm/: { $servicename = 'libvirt-bin'"

wica128 avatar Sep 28 '12 21:09 wica128

I can confirm this problem, but the workaround doesn't work for me. I use the openvz virt_type.

leftys avatar Dec 27 '14 18:12 leftys