can't upgrade to using multi-backend on an existing setup

Bug #1320688 reported by John Griffith
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
John Griffith
Icehouse
Fix Released
Undecided
Unassigned

Bug Description

If you deploy Cinder as per the default using the docs, you can't later decide to add backends using the multi-backend functionality. The reason is that multi-backend is implemented by appending a backend-name to the host entry. So if you convert the config to multi-backend the hostname for any volumes that you have created are no longer associated with a valid volume-driver.

There are only two ways to address this currently:
1. Manually modify the host entry in the database for each of the volumes to point to the "new" backend host
2. Don't use multi-backend, but instead, deploy another Cinder node BUT in this case use multi-backend with a single enabled backend in the conf file.

We should probably change the docs and the default configuration of Cinder to setup using the multi-backend format, that way it's possible to add backends later without losing access to volumes. At the very least we should document very clearly in the docs that you need to consider this sort of thing when planning your deployment. Some prefer to actually scale out nodes, and in the case of multiple LVM's that's recommended anyway.

Changed in cinder:
milestone: none → juno-1
Revision history for this message
Vilobh Meshram (vilobhmm) wrote :

With this link specifying the way multi-backends should be added http://docs.openstack.org/admin-guide-cloud/content/multi_backend.html what more is expected out of this Bug ?

Thanks.

Changed in cinder:
assignee: nobody → Vilobh Meshram (vilobhmm)
Changed in cinder:
milestone: juno-1 → juno-2
Revision history for this message
Vilobh Meshram (vilobhmm) wrote :

Discussed this with John on IRC there are 2 ways to approach this problem :-

The problem is the new host can’t recognize the volumes created through old host. John suggested it would be worth to have an api call that mass changes host values.

1. Modify docs so the default is to use config groups (even if we only have one backend)
2. Code changes. Change can go in cinder-manage can be a simple SQL script to change the entries. If not a simple SQL script which does an update, an API which will run this SQL script internally can be helpful in the case where the underlying sql schema changes.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
assignee: Vilobh Meshram (vilobhmm) → John Griffith (john-griffith)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/103414

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/103411
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=2068164d0f155578d2f7a106afe464ef578032cb
Submitter: Jenkins
Branch: master

commit 2068164d0f155578d2f7a106afe464ef578032cb
Author: John Griffith <email address hidden>
Date: Sun Jun 29 09:06:31 2014 -0600

    Add cinder-manage cmd to update host column

    If you deploy Cinder as per the default using the docs,
    you can't later decide to add backends using the
    multi-backend functionality. The reason is that multi-backend
    is implemented by appending a backend-name to the host entry.

    So if you convert the config to multi-backend the hostname
    for any volumes that you have created are no longer
    associated with a valid volume-driver (ie you can no
    longer perform operations including delete on these
    volumes).

    In addition, in the case of using a SAN attached backend if
    one redeploys their cinder-volume service to another node
    they'll have the same issue.

    This patch adds a cinder-manage command that will go through
    volumes that are located on a specified host and update
    the host column on each of them.

    Change-Id: I8758fb8ef3fccbba2a598240c42d625b997e2db6
    Closes-Bug: 1320688

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
Duncan Thomas (duncan-thomas) wrote :

Can we set a default_backend int eh config file so that it can do the remapping on the fly? Just point it at the new name of the old backend and the volume manager can fill it in when it needs it...

Revision history for this message
John Griffith (john-griffith) wrote :

going forward sure... (I think I said that somewhere before, so I'd certainly agree), doesn't help people already in the situation however which is what I wanted to address here.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/icehouse)

Reviewed: https://review.openstack.org/103414
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=1d80539f99be8e8eccb5fd2b172406cbd4da30cb
Submitter: Jenkins
Branch: stable/icehouse

commit 1d80539f99be8e8eccb5fd2b172406cbd4da30cb
Author: John Griffith <email address hidden>
Date: Sun Jun 29 09:06:31 2014 -0600

    Add cinder-manage cmd to update host column

    If you deploy Cinder as per the default using the docs,
    you can't later decide to add backends using the
    multi-backend functionality. The reason is that multi-backend
    is implemented by appending a backend-name to the host entry.

    So if you convert the config to multi-backend the hostname
    for any volumes that you have created are no longer
    associated with a valid volume-driver (ie you can no
    longer perform operations including delete on these
    volumes).

    In addition, in the case of using a SAN attached backend if
    one redeploys their cinder-volume service to another node
    they'll have the same issue.

    This patch adds a cinder-manage command that will go through
    volumes that are located on a specified host and update
    the host column on each of them.

    Change-Id: I8758fb8ef3fccbba2a598240c42d625b997e2db6
    Closes-Bug: 1320688
    (cherry picked from commit 2068164d0f155578d2f7a106afe464ef578032cb)

tags: added: in-stable-icehouse
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-2 → 2014.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.