Project

General

Profile

Actions

Bug #7063

closed

Foreman_smartproxy fails to evalute with "couldn't find HOME environment"

Added by Gavin Williams over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Foreman modules
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When running Puppet as a service, the Foreman_smartproxy type fails with:

puppet-agent[7955]: (/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[act-lg-tdns01.test.card.co.uk]) Could not evaluate: couldn't find HOME environment -- expanding `~/.cache'

Running Puppet manually works as expected.

Running on a CentOS 6.5 host, using following versions:

$ rpm -qa |grep "foreman\|puppet"
puppetlabs-release-6-7.noarch
puppet-3.5.1-1.el6.noarch
rubygem-foreman_api-0.1.11-1.el6.noarch
foreman-proxy-1.5.2-1.el6.noarch

puppet-foreman module is 2.2.0 from Git.

Actions #1

Updated by Dominic Cleal over 10 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal

I opened this against apipie-bindings, so we can override the base directory it uses for caching: https://github.com/Apipie/apipie-bindings/pull/14. Once that's in, we can set the option to Puppet's vardir or something.

Actions #2

Updated by Dominic Cleal over 10 years ago

  • Status changed from Assigned to Ready For Testing
  • Target version set to 1.7.5
Actions #3

Updated by Anonymous over 10 years ago

  • Target version changed from 1.7.5 to 1.7.4
Actions #4

Updated by Dominic Cleal over 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #5

Updated by cristian falcas about 10 years ago

We are still seeing this error using this puppet modules:
- theforeman-foreman-2.2.3
- theforeman-puppet-2.2.1
- theforeman-foreman_proxy-2.0.1

[root@puppet ~]# rpm -qa | grep foreman | sort
foreman-1.6.0-1.el6.noarch
foreman-compute-1.6.0-1.el6.noarch
foreman-postgresql-1.6.0-1.el6.noarch
foreman-proxy-1.6.0-1.el6.noarch
foreman-selinux-1.6.0-1.el6.noarch
foreman-vmware-1.6.0-1.el6.noarch
ruby193-rubygem-foreman_bootdisk-3.2.0-1.el6.noarch
ruby193-rubygem-foreman_setup-2.1.0-1.el6.noarch
ruby193-rubygem-puppetdb_foreman-0.0.9-1.el6.noarch
rubygem-foreman_api-0.1.11-1.el6.noarch

Actions #6

Updated by Dominic Cleal about 10 years ago

Ensure you have rubygem-apipie-bindings 0.0.9 or higher too.

Actions #7

Updated by Elisiano Petrini about 10 years ago

Dominic Cleal wrote:

Ensure you have rubygem-apipie-bindings 0.0.9 or higher too.

I'm also affected by this, running the latest version of the module (taken from the foreman-installer package) and all the latest packages from the foreman repository.

It seems that the repo is not updated (the most recent version of foreman is 1.6.1, where on the site is 1.6.2). Also, the packaged version of rubygem-apipie-bindings is 0.0.8 ( http://yum.theforeman.org/releases/latest/el6/x86_64/ ).

Although I know I could install the 'package' using the gem provider, I'd rather stay with RPMs.

Do you have an idea when the new releases will be packaged?

Actions #8

Updated by Dominic Cleal about 10 years ago

We probably won't put a newer version of apipie-bindings into the 1.6 release repos, just so we don't disrupt the stability. We had some complexity with 0.0.9 and above, because you need this module fix (https://github.com/theforeman/puppet-foreman/commit/a50b3e477076d59b701d36c331931874f88e46ee) and that's not in the current released installer (the module with this fix however is on the Forge). I don't plan on another 1.6.x release at the moment, otherwise would include it.

I'd suggest either:

  • use a newer apipie-bindings from our nightly repo, plus a newer version of 'foreman' from the Puppet Forge or git
  • install rubygem-foreman_api (should still be in the repo) and set the provider on the resource to 'rest' (resource defaults?)

Regarding 1.6.1 vs 1.6.2, 1.6.2 was only a release of the smart proxy and installer, not core Foreman. See http://theforeman.org/manuals/1.6/index.html#Releasenotesfor1.6.2

Actions #9

Updated by Elisiano Petrini about 10 years ago

Hi Dominic,
thanks for pointing out the nightly repo, I was not aware of that!

Just by installing apipie-bindings 0.0.10 solved the issue (there was no need to upgrade the module)!
I was surprised it worked without updating the module, but checking lib/puppet/provider/foreman_smartproxy/rest_v2.rb I confirm it's still the old version.

Also, about the versioning, apologies about the mixup, I got confused by the sentence "We strongly recommend that users update to Foreman 1.6.2 as soon as possible due to the security issue that has been fixed in this version".

Thanks a lot for your help.

Best Regards,
Elisiano Petrini

Actions #10

Updated by Dominic Cleal about 10 years ago

No problem. The versioning does cause some confusion which I might try and address from 1.7 onwards by always releasing all projects together. I've been trying to optimise our release process so this is possible without much extra work, as you're not the first to have questioned it.

Actions #11

Updated by Elisiano Petrini about 10 years ago

I take it back! :/

Running "puppet agent -t" works fine, but when it runs from the daemon I get the same error (even though I restarted the puppet agents).

I'll try to upgrade the module.

Actions #12

Updated by Elisiano Petrini about 10 years ago

Confirmed working (upgrading the module), apologies for the noise.

Thanks again for your help.

Actions

Also available in: Atom PDF