snapshots tests failing

Bug #1022670 reported by Ghe Rivero
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Ghe Rivero

Bug Description

Snapshots libvirt tests (5 tests in total) fails due to bogus path with no permissions to copy the snapshot.

Sample:

ERROR: test_snapshot_no_original_image (nova.tests.test_libvirt.LibvirtConnTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ghe/github/openstack/nova/nova/test.py", line 85, in _skipper
    func(*args, **kw)
  File "/home/ghe/github/openstack/nova/nova/tests/test_libvirt.py", line 1120, in test_snapshot_no_original_image
    conn.snapshot(self.context, instance_ref, recv_meta['id'])
  File "/home/ghe/github/openstack/nova/nova/exception.py", line 117, in wrapped
    temp_level, payload)
  File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/home/ghe/github/openstack/nova/nova/exception.py", line 92, in wrapped
    return f(*args, **kw)
  File "/home/ghe/github/openstack/nova/nova/virt/libvirt/driver.py", line 803, in snapshot
    with utils.tempdir(dir=snapshot_directory) as tmpdir:
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/home/ghe/github/openstack/nova/nova/utils.py", line 1197, in tempdir
    tmpdir = tempfile.mkdtemp(**kwargs)
  File "/usr/lib/python2.7/tempfile.py", line 325, in mkdtemp
    _os.mkdir(file, 0700)
OSError: [Errno 2] No such file or directory: '/snapshots/tmpsoUEEi'
-------------------- >> begin captured logging << --------------------
nova.tests.image.fake: WARNING: Unable to find image id 661122aa-1234-dede-fefe-babababababa. Have images: {'70a599e0-31e7-49b7-b260-868f441e862b': {'status': 'active', 'name': 'fakeimage7', 'deleted': False, 'container_format': 'ova', 'created_at': datetime.datetime(2011, 1, 1, 1, 2, 3), 'disk_format': 'vhd', 'updated_at': datetime.datetime(2011, 1, 1, 1, 2, 3), 'id': '70a599e0-31e7-49b7-b260-868f441e862b', 'is_public': False, 'deleted_at': None, 'properties': {'kernel_id': 'nokernel', 'auto_disk_config': 'True', 'ramdisk_id': 'nokernel', 'architecture': 'x86_64'}}, '155d900f-4e14-4e4c-a73d-069cbf4541e6': {'status': 'active', 'name': 'fakeimage123456', 'deleted': False, 'container_format': 'raw', 'created_at': datetime.datetime(2011, 1, 1, 1, 2, 3), 'disk_format': 'raw', 'updated_at': datetime.datetime(2011, 1, 1, 1, 2, 3), 'id': '155d900f-4e14-4e4c-a73d-069cbf4541e6', 'is_public': False, 'deleted_at': None, 'properties': {'kernel_id': 'nokernel', 'ramdisk_id': 'nokernel', 'architecture': 'x86_64'}}, 'a2459075-d96c-40d5-893e-577ff92e721c': {'status': 'active', 'name': 'fakeimage123456', 'deleted': False, 'container_format': 'ami', 'created_at': datetime.datetime(2011, 1, 1, 1, 2, 3), 'disk_format': 'ami', 'updated_at': datetime.datetime(2011, 1, 1, 1, 2, 3), 'id': 'a2459075-d96c-40d5-893e-577ff92e721c', 'is_public': True, 'deleted_at': None, 'properties': {'kernel_id': 'nokernel', 'ramdisk_id': 'nokernel'}}, 'a440c04b-79fa-479c-bed1-0b816eaec379': {'status': 'active', 'name': 'fakeimage6', 'deleted': False, 'container_format': 'ova', 'created_at': datetime.datetime(2011, 1, 1, 1, 2, 3), 'disk_format': 'vhd', 'updated_at': datetime.datetime(2011, 1, 1, 1, 2, 3), 'id': 'a440c04b-79fa-479c-bed1-0b816eaec379', 'is_public': False, 'deleted_at': None, 'properties': {'kernel_id': 'nokernel', 'auto_disk_config': 'False', 'ramdisk_id': 'nokernel', 'architecture': 'x86_64'}}, 'c905cedb-7281-47e4-8a62-f26bc5fc4c77': {'status': 'active', 'name': 'fakeimage123456', 'deleted': False, 'container_format': 'ami', 'created_at': datetime.datetime(2011, 1, 1, 1, 2, 3), 'disk_format': 'ami', 'updated_at': datetime.datetime(2011, 1, 1, 1, 2, 3), 'id': 'c905cedb-7281-47e4-8a62-f26bc5fc4c77', 'is_public': True, 'deleted_at': None, 'properties': {'kernel_id': '155d900f-4e14-4e4c-a73d-069cbf4541e6', 'ramdisk_id': None}}, '3acdfcbb-536e-488c-adf8-fa9361680974': {'status': 'creating', 'is_public': False, 'properties': {'instance_id': 1, 'user_id': 'None'}, 'id': '3acdfcbb-536e-488c-adf8-fa9361680974', 'name': 'test-snap'}, 'cedef40a-ed67-4d10-800e-17455edce175': {'status': 'active', 'name': 'fakeimage123456', 'deleted': False, 'container_format': 'ami', 'created_at': datetime.datetime(2011, 1, 1, 1, 2, 3), 'disk_format': 'ami', 'updated_at': datetime.datetime(2011, 1, 1, 1, 2, 3), 'id': 'cedef40a-ed67-4d10-800e-17455edce175', 'is_public': True, 'deleted_at': None, 'properties': {'kernel_id': 'nokernel', 'ramdisk_id': 'nokernel'}}, '76fa36fc-c930-4bf3-8c8a-ea2a2420deb6': {'status': 'active', 'name': 'fakeimage123456', 'deleted': False, 'container_format': None, 'created_at': datetime.datetime(2011, 1, 1, 1, 2, 3), 'disk_format': None, 'updated_at': datetime.datetime(2011, 1, 1, 1, 2, 3), 'id': '76fa36fc-c930-4bf3-8c8a-ea2a2420deb6', 'is_public': True, 'deleted_at': None, 'properties': {'kernel_id': 'nokernel', 'ramdisk_id': 'nokernel'}}}
--------------------- >> end captured logging << ---------------------

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

Changed in nova:
assignee: nobody → Ghe Rivero (ghe.rivero)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/9532
Committed: http://github.com/openstack/nova/commit/5526fb6db239677fead7bfbff8b2a6672bba6367
Submitter: Jenkins
Branch: master

commit 5526fb6db239677fead7bfbff8b2a6672bba6367
Author: Ghe Rivero <email address hidden>
Date: Mon Jul 9 20:02:44 2012 +0200

    Fix snapshots tests failing
    bug 1022670

    When running snapshot test, FLAGS.instances_path is defined as '',
    with snapshot_directory='/snapshots' which will fail to to permissions errors.

    Modified class LibvirtConnTestCase to use libvirt_snapshots_directory=''

    Change-Id: I930e4f30ddffcf66c58312e92f0ae368e770e438

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → folsom-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-3 → 2012.2
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.