Ask Your Question
0

Enabling ENC fails puppet agent run

asked 2014-08-22 01:59:40 -0500

sunny gravatar image

I am trying to migrate my environment from PE to opensource puppet. I have new box where i fresh installed latest version of puppet, mcollective, activemq.

activemq-5.8.0-3.el5.centos mcollective-2.5.3-1.el5 puppetlabs-release-5-10 puppet-3.6.2-1.el5 mcollective-client-2.5.3-1.el5 facter-2.1.0-1.el5 puppet-server-3.6.2-1.el5 mcollective-common-2.5.3-1.el5

I configured everything as per the docs and ensured the catalog was applied to the agent node. For now, i have only 1 host acting as my master, agent, ca, everything.

I applied a class to this node via site.pp's default node definition. The catalog compilation worked well and the configs were applied.

Later i tried to use the ENC ( which i already in use in my PE 2.8 environment ) in my open source puppet environment for node classification This ENC uses mco inventory to capture puppet facts + custom facts and assign a node to classes and set global parameters. The ENC works well on command line. ( Note it does not set environment ) However; once i enable node-terminus = exec and external_nodes = script; i get following error

Warning: Unable to fetch my node definition, but the agent run will continue: Warning: execution expired Info: Retrieving pluginfacts Error: Could not retrieve pluginfacts: execution expired ..

With node_terminus disabled, and node classification done using site.pp; everything works perfectly.

trace shows following

Debug: Puppet::Network::Format[msgpack]: feature msgpack is missing Debug: filemetadata supports formats: pson b64zlibyaml yaml raw Error: Could not retrieve pluginfacts: execution expired /usr/lib/ruby/1.8/timeout.rb:64:in rbuf_fill' /usr/lib/ruby/1.8/timeout.rb:67:intimeout' /usr/lib/ruby/1.8/timeout.rb:101:in timeout' /usr/lib/ruby/1.8/net/protocol.rb:134:inrbuffill' /usr/lib/ruby/1.8/net/protocol.rb:116:in readuntil' /usr/lib/ruby/1.8/net/protocol.rb:126:inreadline' /usr/lib/ruby/1.8/net/http.rb:2028:in read_status_line' /usr/lib/ruby/1.8/net/http.rb:2017:inread_new' /usr/lib/ruby/1.8/net/http.rb:1051:in request' /usr/lib/ruby/1.8/net/http.rb:1037:inrequest' /usr/lib/ruby/1.8/net/http.rb:543:in start' /usr/lib/ruby/1.8/net/http.rb:1035:inrequest'

tried deleting the cert and re-signing; same error

edit retag flag offensive close merge delete

Comments

Important difference i see in both scenarios is with ENC enabled, everything times out giving out an error "Execution expired" Is this because i do not have passenger + apache2

sunny gravatar imagesunny ( 2014-08-22 02:11:51 -0500 )edit

I realized that the ENC is executed by the puppet user and puppet user was not authorized to run the mco commands. So i updated my ENC and added "sudo -i -u root" mco inventory and gave puppet user sudo permissions. This resolved my issue and node classification is working with my ENC

sunny gravatar imagesunny ( 2014-08-22 02:54:17 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-08-22 02:54:55 -0500

sunny gravatar image

I realized that the ENC is executed by the puppet user and puppet user was not authorized to run the mco commands. So i updated my ENC and added "sudo -i -u root" mco inventory and gave puppet user sudo permissions. This resolved my issue and node classification is working with my ENC

edit flag offensive delete link more

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: 2014-08-22 01:59:40 -0500

Seen: 437 times

Last updated: Aug 22 '14