tripleo-quickstart deploying VMs as root user doesn't work

Bug #1692987 reported by Steven Hardy
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Steven Hardy

Bug Description

As a developer vs CI user of quickstart, I want the option to deploy VMs not obfuscated by the unpriveliged virt stuff - I'd like them to show up in virt-manager just like instack-virt-setup, then I can easily restart them after a host reboot, and I can easily inspect the primary console in the event of boot issues etc.

Currently this doesn't appear to work:

If you add "ssh_user:root" to your config, it creates the VMs correctly, but then fails like:

TASK [setup/undercloud : Start undercloud vm] **********************************
task path: /home/shardy/.quickstart/tripleo-quickstart/roles/libvirt/setup/undercloud/tasks/main.yml:282
Tuesday 23 May 2017 17:31:42 +0100 (0:00:00.058) 0:06:41.766 ***********
fatal: [tripleodev2.localdomain]: FAILED! => {"changed": false, "failed": true, "msg": "Cannot access storage file '/home/stack/pool/undercloud.qcow2' (as uid:107, gid:107): Permission denied"}

Looking at the playbook, it's looking for non_root_user which is still stack.

Then, I made the mistake of doing:

ssh_user: root
non_root_user: root

This also doesn't work and the attempted cleanup of the non_root_user somehow killed sshd.

Can anyone suggest a simple way we can stand up VMs on the host *exactly* like instack-virt-setup, without any of the unprivileged virt aspects of quickstart?

Steven Hardy (shardy)
Changed in tripleo:
status: New → Triaged
milestone: none → pike-3
tags: added: quickstart
Revision history for this message
wes hayutin (weshayutin) wrote :

Tim Rozet may be working on a patch for this bug.

Changed in tripleo:
importance: Undecided → High
Changed in tripleo:
milestone: pike-3 → pike-rc1
Changed in tripleo:
milestone: pike-rc1 → pike-rc2
Changed in tripleo:
milestone: pike-rc2 → queens-1
Changed in tripleo:
milestone: queens-1 → queens-2
Changed in tripleo:
milestone: queens-2 → queens-3
Revision history for this message
Steven Hardy (shardy) wrote :

michap pointed to https://gerrit.opnfv.org/gerrit/#/c/28675/26/config/quickstart_defaults.yaml which may be the basis of a working config for re-testing this

Luke Short (ekultails)
Changed in tripleo:
assignee: nobody → Luke Short (ekultails)
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

This looks like a documentation RFE as well

tags: added: documentation ux
Revision history for this message
Luke Short (ekultails) wrote :

I found a lot of hard-coded paths in the Playbooks for using "/home/{{ non_root_user }}" and "/home/{{ ssh_user }}" for assumptions of the $HOME path. I have started to refactor the code to support using non-standard home directories which is helpful in the case of using /root. I also changed the "non_root_user" variable to be the "provision_user" to signify that it now *can* be a root user. The "non_root_user" can still used for backwards compatibility.

This work is being done in my fork and branch here:

https://github.com/ekultails/tripleo-quickstart/tree/root_user_support

I am using this TripleO-Quickstart command for testing:

$ bash quickstart.sh --teardown none --no-clone --release trunk/newton -e "provision_user=root" -e "ssh_user=root" -e "undercloud_user=root" -e "overcloud_user=root" -e "undercloud_user_home=/root" --tags all -v 127.0.0.2

Currently I still cannot get this to work and this requires further tweaking. I will be out of town for a few days and would appreciate having some other eyes looking into this. I am still very new to the TripleO-Quickstart project and at least have a strong background with using both Ansible and OpenStack.

Changed in tripleo:
milestone: queens-3 → queens-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-quickstart (master)

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

Changed in tripleo:
assignee: Luke Short (ekultails) → Steven Hardy (shardy)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-quickstart (master)

Reviewed: https://review.openstack.org/539879
Committed: https://git.openstack.org/cgit/openstack/tripleo-quickstart/commit/?id=ee032196e53f9cfc85f4785f6c2422d1cc2013fe
Submitter: Zuul
Branch: master

commit ee032196e53f9cfc85f4785f6c2422d1cc2013fe
Author: Steven Hardy <email address hidden>
Date: Thu Feb 1 09:56:25 2018 +0000

    Add example of deploying with privileged virt

    This example is copied from the following opnfv review

    https://gerrit.opnfv.org/gerrit/#/c/28675/26/config/quickstart_defaults.yaml

    It seems to work well for me, I can deploy VMs via quickstart which
    show up via virt-manager and should survive reboots because
    the qcow2 files are stored in /home/stack.

    Change-Id: Ifbd0d6eefaebc3e8aec986501e67eadb5d7aa9cd
    Closes-Bug: #1692987

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-quickstart 2.1.1

This issue was fixed in the openstack/tripleo-quickstart 2.1.1 release.

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.