Ask Your Question
0

mco puppet runonce takes while

asked 2015-08-24 15:06:26 -0500

wrkilu gravatar image

updated 2015-08-25 11:35:23 -0500

ramindk gravatar image

Hi,

First run works immediately, second or third (after e.g. 20 sec.) takes while. On agent then there is working process

/usr/bin/ruby /usr/bin/puppet agent --onetime --no-daemonize --color=false --show_diff --verbose --no-splay

In the logs

Aug 24 16:01:44 ip-10-192-2-120 mcollectived: Failed to fetch ec2 uri http://169.254.169.254/latest/meta-data/metrics/: Connection timed out - connect(2)".

I must mention this is connection between 2 CentOS machines, so from where is that Windows IP ?

On puppet master I run command "mco puppet runonce --no-splay --force"

edit retag flag offensive close merge delete

Comments

It's not a Windows IP, it's facter calling out the AWS metadata service to populate the ec2 facts.

ramindk gravatar imageramindk ( 2015-08-25 11:33:39 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-08-25 11:55:17 -0500

wrkilu gravatar image

updated 2015-08-25 13:23:17 -0500

So the question is: how to disable this calling out ? Because after that change is deployed.

Additional informations: Generally I want to change iptables rules. I know there is dedicated module, but however I don't wan to use it, but just push plain text file with rules and then execute it.

Whole event looks like following:

1) on master:

  • I change file with rules
  • I execute: mco puppet runonce --no-splay --force , and then I wait... puppet process on agent then is hanging
  • in log then I have:

[2015-08-25 13:08:56] 10.192.2.120 - - [25/Aug/2015:13:08:56 EDT] "GET /production/node/ip-10-192-2-120.domain.com?transactionuuid=d1e15ed1-4082-43e9-8754-e6bc0a915f51&failon404=true HTTP/1.1" 200 10839 [2015-08-25 13:08:56] - -> /production/node/ip-10-192-2-120.domain.com?transactionuuid=d1e15ed1-4082-43e9-8754-e6bc0a915f51&failon404=true [2015-08-25 13:08:56] 10.192.2.120 - - [25/Aug/2015:13:08:56 EDT] "GET /production/filemetadatas/pluginfacts?links=manage&recurse=true&ignore=.svn&ignore=CVS&ignore=.git&checksumtype=md5 HTTP/1.1" 200 278 [2015-08-25 13:08:56] - -> /production/filemetadatas/pluginfacts?links=manage&recurse=true&ignore=.svn&ignore=CVS&ignore=.git&checksumtype=md5 [2015-08-25 13:08:56] 10.192.2.120 - - [25/Aug/2015:13:08:56 EDT] "GET /production/filemetadatas/plugins?links=manage&recurse=true&ignore=.svn&ignore=CVS&ignore=.git&checksumtype=md5 HTTP/1.1" 200 278 [2015-08-25 13:08:56] - -> /production/filemetadatas/plugins?links=manage&recurse=true&ignore=.svn&ignore=CVS&ignore=.git&checksumtype=md5

2) on agent:

  • there is hanging process "/usr/bin/ruby /usr/bin/puppet agent --onetime --no-daemonize --color=false --show_diff --verbose --no-splay"
  • in log then there is:

Aug 25 13:11:04 ip-10-192-2-120 mcollectived: Failed to fetch ec2 uri http://169.254.169.254/latest/meta-da...: Connection timed out - connect(2) Aug 25 13:11:04 ip-10-192-2-120 mcollectived: Could not retrieve fact='ec2_metadata', resolution='rest': undefined method `each' for nil:NilClass

  • after 2 minutes new iptables file is executed and in log there is:

Aug 25 13:13:12 ip-10-192-2-120 mcollectived: Info: Caching catalog for ip-10-192-2-120.domain.com Aug 25 13:13:12 ip-10-192-2-120 puppet-agent[12750]: Caching catalog for ip-10-192-2-120.domain.com Aug 25 13:13:12 ip-10-192-2-120 mcollectived: Info: Applying configuration version '1440363443' Aug 25 13:13:12 ip-10-192-2-120 puppet-agent[12750]: Applying configuration version '1440363443' Aug 25 13:13:12 ip-10-192-2-120 mcollectived: Notice: /Stage[main]/Firewall/File[/etc/sysconfig/iptables]/content: Aug 25 13:13:12 ip-10-192-2-120 mcollectived: --- /etc/sysconfig/iptables 2015-08-25 13:08:08.684463861 -0400 Aug 25 13:13:12 ip-10-192-2-120 mcollectived: +++ /tmp/puppet-file20150825-12750-9gur0w 2015-08-25 13:13:12.568386939 -0400 and so on [...]

thats all

And sorry but I don't know how to place logs into right blocks here ;)

edit flag offensive delete link more

Comments

Edit your question if you have additional information. Also add relevant logs from both your Puppet master and the Puppet agent.

ramindk gravatar imageramindk ( 2015-08-25 12:03:12 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-08-24 15:06:26 -0500

Seen: 117 times

Last updated: Aug 25 '15