Kyle Anderson
2012-Feb-22 01:52 UTC
[Puppet Users] Multiple default providers for package: dpkg, pip; using dpkg, Why?
Can someone help me understand how why this is happening? I have two Ubuntu laptops that are pretty much the same. Neither of them have pip installed, but even if I do install pip, it doesn''t seem to make a difference. I''ve boiled down my manifests to try to reduce the problem, and this is how it manifests: root@cody-laptop:/# puppet apply -e ''package { openssh-server: ensure => latest; }'' warning: Found multiple default providers for package: dpkg, pip; using dpkg err: /Stage[main]//Package[openssh-server]: Could not evaluate: Could not get latest version: Execution of ''/usr/bin/dpkg-deb --show '' returned 2: dpkg-deb: error: failed to read archive `'': No such file or directory notice: Finished catalog run in 0.39 seconds Debug output: http://pastebin.com/uw6E6pSV Facter output: http://pastebin.com/MJTBGCRQ Other laptop works fine: root@kyle:~# puppet apply -e ''package { openssh-server: ensure => latest; }'' notice: Finished catalog run in 0.32 seconds Debug output: http://pastebin.com/vAZffw3n Facter output: http://pastebin.com/7kFHy6j0 I''ve done --debug stuff, and I can kinda see it testing for the existence of other package managers, but not for pip. But it looks like it is trying to use dpkg-deb, but something goes wrong. What I would like to know is why it fails on the one laptop, but not the other. What I really want to know is how I can better troubleshoot this myself :) It is really stumping me. Let me know if I can provide more information to help diagnose it. It as if puppet on the broken one is actually trying to use dpkg instead of apt, but in a wrong way, and the pip thing is a red- herring? Kyle -- 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.
jcbollinger
2012-Feb-22 14:58 UTC
[Puppet Users] Re: Multiple default providers for package: dpkg, pip; using dpkg, Why?
On Feb 21, 7:52 pm, Kyle Anderson <k...@xkyle.com> wrote:> Can someone help me understand how why this is happening? I have two > Ubuntu laptops that are pretty much the same. Neither of them have pip > installed, but even if I do install pip, it doesn''t seem to make a > difference. > > I''ve boiled down my manifests to try to reduce the problem, and this > is how it manifests: > > root@cody-laptop:/# puppet apply -e ''package { openssh-server: ensure > => latest; }'' > warning: Found multiple default providers for package: dpkg, pip; > using dpkg > err: /Stage[main]//Package[openssh-server]: Could not evaluate: Could > not get latest version: Execution of ''/usr/bin/dpkg-deb --show '' > returned 2: dpkg-deb: error: failed to read archive `'': No such file > or directory > notice: Finished catalog run in 0.39 seconds > Debug output:http://pastebin.com/uw6E6pSV > Facter output:http://pastebin.com/MJTBGCRQ > > Other laptop works fine: > root@kyle:~# puppet apply -e ''package { openssh-server: ensure => > latest; }'' > notice: Finished catalog run in 0.32 seconds > Debug output:http://pastebin.com/vAZffw3n > Facter output:http://pastebin.com/7kFHy6j0 > > I''ve done --debug stuff, and I can kinda see it testing for the > existence of other package managers, but not for pip. > > But it looks like it is trying to use dpkg-deb, but something goes > wrong. > > What I would like to know is why it fails on the one laptop, but not > the other. What I really want to know is how I can better troubleshoot > this myself :) It is really stumping me. Let me know if I can provide > more information to help diagnose it. > > It as if puppet on the broken one is actually trying to use dpkg > instead of apt, but in a wrong way, and the pip thing is a red- > herring?When the Puppet agent runs, it examines its operating environment to choose the appropriate local tools to use to perform various operations. For example, it determines which package manager to use. Puppet''s interface to a local tool (set) is called a "provider", and most resource types have several different providers available. If Puppet cannot narrow the provider list to a single most appropriate element then it chooses one of the possibilities and issues a warning such as you reported. This is not a problem as long as Puppet has chosen the right provider. Since you don''t even have pip installed, it should not be a problem that Puppet is choosing dpkg over pip. As I understand it, however, the appropriate Package provider for Ubuntu would be apt. The fact that Puppet is trying to use dpkg-deb instead is probably the key characteristic your problem. You can override the default Package provider via the ''provider'' metaparameter, like so: puppet apply -e ''package { openssh-server: ensure => latest, provider => apt; }'' In a set of manifest files, you can avoid having to set the provider on every Package resource by means of a resource default: site.pp =====# ... if $::operatingsystem == ''Ubuntu'' { Package { provider => ''apt'' } } # ... ===== You should also ensure that your nodes have a recent Facter ( >1.6.0 ), as earlier versions were inconsistent about distinguishing Ubuntu from Debian. That by itself might even solve your problem, and differing versions of Facter might explain why only one of your systems is affected. John -- 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.
Kyle Anderson
2012-Feb-22 23:19 UTC
Re: [Puppet Users] Re: Multiple default providers for package: dpkg, pip; using dpkg, Why?
I see. I''m running facter 1.5.9 on both Ubuntu 11.10 hosts, stock packages. If I do force it to use apt as the provider I still get an error, but it exposes something else: # puppet apply -e ''package { openssh-server: ensure => latest, provider => apt; }'' warning: Found multiple default providers for package: dpkg, pip; using dpkg err: /Stage[main]//Package[openssh-server]: Could not evaluate: Provider apt is not functional on this host at line 1 notice: Finished catalog run in 0.34 seconds Debug: http://pastebin.com/ra05pSsw Which says that my /usr/bin/debconf-set-selections does not exist, except that it does, and it is some sort of cpython header file? I don''t know how the heck that got there... so I ran: apt-get install --reinstall debconf And it works! So thank you for leading me in the right direction and explaining how the provider interacts with facter. As far as why my debconf package was borked... man I don''t know :( Thank you again. On Wed, Feb 22, 2012 at 9:58 AM, jcbollinger <John.Bollinger@stjude.org> wrote:> > > On Feb 21, 7:52 pm, Kyle Anderson <k...@xkyle.com> wrote: >> Can someone help me understand how why this is happening? I have two >> Ubuntu laptops that are pretty much the same. Neither of them have pip >> installed, but even if I do install pip, it doesn''t seem to make a >> difference. >> >> I''ve boiled down my manifests to try to reduce the problem, and this >> is how it manifests: >> >> root@cody-laptop:/# puppet apply -e ''package { openssh-server: ensure >> => latest; }'' >> warning: Found multiple default providers for package: dpkg, pip; >> using dpkg >> err: /Stage[main]//Package[openssh-server]: Could not evaluate: Could >> not get latest version: Execution of ''/usr/bin/dpkg-deb --show '' >> returned 2: dpkg-deb: error: failed to read archive `'': No such file >> or directory >> notice: Finished catalog run in 0.39 seconds >> Debug output:http://pastebin.com/uw6E6pSV >> Facter output:http://pastebin.com/MJTBGCRQ >> >> Other laptop works fine: >> root@kyle:~# puppet apply -e ''package { openssh-server: ensure => >> latest; }'' >> notice: Finished catalog run in 0.32 seconds >> Debug output:http://pastebin.com/vAZffw3n >> Facter output:http://pastebin.com/7kFHy6j0 >> >> I''ve done --debug stuff, and I can kinda see it testing for the >> existence of other package managers, but not for pip. >> >> But it looks like it is trying to use dpkg-deb, but something goes >> wrong. >> >> What I would like to know is why it fails on the one laptop, but not >> the other. What I really want to know is how I can better troubleshoot >> this myself :) It is really stumping me. Let me know if I can provide >> more information to help diagnose it. >> >> It as if puppet on the broken one is actually trying to use dpkg >> instead of apt, but in a wrong way, and the pip thing is a red- >> herring? > > > When the Puppet agent runs, it examines its operating environment to > choose the appropriate local tools to use to perform various > operations. For example, it determines which package manager to use. > Puppet''s interface to a local tool (set) is called a "provider", and > most resource types have several different providers available. > > If Puppet cannot narrow the provider list to a single most appropriate > element then it chooses one of the possibilities and issues a warning > such as you reported. This is not a problem as long as Puppet has > chosen the right provider. Since you don''t even have pip installed, > it should not be a problem that Puppet is choosing dpkg over pip. > > As I understand it, however, the appropriate Package provider for > Ubuntu would be apt. The fact that Puppet is trying to use dpkg-deb > instead is probably the key characteristic your problem. You can > override the default Package provider via the ''provider'' > metaparameter, like so: > > puppet apply -e ''package { openssh-server: ensure => latest, provider > => apt; }'' > > In a set of manifest files, you can avoid having to set the provider > on every Package resource by means of a resource default: > > site.pp > =====> # ... > > if $::operatingsystem == ''Ubuntu'' { > Package { provider => ''apt'' } > } > > # ... > =====> > You should also ensure that your nodes have a recent Facter ( >> 1.6.0 ), as earlier versions were inconsistent about distinguishing > Ubuntu from Debian. That by itself might even solve your problem, and > differing versions of Facter might explain why only one of your > systems is affected. > > > John > > -- > 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. >-- 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.
狐狐
2012-Mar-23 04:29 UTC
[Puppet Users] Re: Multiple default providers for package: dpkg, pip; using dpkg, Why?
I met the same problem on rhel5.4 On 2月23日, 上午7时19分, Kyle Anderson <k...@xkyle.com> wrote:> I see. I''m running facter 1.5.9 on both Ubuntu 11.10 hosts, stock packages. > > If I do force it to use apt as the provider I still get an error, but > it exposes something else: > > # puppet apply -e ''package { openssh-server: ensure => latest, > provider => apt; }'' > warning: Found multiple default providers for package: dpkg, pip; using dpkg > err: /Stage[main]//Package[openssh-server]: Could not evaluate: > Provider apt is not functional on this host at line 1 > notice: Finished catalog run in 0.34 seconds > Debug:http://pastebin.com/ra05pSsw > > Which says that my /usr/bin/debconf-set-selections does not exist, > except that it does, and it is some sort of cpython header file? I > don''t know how the heck that got there... so I ran: > apt-get install --reinstall debconf > > And it works! So thank you for leading me in the right direction and > explaining how the provider interacts with facter. As far as why my > debconf package was borked... man I don''t know :( Thank you again. > > > > > > > > On Wed, Feb 22, 2012 at 9:58 AM, jcbollinger <John.Bollin...@stjude.org> wrote: > > > On Feb 21, 7:52 pm, Kyle Anderson <k...@xkyle.com> wrote: > >> Can someone help me understand how why this is happening? I have two > >> Ubuntu laptops that are pretty much the same. Neither of them have pip > >> installed, but even if I do install pip, it doesn''t seem to make a > >> difference. > > >> I''ve boiled down my manifests to try to reduce the problem, and this > >> is how it manifests: > > >> root@cody-laptop:/# puppet apply -e ''package { openssh-server: ensure > >> => latest; }'' > >> warning: Found multiple default providers for package: dpkg, pip; > >> using dpkg > >> err: /Stage[main]//Package[openssh-server]: Could not evaluate: Could > >> not get latest version: Execution of ''/usr/bin/dpkg-deb --show '' > >> returned 2: dpkg-deb: error: failed to read archive `'': No such file > >> or directory > >> notice: Finished catalog run in 0.39 seconds > >> Debug output:http://pastebin.com/uw6E6pSV > >> Facter output:http://pastebin.com/MJTBGCRQ > > >> Other laptop works fine: > >> root@kyle:~# puppet apply -e ''package { openssh-server: ensure => > >> latest; }'' > >> notice: Finished catalog run in 0.32 seconds > >> Debug output:http://pastebin.com/vAZffw3n > >> Facter output:http://pastebin.com/7kFHy6j0 > > >> I''ve done --debug stuff, and I can kinda see it testing for the > >> existence of other package managers, but not for pip. > > >> But it looks like it is trying to use dpkg-deb, but something goes > >> wrong. > > >> What I would like to know is why it fails on the one laptop, but not > >> the other. What I really want to know is how I can better troubleshoot > >> this myself :) It is really stumping me. Let me know if I can provide > >> more information to help diagnose it. > > >> It as if puppet on the broken one is actually trying to use dpkg > >> instead of apt, but in a wrong way, and the pip thing is a red- > >> herring? > > > When the Puppet agent runs, it examines its operating environment to > > choose the appropriate local tools to use to perform various > > operations. For example, it determines which package manager to use. > > Puppet''s interface to a local tool (set) is called a "provider", and > > most resource types have several different providers available. > > > If Puppet cannot narrow the provider list to a single most appropriate > > element then it chooses one of the possibilities and issues a warning > > such as you reported. This is not a problem as long as Puppet has > > chosen the right provider. Since you don''t even have pip installed, > > it should not be a problem that Puppet is choosing dpkg over pip. > > > As I understand it, however, the appropriate Package provider for > > Ubuntu would be apt. The fact that Puppet is trying to use dpkg-deb > > instead is probably the key characteristic your problem. You can > > override the default Package provider via the ''provider'' > > metaparameter, like so: > > > puppet apply -e ''package { openssh-server: ensure => latest, provider > > => apt; }'' > > > In a set of manifest files, you can avoid having to set the provider > > on every Package resource by means of a resource default: > > > site.pp > > =====> > # ... > > > if $::operatingsystem == ''Ubuntu'' { > > Package { provider => ''apt'' } > > } > > > # ... > > =====> > > You should also ensure that your nodes have a recent Facter ( >> > 1.6.0 ), as earlier versions were inconsistent about distinguishing > > Ubuntu from Debian. That by itself might even solve your problem, and > > differing versions of Facter might explain why only one of your > > systems is affected. > > > John > > > -- > > 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 athttp://groups.google.com/group/puppet-users?hl=en.-- 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.