reproducer fails to resize images when run as non root user

Bug #1788919 reported by Sorin Sbarnea
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Incomplete
Medium
wes hayutin

Bug Description

It seems that reproducer-quickstart.sh is failing to resize images because these are owned by root user.

Suspect https://github.com/openstack/tripleo-quickstart/blob/review/sorin_sbarnea/fix/bump-ansible/roles/fetch-images/tasks/fetch.yml#L181 as the cause.

When doing the copy, file ownership should be changed to current user.

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/596428

Changed in tripleo:
assignee: nobody → Sorin Sbarnea (ssbarnea)
status: New → In Progress
Changed in tripleo:
milestone: none → stein-1
importance: Undecided → Medium
Revision history for this message
Marios Andreou (marios-b) wrote :
Download full text (3.6 KiB)

just marked https://bugs.launchpad.net/tripleo/+bug/1790932 as duplicate of this, but I'm copy/pasting the description as it includes a trace which is missing here thanks

(COPY/PASTE from +bug/1790932 ):

skipping: [127.0.0.2] [0/1928]│·
                                                                                                                                                                                                                   │·
TASK [fetch-images : Clean image cache directory] *****************************************************************************************************************************************************************│·
changed: [127.0.0.2] │·
                                                                                                                                                                                                                   │·
TASK [libvirt/setup/overcloud : Resize undercloud image (create target image)] ************************************************************************************************************************************│·
changed: [127.0.0.2] │·
                                                                                                                                                                                                                   │·
TASK [libvirt/setup/overcloud : Resize undercloud image (call virt-resize)] ***************************************************************************************************************************************│·
fatal: [127.0.0.2]: FAILED! => {"changed": false, "cmd": "virt-resize --expand /dev/sda1 /var/tmp/wes/undercloud.qcow2 /var/tmp/wes/undercloud-resized.qcow2", "msg": "[Errno 2] No such file or directory", "rc": │·
2} │·
        to retry, use: --limit @/var/tmp/wes/tripleo-quickstart/playbooks/libvirt-nodepool.retry │·
                                                                                                                                                                                                                   │·
PLAY RECAP ********************************************************************************************************************************************************************************************************│·
127.0.0.2 : ok=41 changed=18 unreachable=0 failed=1 │·
                                                                                                                                                                                                                   │·
[cgoncalves@tunafish ~]$ ls /var/tmp/wes/undercloud-resized.qcow2 │·
/var/tmp/wes/undercloud-resized.qcow2 │·
[cgoncalves@tunafish ~]$ ll /var/tmp/wes/ │·
total 852436 │·
drwxrwxr-x. 12 cgoncalves cgoncalves 4096 Sep 5 19:41 tripleo-quickstart │·
drwxrwxr-x. 9 cgoncalves cgoncalves 4096 Sep 5 19:41 tripleo-quickstart-extras │·
-rw-r--r--. 1 root root 872677376 Sep 5 19:42 undercloud.qcow2 │·
-rw-r--r--. 1 root root 198144 Sep 5 19:42 undercloud-resized.qcow2 │·
drwxrwxr-x. 6 cgoncalves cgoncalves 69 Sep 5 19:41 venv_ansible │·
-rw-rw-r--. 1 cgoncalves cgoncalves 21 Sep 5 19:41 virthost │·
-rw-r--r--. 1 ro...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-quickstart (master)

Change abandoned by Bogdan Dobrelya (<email address hidden>) on branch: master
Review: https://review.openstack.org/605021

Revision history for this message
Sorin Sbarnea (ssbarnea) wrote :

Progress on this got stuck on https://review.openstack.org/#/c/596428/ please join there in order to find-out a working solution.

Multiple people confirmed this bug and it seems to be related to the way the LIBVIRT is configured.

For example I am using LIBVIRT_DEFAULT_URI=qemu:///session versus system.

Changed in tripleo:
status: In Progress → Triaged
assignee: Sorin Sbarnea (ssbarnea) → nobody
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/611353

Changed in tripleo:
assignee: nobody → Sorin Sbarnea (ssbarnea)
status: Triaged → In Progress
Changed in tripleo:
assignee: Sorin Sbarnea (ssbarnea) → wes hayutin (weshayutin)
Changed in tripleo:
milestone: stein-1 → stein-2
Changed in tripleo:
milestone: stein-2 → stein-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-quickstart (master)

Change abandoned by Sorin Sbarnea (<email address hidden>) on branch: master
Review: https://review.openstack.org/596428
Reason: Abandoning because this was not the correct way to fix this. What user is used depends on the qemu configuration of the host and the environment variables.

Changed in tripleo:
milestone: stein-3 → train-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Sorin Sbarnea (<email address hidden>) on branch: master
Review: https://review.openstack.org/611353

Changed in tripleo:
milestone: train-1 → train-2
Changed in tripleo:
milestone: train-2 → train-3
Changed in tripleo:
milestone: train-3 → ussuri-1
Changed in tripleo:
milestone: ussuri-1 → ussuri-2
wes hayutin (weshayutin)
Changed in tripleo:
milestone: ussuri-2 → ussuri-3
wes hayutin (weshayutin)
Changed in tripleo:
milestone: ussuri-3 → ussuri-rc3
wes hayutin (weshayutin)
Changed in tripleo:
milestone: ussuri-rc3 → victoria-1
Changed in tripleo:
milestone: victoria-1 → victoria-3
Changed in tripleo:
milestone: victoria-3 → wallaby-1
Changed in tripleo:
milestone: wallaby-1 → wallaby-2
Changed in tripleo:
milestone: wallaby-2 → wallaby-3
Revision history for this message
Marios Andreou (marios-b) wrote :

This is an automated action. Bug status has been set to 'Incomplete' and target milestone has been removed due to inactivity. If you disagree please re-set these values and reach out to us on freenode #tripleo

Changed in tripleo:
milestone: wallaby-3 → none
status: In Progress → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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