Integrated unit tests fail in cinder due to default volume type not found

Bug #1173266 reported by Dirk Mueller
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Unassigned

Bug Description

Running

nosetests cinder/tests/integrated/test_volumes.py

on master fails with:

  File "/data/dmueller/src/Cloud/cinder/cinder/tests/integrated/test_volumes.py", line 108, in test_create_and_delete_volume
    self.assertEqual('available', found_volume['status'])
AssertionError: 'available' != u'error'
    "'available' != u'error'" = '%s != %s' % (safe_repr('available'), safe_repr(u'error'))
    "'available' != u'error'" = self._formatMessage("'available' != u'error'", "'available' != u'error'")
>> raise self.failureException("'available' != u'error'")

which is due to (according logs):

cinder.volume.volume_types: ERROR: Default volume type is not found, please check default_volume_type config: Volume type with name fake_vol_type could not be found.
Traceback (most recent call last):
  File "/data/dmueller/src/Cloud/cinder/cinder/volume/volume_types.py", line 123, in get_default_volume_type
    vol_type = get_volume_type_by_name(ctxt, name)
  File "/data/dmueller/src/Cloud/cinder/cinder/volume/volume_types.py", line 112, in get_volume_type_by_name
    return db.volume_type_get_by_name(context, name)
  File "/data/dmueller/src/Cloud/cinder/cinder/db/api.py", line 383, in volume_type_get_by_name
    return IMPL.volume_type_get_by_name(context, name)
  File "/data/dmueller/src/Cloud/cinder/cinder/db/sqlalchemy/api.py", line 123, in wrapper
    return f(*args, **kwargs)
  File "/data/dmueller/src/Cloud/cinder/cinder/db/sqlalchemy/api.py", line 1513, in volume_type_get_by_name
    raise exception.VolumeTypeNotFoundByName(volume_type_name=name)

Changed in cinder:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → havana-1
milestone: havana-1 → none
Revision history for this message
Shanthakumar K (shantha-kumar) wrote :

Have you created the volume-type and associated the same witholume backend name because your volume creation expecting the same.

Revision history for this message
Alexander Sheredin (alexander-sheredin) wrote :

Actually, the test would pass even with exception.VolumeTypeNotFoundByName(volume_type_name=name), but the main problem is:
cinder.scheduler.filters.capacity_filter: ERROR: Free capacity not set: volume node info collection broken.
cinder.scheduler.manager: ERROR: Failed to schedule_create_volume: No valid host was found.

The 'bug' is introduced in this commit:

commit a1deb1cdb0bc5e0af800f2e30be57e13d80d4b0e
Merge: 90971cd d17cc23
Author: Jenkins <email address hidden>
Date: Fri Feb 15 21:38:33 2013 +0000

    Merge "Allow create_volume() to retry when exception happened"

Before this commit the test was passing despite VolumeTypeNotFoundByName exception.

Revision history for this message
Rushi Agrawal (rushiagr) wrote :

I tried running tests, and everything went well. Am I missing something?

Revision history for this message
Duncan Thomas (duncan-thomas) wrote :

This was fixed by a recent commit that changed the default scheduler in the testsuite to 'chance'

Changed in cinder:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: havana-2 → 2013.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.