libvirt evacuate(shared storage) fails w/ Permission denied on disk.config

Bug #1247526 reported by Yaguang Tang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Yaguang Tang
Havana
Fix Released
High
Yaguang Tang

Bug Description

when doing a evacuate for an instance on shared storage, the following error occurs

2013-10-25 01:20:49.843 INFO nova.compute.manager [req-3ecfa138-b688-447c-b352-18cca32b1a1d 8394996e48204a8d878bac7bf6a88db0 d05694d82d984dd495d25bfdf08ba049] disk on shared storage, recreating using existing disk
2013-10-25 01:20:53.325 INFO nova.virt.libvirt.driver [req-3ecfa138-b688-447c-b352-18cca32b1a1d 8394996e48204a8d878bac7bf6a88db0 d05694d82d984dd495d25bfdf08ba049] [instance: dc2c583c-7488-4a32-81f1-2282097eb358] Creating image
2013-10-25 01:20:53.413 INFO nova.virt.libvirt.driver [req-3ecfa138-b688-447c-b352-18cca32b1a1d 8394996e48204a8d878bac7bf6a88db0 d05694d82d984dd495d25bfdf08ba049] [instance: dc2c583c-7488-4a32-81f1-2282097eb358] Using config drive
2013-10-25 01:20:57.812 INFO nova.virt.libvirt.driver [req-3ecfa138-b688-447c-b352-18cca32b1a1d 8394996e48204a8d878bac7bf6a88db0 d05694d82d984dd495d25bfdf08ba049] [instance: dc2c583c-7488-4a32-81f1-2282097eb358] Creating config drive at /var/lib/nova/instances/dc2c583c-7488-4a32-81f1-2282097eb358/disk.config
2013-10-25 01:20:57.835 ERROR nova.virt.libvirt.driver [req-3ecfa138-b688-447c-b352-18cca32b1a1d 8394996e48204a8d878bac7bf6a88db0 d05694d82d984dd495d25bfdf08ba049] [instance: dc2c583c-7488-4a32-81f1-2282097eb358] Creating config drive failed with error: Unexpected error while running command.
Command: genisoimage -o /var/lib/nova/instances/dc2c583c-7488-4a32-81f1-2282097eb358/disk.config -ldots -allow-lowercase -allow-multidot -l -publisher OpenStack Nova 2013.1.3 -quiet -J -r -V config-2 /tmp/cd_gen_I3EQUN
Exit code: 13
Stdout: ''
Stderr: "Warning: creating filesystem that does not conform to ISO-9660.\ngenisoimage: Permission denied. Unable to open disc image file '/var/lib/nova/instances/dc2c583c-7488-4a32-81f1-2282097eb358/disk.config'.\n"
2013-10-25 01:20:57.837 ERROR nova.compute.manager [req-3ecfa138-b688-447c-b352-18cca32b1a1d 8394996e48204a8d878bac7bf6a88db0 d05694d82d984dd495d25bfdf08ba049] [instance: dc2c583c-7488-4a32-81f1-2282097eb358] Unexpected error while running command.
Command: genisoimage -o /var/lib/nova/instances/dc2c583c-7488-4a32-81f1-2282097eb358/disk.config -ldots -allow-lowercase -allow-multidot -l -publisher OpenStack Nova 2013.1.3 -quiet -J -r -V config-2 /tmp/cd_gen_I3EQUN
Exit code: 13
Stdout: ''
Stderr: "Warning: creating filesystem that does not conform to ISO-9660.\ngenisoimage: Permission denied. Unable to open disc image file '/var/lib/nova/instances/dc2c583c-7488-4a32-81f1-2282097eb358/disk.config'.\n". Setting instance vm_state to ERROR
2013-10-25 01:20:58.693 ERROR nova.openstack.common.rpc.amqp [req-3ecfa138-b688-447c-b352-18cca32b1a1d 8394996e48204a8d878bac7bf6a88db0 d05694d82d984dd495d25bfdf08ba049] Exception during message handling

the nova version it 2013.1 but after looking the code, it should also affect the latest trunk

Allowing the nova user to read/write disk.config should fix this issue....

Yaguang Tang (heut2008)
Changed in nova:
assignee: nobody → Yaguang Tang (heut2008)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/55057
Committed: http://github.com/openstack/nova/commit/3dfa2f9fd4a3084ae3fb8a7ba5d8a7458ae1c3bc
Submitter: Jenkins
Branch: master

commit 3dfa2f9fd4a3084ae3fb8a7ba5d8a7458ae1c3bc
Author: Yaguang Tang <email address hidden>
Date: Sun Nov 3 12:20:49 2013 +0800

    Fix libvirt evacuate instance on shared storage fails

    When evacuate instance which has config drive enabled on shared storage,
    disk.config file can't be created because of permision error, chowns
    disk.config if it already exists.

    Change-Id: I20bafc3482ead30297ad5402a09e97141816f4d1
    Closes-Bug: 1247526

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/58530

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/58538

Changed in nova:
importance: Undecided → High
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/havana)

Reviewed: https://review.openstack.org/58530
Committed: http://github.com/openstack/nova/commit/6c2850cf75c526683ab5474b9aa94c7c2a92a8a5
Submitter: Jenkins
Branch: stable/havana

commit 6c2850cf75c526683ab5474b9aa94c7c2a92a8a5
Author: Yaguang Tang <email address hidden>
Date: Sun Nov 3 12:20:49 2013 +0800

    Fix libvirt evacuate instance on shared storage fails

    When evacuate instance which has config drive enabled on shared storage,
    disk.config file can't be created because of permision error, chowns
    disk.config if it already exists.

    Change-Id: I20bafc3482ead30297ad5402a09e97141816f4d1
    Closes-Bug: 1247526
    (cherry picked from commit 3dfa2f9fd4a3084ae3fb8a7ba5d8a7458ae1c3bc)

Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
Sean Dague (sdague)
no longer affects: nova/grizzly
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.