[Pkg-puppet-devel] Bug#890268: Bug#890268: puppet: non-agent commands fail on puppet agent when environment is set
Apollon Oikonomopoulos
apoikos at debian.org
Thu Feb 22 23:18:22 UTC 2018
Control: tags -1 upstream fixed-upstream pending
Hi Alex :)
Thanks for the report!
On 20:47 Mon 12 Feb , Alex Kiousis wrote:
> Dear Maintainer,
> puppet4 seems to always look inside 'environmentpath' for the currently
> configured environment before doing any operation.
> This doesn't make sense when a host acts as an agent.
>
> By default environmentpath is set to '/etc/puppet/code/environments'.
>
> Running any puppet command (except puppet agent) with an environment set
> fails like this:
>
> puppet config print --environment=testaki
> /usr/lib/ruby/vendor_ruby/puppet/environments.rb:38:in `get!': Could not find a directory environment named 'testaki' anywhere in the path: /etc/puppet/code/environments. Does the directory exist? (Puppet::Environments::EnvironmentNotFound)
> from /usr/lib/ruby/vendor_ruby/puppet/application_support.rb:29:in `push_application_context'
> from /usr/lib/ruby/vendor_ruby/puppet/application.rb:337:in `run'
> from /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
> from /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
> from /usr/bin/puppet:5:in `<main>'
>
> Running puppet agent works fine though.
This was fixed upstream in 4.10.10[1]. I'll update the package in sid
soon-ish and probably queue this up for a stable update if it can be
backported easily.
Regards,
Apollon
[1] https://github.com/puppetlabs/puppet/commit/430f22be04c8d888e6a85b4095a33a2fe0e3f7f2
More information about the Pkg-puppet-devel
mailing list