Zun

zun can not find images from glance

Bug #1756514 reported by Yang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
Fix Committed
High
hongbin

Bug Description

Hello, team:
    When I use zun to create container from glance, the container would run into error. I check the system log, it says: 'ZunException: Error occurred while writing image: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/zun/images'. In fact, I find this path does not exit at all.
    My ‘zun-compute’ service and the ‘glance’ service run on different hosts. And my openstack is installed step by step instead of using devstack. I don't know if these factors will cause this bug.
    I check the 'zun.conf', and I find that in 'glance' section, 'images_directory' is set to '$state_path/images', and 'state_path' is '/usr/local/lib/python2.7/dist-packages/zun'. I tried to change 'images_directory' to '/var/lib/images', but it still not work.

Yang (sijie)
Changed in zun:
assignee: nobody → Yang (sijie)
assignee: Yang (sijie) → nobody
hongbin (hongbin034)
Changed in zun:
status: New → Triaged
importance: Undecided → High
assignee: nobody → hongbin (hongbin034)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to zun (master)

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

Revision history for this message
hongbin (hongbin034) wrote :

Hi @Yang,

It seems there is a permission issue. Suppose the user who run the 'zun-compute' process is called 'zun', ensure the 'zun' user has the right permission to access the image directory. If the 'images_directory' is not configured, the image directory is '$state_path/images'.

I added a step to the Zun's installation guide for the state path configuration https://review.openstack.org/#/c/554012/ . If you were following the Zun's installation guide, see if the extra configuration step help.

Revision history for this message
Yang (sijie) wrote :

Hi @hongbin,

Thanks to you. Your answer perfectly solved my problem.

And please add this step to Zun's installation guide, and hope it can help more people.

Changed in zun:
status: Triaged → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to zun (master)

Reviewed: https://review.openstack.org/554012
Committed: https://git.openstack.org/cgit/openstack/zun/commit/?id=086c04b9202df8587370cab89331b903212079eb
Submitter: Zuul
Branch: master

commit 086c04b9202df8587370cab89331b903212079eb
Author: Hongbin Lu <email address hidden>
Date: Sat Mar 17 21:57:30 2018 +0000

    Add a step to configure state_path

    Change-Id: I1d17958ed80308e5c911c08c713461e1935cafd3
    Related-Bug: #1756514

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to zun (stable/queens)

Related fix proposed to branch: stable/queens
Review: https://review.openstack.org/555315

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to zun (stable/queens)

Reviewed: https://review.openstack.org/555315
Committed: https://git.openstack.org/cgit/openstack/zun/commit/?id=0ef54adbccda8fcceba055e8cec1b40b8f467659
Submitter: Zuul
Branch: stable/queens

commit 0ef54adbccda8fcceba055e8cec1b40b8f467659
Author: Hongbin Lu <email address hidden>
Date: Sat Mar 17 21:57:30 2018 +0000

    Add a step to configure state_path

    Change-Id: I1d17958ed80308e5c911c08c713461e1935cafd3
    Related-Bug: #1756514
    (cherry picked from commit 086c04b9202df8587370cab89331b903212079eb)

tags: added: in-stable-queens
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.