[RFE] - Make clear differentiation between `ansible_user` and undercloud user that deploys the overcloud

Bug #1654574 reported by Harry Rybacki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo-quickstart
Fix Released
Critical
Harry Rybacki

Bug Description

If we look way back to when OOOQ was initially developed by Trown up until rather recently, it was generally assumed that the 'stack' user would always be the user setup on the undercloud and used to deploy the overcloud. However, as we grown, refined, and expanded OOOQ and OOOQ-Extras this assumption is no longer valid. To make things slightly more complicated, we have decoupled hardcoded

In order for allow decouple the stack user we have opted to use 'ansible_user' e.g.[1] which is, by default, set to 'stack' in the common role[2].

To further help clear up cruft, we are also working towards a unified set of defaults such that roles within OOOQ-Extras depend on the extras-common role[3] and the extras-common role depends on the common role[4]. However, both [3] and [4] are bringing to light problems with using 'ansible_user' in such a broad manner[5]:

```
TASK [undercloud-deploy : Create undercloud install script] ********************
task path: /home/centos/workspace/tripleo-quickstart-extras-gate-mitaka-delorean-full-minimal@2/usr/local/share/ansible/roles/undercloud-deploy/tasks/create-scripts.yml:15
Thursday 05 January 2017 21:59:44 +0000 (0:00:04.648) 0:10:40.734 ******
fatal: [undercloud]: FAILED! => {"changed": true, "failed": true, "msg": "Destination directory /home/stack/.quickstart does not exist"}
```

Using 'ansible_user' rather than stack[1] has also created issues with the collect-logs role as upstream, ci.centos, and internal pipelines all have varying setup/environment requirements. Presently logging is broken in ci.centos as well as for internal (RH) jobs[6].

Let's start a discussion around creating a solution. Perhaps having a distinct 'undercloud_user' variable that would fall into where we have classically seen 'stack' would suffice.

[1] - https://review.openstack.org/#/c/404800/
[2] - https://github.com/openstack/tripleo-quickstart/blob/master/roles/common/defaults/main.yml#L7
[3] - https://review.openstack.org/#/c/413800/
[4] - https://review.openstack.org/#/c/417195/
[5] - https://ci.centos.org/artifacts/rdo/jenkins-tripleo-quickstart-extras-gate-mitaka-delorean-full-minimal-482/console.txt.gz
[6] - https://bugs.launchpad.net/tripleo-quickstart/+bug/1654003

Revision history for this message
Attila Darazs (adarazs) wrote :

+1 for using introducing the `undercloud_user` variable which should default to `stack` and used in the places where we hardcoded it previously. This would the issues we have while making the undercloud deployments more flexible.

Revision history for this message
wes hayutin (weshayutin) wrote :

+1 on undercloud_user

Changed in tripleo-quickstart:
assignee: nobody → Harry Rybacki (hrybacki-h)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-quickstart (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/417502

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-quickstart (master)

Reviewed: https://review.openstack.org/417502
Committed: https://git.openstack.org/cgit/openstack/tripleo-quickstart/commit/?id=6cd30f492c37099bfd1a53d7a2fda3a4e926cea7
Submitter: Jenkins
Branch: master

commit 6cd30f492c37099bfd1a53d7a2fda3a4e926cea7
Author: Harry Rybacki <email address hidden>
Date: Fri Jan 6 14:09:44 2017 -0500

    Integrate undercloud_user var int oooq

    We need to differentiate local_working_dir from working_dir
    as well as decouple the stack user from `ansible_user` var.
    Both of these are causing issues as we begin to automate
    deployments in more environments.

    - update common/defaults to use undercloud_user
    - make tripleo-inventory inherit from common role, pull
      duplicate vars out of its defaults
    - make convert-image inherit from common role, update
      template to use undercloud_user
    - update libvirt/setup/undercloud to use undercloud_user

    Related-bug: 1654574

    Change-Id: I45b0706df8351ff9ddc6c226989125dcb2f5b897

Changed in tripleo-quickstart:
status: New → In Progress
status: In Progress → Fix Released
Revision history for this message
Harry Rybacki (hrybacki-h) wrote :

Fix has been reviewed and merged: https://review.openstack.org/#/c/419639

Changed in tripleo-quickstart:
status: Fix Released → In Progress
Revision history for this message
Harry Rybacki (hrybacki-h) wrote :

Disregard comment #5 -- wrong launchpad/browser tab.

John Trowbridge (trown)
Changed in tripleo-quickstart:
importance: Undecided → Critical
Revision history for this message
Attila Darazs (adarazs) wrote :

This bug is in fact solved by the change in comment #4, so closing it.

Changed in tripleo-quickstart:
status: In Progress → Fix Released
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.