Stock centos/rhel setup on libvirt/setup/undercloud fails

Bug #1709833 reported by Sanjay Upadhyay on 2017-08-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Medium
Sanjay Upadhyay

Bug Description

This is with respect to setting up a Openstack setup on libvirt with stock OS ie. centos and rhel, specifically fetched from local cache.

I found that it would fail at - /home/sanjayu/workspace/rdo-ovb/tripleo-quickstart/roles/libvirt/setup/undercloud/tasks/main.yml:77

 TASK [setup/undercloud : Copy instackenv.json to appliance] >
 -------------------------------------------------------------
        \ ^__^
         \ (oo)\_______
            (__)\ )\/\
                ||----w |
                || ||

task path: /home/sanjayu/workspace/rdo-ovb/tripleo-quickstart/roles/libvirt/setup/undercloud/tasks/main.yml:77
Thursday 20 July 2017 13:33:35 +0530 (0:00:00.106) 0:26:41.580 *********
fatal: [sm02]: FAILED! => {"changed": true, "cmd": ["virt-customize", "-a", "/home/stack/undercloud.qcow2", "--upload", "/home/stack/instackenv.json:/home/stack/instackenv.json", "--run-command", "chown stack:stack /home/stack/instackenv.json"], "delta": "0:00:17.650444", "end": "2017-07-20 03:59:58.600222", "failed": true, "rc": 1, "start": "2017-07-20 03:59:40.949778", "stderr": "virt-customize: error: libguestfs error: upload: \n/home/stack/instackenv.json: No such file or directory\n\nIf reporting bugs, run virt-customize with debugging enabled and include \nthe complete output:\n\n virt-customize -v -x [...]", "stdout": "[ 0.0] Examining the guest ...\n[ 17.4] Setting a random seed\n[ 17.4] Uploading: /home/stack/instackenv.json to /home/stack/instackenv.json", "stdout_lines": ["[ 0.0] Examining the guest ...", "[ 17.4] Setting a random seed", "[ 17.4] Uploading: /home/stack/instackenv.json to /home/stack/instackenv.json"], "warnings": []}

==playbook task==
 77 - name: Copy instackenv.json to appliance
 78 command: >
 79 virt-customize -a {{ working_dir }}/undercloud.qcow2
 80 --upload {{ working_dir }}/instackenv.json:/home/{{ undercloud_user }}/instackenv.json
 81 --run-command 'chown {{ undercloud_user }}:{{ undercloud_user }} /home/{{ undercloud_user }}/instackenv.json'
 82 when: inject_instackenv|bool

==Running it manually==
$ virt-customize -a undercloud.qcow2 --upload "/home/stack/instackenv.json:/home/stack/instackenv.json" --run-command "chown stack:stack /home/stack/instackenv.json" [ 0.0] Examining the guest ...
[ 3.0] Setting a random seed
[ 3.0] Uploading: /home/stack/instackenv.json to /home/stack/instackenv.json
virt-customize: error: libguestfs error: upload:
/home/stack/instackenv.json: No such file or directory

If reporting bugs, run virt-customize with debugging enabled and include
the complete output:

  virt-customize -v -x [...]
[stack@sm02 ~]$ ls -l /home/stack/instackenv.json
-rw-rw-r--. 1 stack stack 7363 Jul 20 03:55 /home/stack/instackenv.json

issue --
Stack user has not been created inside the VM

Further, after discussing with @sshnaidm, I figured out, that there is a variable called undercloud_setup. If True, it goes into the following lines - https://github.com/openstack/tripleo-quickstart/blob/73a06b51f390c6f37c19e18974da82572d08d3e2/roles/libvirt/setup/undercloud/tasks/main.yml#L53-L55

  - include: convert_image.yml
    static: no
    when: overcloud_as_undercloud|bool or baseos_as_undercloud|bool

However, again fails, as the repo is not yet setup (specifically for rhel ones).

Sanjay Upadhyay (saneax) on 2017-08-10
tags: added: ci quickstart
Changed in tripleo:
assignee: nobody → Sanjay Upadhyay (saneax)
Changed in tripleo:
status: New → Triaged
milestone: none → queens-1
importance: Undecided → Medium
Changed in tripleo:
milestone: queens-1 → queens-2
Changed in tripleo:
milestone: queens-2 → queens-3
Changed in tripleo:
milestone: queens-3 → queens-rc1
Changed in tripleo:
milestone: queens-rc1 → rocky-1
Changed in tripleo:
milestone: rocky-1 → rocky-2
Changed in tripleo:
milestone: rocky-2 → rocky-3
Changed in tripleo:
milestone: rocky-3 → rocky-rc1
Changed in tripleo:
milestone: rocky-rc1 → stein-1
Changed in tripleo:
milestone: stein-1 → stein-2
Changed in tripleo:
milestone: stein-2 → stein-3
Changed in tripleo:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers