Volume operations fail for thin provisioning the first time it's executed

Bug #1220286 reported by Flavio Percoco on 2013-09-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Medium
Flavio Percoco

Bug Description

The create_thin_pool method is called when thin provisioning is enabled and the pool doesn't exist. At the end of this method, self.vg_thin_pool is set[0] with the full pool_path which makes volume's creation fail since it tries to build the pool_path again.[1]

This is the command it generates:

sudo cinder-rootwrap /etc/cinder/rootwrap.conf lvcreate -T -V 1g -n volume-b0c7232b-4214-4d13-ac20-4894333b627d stack-volumes/stack-volumes/stack-volumes-pool

This stack-volumes/stack-volumes/stack-volumes-pool should be stack-volumes/stack-volumes-pool
[0] https://github.com/openstack/cinder/blob/master/cinder/brick/local_dev/lvm.py#L340
[1] https://github.com/openstack/cinder/blob/master/cinder/brick/local_dev/lvm.py#L353

Changed in cinder:
assignee: nobody → Flavio Percoco (flaper87)
description: updated
Eric Harney (eharney) on 2013-09-03
Changed in cinder:
status: New → Triaged
milestone: none → havana-rc1

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

Changed in cinder:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/44915
Committed: http://github.com/openstack/cinder/commit/29e889bde9364f30c3f1cbeb7ee835b036451cba
Submitter: Jenkins
Branch: master

commit 29e889bde9364f30c3f1cbeb7ee835b036451cba
Author: Flaper Fesp <email address hidden>
Date: Tue Sep 3 18:26:42 2013 +0200

    Set vg_thin_pool to pool name instead of pool_path

    create_thin_pool is setting vg_thin_pool to the pool path instead of the
    pool_name. This makes volumes creation fail when the create_thin_pool
    method is called. This happens because create_volume builds the pool
    path itself as create_thin_pool does.

    Keeping the pool name in vg_thin_pool instead of the path makes more
    sense and allows it to be used in other places in the brick. Also, most
    commands return both vg_name and pool_name separated.

    Change-Id: Ibf5cd746fc050eab5ce6aff13dd70c1e8066b228
    Closes-Bug: #1220286

Changed in cinder:
status: In Progress → Fix Committed
Eric Harney (eharney) on 2013-09-16
Changed in cinder:
importance: Undecided → Medium
Thierry Carrez (ttx) on 2013-10-04
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-rc1 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers