astute loses HOME var during puppet run

Bug #1479763 reported by Matthew Mosesohn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Matthew Mosesohn

Bug Description

Our keystone and openstacklib providers require openrc for configuring keystone users/endpoints/services. I know we're trying to get rid of this file, but our orchestrator seems to be losing the HOME variable somehow.

Code where we read $HOME/openrc:
https://github.com/stackforge/fuel-library/blob/master/deployment/puppet/openstacklib/lib/puppet/provider/openstack/auth.rb#L5

It seems to be directly related to the way astute's puppetd module is designed, because our shell executor seems just fine:

[root@fuel modules]# dockerctl shell astute mco rpc -v execute_shell_command execute cmd="echo home is \\$HOME" -I 1

 * [ ============================================================> ] 1 / 1

1 : OK
    {:stdout=>"home is /root\n", :stderr=>"", :exit_code=>0}

VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "7.0"
  openstack_version: "2015.1.0-7.0"
  api: "1.0"
  build_number: "108"
  build_id: "2015-07-29_21-24-26"
  nailgun_sha: "999efffd19b823a27b17f0e97a42ac0d47ae9ce5"
  python-fuelclient_sha: "f04e6c46783ecd6000df31b61b6749da66d4d828"
  fuel-agent_sha: "355c08a04917f047b88f66242767049d2b1d0ff0"
  fuel-nailgun-agent_sha: "1512b9af6b41cc95c4d891c593aeebe0faca5a63"
  astute_sha: "126709e7f18a719ec4bd2a13a37d972285381892"
  fuel-library_sha: "90aff7558fb00373ccd363b7722e2f90dc25894d"
  fuel-ostf_sha: "f907eca277ab4ba769774417d6ff5bf30ef479ee"
  fuelmain_sha: "de5b333815f8541224c6726dc8446ffc7fb18b5b"

Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
milestone: none → 7.0
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-astute (master)

Fix proposed to branch: master
Review: https://review.openstack.org/207418

Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Matthew Mosesohn (raytrac3r)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-astute (master)

Reviewed: https://review.openstack.org/207418
Committed: https://git.openstack.org/cgit/stackforge/fuel-astute/commit/?id=c7fc19f942d4f11c31528f4e3499775c70a2e0b6
Submitter: Jenkins
Branch: master

commit c7fc19f942d4f11c31528f4e3499775c70a2e0b6
Author: Matthew Mosesohn <email address hidden>
Date: Thu Jul 30 14:57:46 2015 +0300

    Add HOME variable to puppetd mcagent

    Some puppet modules depend on HOME variable
    being configured for normal operation.

    Change-Id: Iba1a0c6413fc8756d7bd60f6e5a3201d8d120c86
    Closes-Bug: #1479763

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Vladimir Sharshov (vsharshov) wrote :

We do not update magents on nodes. If we update env from 6.1 to 6.1.1, for example, it will not work for such envs, only for 7.0+

Please pay attention if you need to use this fix for already released envs (6.1 or early)

Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

Let's add a tag to this bug for upgrade impact.

tags: added: feature-upgrade module-astute
tags: added: on verification
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

We actually reverted this commit because it introduced some new bugs. We worked around this completely in https://review.openstack.org/#/c/207548/

Changed in fuel:
status: Fix Committed → Won't Fix
Changed in fuel:
status: Won't Fix → Fix Released
tags: added: module-astut
removed: module-astute on verification
tags: added: module-astute
removed: module-astut
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Related fix merged to puppet-modules/puppet-openstacklib (mos-8.0)

Reviewed: https://review.fuel-infra.org/12090
Submitter: Ivan Berezovskiy <email address hidden>
Branch: mos-8.0

Commit: d1beb97fef62e4e167d37d71c3a2a105c941361c
Author: Sergey Kolekonov <email address hidden>
Date: Thu Sep 24 14:20:38 2015

Avoid problems with astute when $HOME is temporarily unknown

The orchestrator seems to be losing the HOME variable somehow.
To avoid deployment failures use the fallback path to the openrc file.
This change should not be upstreamed.

Related-bug: #1479763

Change-Id: Ie3f85e90ee2cced961df90e2d54ac53deeda04d3

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.