FAQ
Dear all,

I'm seeing this strange thing: When I run "*puppet agent -td*" on the node
(Nagios, in this example case), puppet fails to install Nagios3 (on Debian)
with this:


Debug: Executing '/usr/bin/dpkg-query -W --showformat ${Status} ${Package}
${Version}\n nagios3'
Debug: Executing '/usr/bin/apt-get -q -y -o
DPkg::Options::=--force-confold install nagios3'
Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o
DPkg::Options::=--force-confold install nagios3' returned 100: Reading
package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
apache2-mpm-prefork bsd-mailx javascript-common libapache2-mod-php5
libjs-jquery liblockfile-bin liblockfile1 libonig2 libqdbm14
nagios-images
nagios3-cgi nagios3-common nagios3-core php5-cli php5-common psmisc
wwwconfig-common
Suggested packages:
php-pear nagios-nrpe-plugin mysql-client postgresql-client
The following packages will be REMOVED:
apache2-mpm-worker
The following NEW packages will be installed:
apache2-mpm-prefork bsd-mailx javascript-common libapache2-mod-php5
libjs-jquery liblockfile-bin liblockfile1 libonig2 libqdbm14
nagios-images
nagios3 nagios3-cgi nagios3-common nagios3-core php5-cli php5-common
psmisc
wwwconfig-common
0 upgraded, 18 newly installed, 1 to remove and 20 not upgraded.
Need to get 5808 kB/10.9 MB of archives.
After this operation, 31.3 MB of additional disk space will be used.
Err http://ftp.de.debian.org/debian-security/ wheezy/updates/main
php5-common amd64 5.4.4-14+deb7u3
404 Not Found
Err http://ftp.de.debian.org/debian-security/ wheezy/updates/main
libapache2-mod-php5 amd64 5.4.4-14+deb7u3
404 Not Found
Err http://ftp.de.debian.org/debian-security/ wheezy/updates/main php5-cli
amd64 5.4.4-14+deb7u3
404 Not Found
Failed to fetch
http://ftp.de.debian.org/debian-security/pool/updates/main/p/php5/php5-common_5.4.4-14+deb7u3_amd64.deb
404 Not Found
Failed to fetch
http://ftp.de.debian.org/debian-security/pool/updates/main/p/php5/libapache2-mod-php5_5.4.4-14+deb7u3_amd64.deb
404 Not Found
Failed to fetch
http://ftp.de.debian.org/debian-security/pool/updates/main/p/php5/php5-cli_5.4.4-14+deb7u3_amd64.deb
404 Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with
--fix-missing?

But if I run the same command (well, without '-y') on the node, it works
just fine.

root@ip-10-0-2-44:~# /usr/bin/apt-get -q -o DPkg::Options::=--force-confold
install nagios3
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
apache2-mpm-prefork bsd-mailx javascript-common libapache2-mod-php5
libjs-jquery liblockfile-bin liblockfile1 libonig2
libqdbm14 nagios-images nagios3-cgi nagios3-common nagios3-core php5-cli
php5-common psmisc wwwconfig-common
Suggested packages:
php-pear nagios-nrpe-plugin mysql-client postgresql-client
The following packages will be REMOVED:
apache2-mpm-worker
The following NEW packages will be installed:
apache2-mpm-prefork bsd-mailx javascript-common libapache2-mod-php5
libjs-jquery liblockfile-bin liblockfile1 libonig2
libqdbm14 nagios-images nagios3 nagios3-cgi nagios3-common nagios3-core
php5-cli php5-common psmisc wwwconfig-common
0 upgraded, 18 newly installed, 1 to remove and 20 not upgraded.
Need to get 5808 kB/10.9 MB of archives.
After this operation, 31.3 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Any idea what am I missing here? Thanks in advance.
Cheers!!

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Jcbollinger at Oct 10, 2013 at 2:06 pm

    On Thursday, October 10, 2013 4:34:59 AM UTC-5, Sans wrote:
    Dear all,

    I'm seeing this strange thing: When I run "*puppet agent -td*" on the
    node (Nagios, in this example case), puppet fails to install Nagios3 (on
    Debian) with this:
    [...]
    But if I run the same command (well, without '-y') on the node, it works
    just fine.
    I don't think you've demonstrated that it does run fine from the command
    line. It appears to me that the error reported by Puppet would not
    manifest on the command line until after the point where your transcript
    cuts off.

    Anyway, if a command succeeds when run from the command line but fails when
    executed by Puppet then the usual problem is a difference in execution
    environment, typically in the environment variables. Puppet intentionally
    provides a very sparse environment to external commands it executes. Your
    case is unusual in that the command seems to mostly work. Could it be that
    you need a proxy server configured for FTP, but not for HTTP?


    John

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Sans at Oct 11, 2013 at 10:42 am
    True! I didn't show that it actually installed from the command line but it
    does/did. After a bit digging, I found a rather strange issue - that was
    the very first installation just after spinning up the instance and puppet
    needed an *apt-get update* first to carry-on with installation, whilst it
    was just fine from the CLI, without issuing *update* first. It happened on
    a number of nodes in my cluster, so I tested several times. Any further
    thought/comments on that?

    -San

    On Thursday, October 10, 2013 3:06:40 PM UTC+1, jcbollinger wrote:


    I don't think you've demonstrated that it does run fine from the command
    line. It appears to me that the error reported by Puppet would not
    manifest on the command line until after the point where your transcript
    cuts off.

    Anyway, if a command succeeds when run from the command line but fails
    when executed by Puppet then the usual problem is a difference in execution
    environment, typically in the environment variables. Puppet intentionally
    provides a very sparse environment to external commands it executes. Your
    case is unusual in that the command seems to mostly work. Could it be that
    you need a proxy server configured for FTP, but not for HTTP?


    John
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jcbollinger at Oct 11, 2013 at 1:11 pm

    On Friday, October 11, 2013 5:42:27 AM UTC-5, Sans wrote:
    True! I didn't show that it actually installed from the command line but
    it does/did. After a bit digging, I found a rather strange issue - that was
    the very first installation just after spinning up the instance and puppet
    needed an *apt-get update* first to carry-on with installation, whilst it
    was just fine from the CLI, without issuing *update* first. It happened
    on a number of nodes in my cluster, so I tested several times. Any further
    thought/comments on that?
    I am not sufficiently familiar with details of apt to speculate on what *
    particular* difference in execution environment might explain the
    discrepancy, but clearly, if the same command produces different results in
    different contexts then the differences must arise from the context.
    Puppet itself is not particularly distinguished from any other program
    (such as a shell) that launches other programs, except inasmuch as it
    follows good security practices by ruthlessly limiting the environment
    variables it provides to such external programs to a very small set of
    essential ones variables.

    However, I also observe that it's a good practice to have run apt-get updatebefore managing packages. You could add an Exec that runs it, and make
    each apt package 'require' it. Also, you should have a look at
    PuppetLabs's add-in module for apt:
    https://forge.puppetlabs.com/puppetlabs/apt.


    John

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedOct 10, '13 at 9:35a
activeOct 11, '13 at 1:11p
posts4
users2
websitepuppetlabs.com

2 users in discussion

Sans: 2 posts Jcbollinger: 2 posts

People

Translate

site design / logo © 2021 Grokbase