git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cinder][Ceph] Migrating backend host


On 16/05, Mohammed Naser wrote:
> On Thu, May 16, 2019 at 2:14 AM Gary Molenkamp <molenkam at uwo.ca> wrote:
> >
> > I am moving my cinder-volume service from one controller to another, and
> > I'm trying to determine the correct means to update all existing
> > volume's back-end host reference.  I now have two cinder volume services
> > running in front of the same ceph cluster, and I would like to retire
> > the old cinder-volume service.
> >
> > For example, on my test cloud, "openstack volume service list":
> >
> > +------------------+----------------------------------+------+---------+-------+----------------------------+
> > | Binary           | Host                             | Zone | Status  |
> > State | Updated At                 |
> > +------------------+----------------------------------+------+---------+-------+----------------------------+
> > | cinder-scheduler | osdev-ctrl1     | nova | enabled | up    |
> > 2019-05-15T17:44:05.000000 |
> > | cinder-volume    | osdev-ctrl2 at rbd | nova | disabled | up    |
> > 2019-05-15T17:44:04.000000 |
> > | cinder-volume    | osdev-ctrl1 at rbd | nova | enabled | up    |
> > 2019-05-15T17:44:00.000000 |
> > +------------------+----------------------------------+------+---------+-------+----------------------------+
> >
> > Now, an existing volume has a reference to the disabled cinder-volume:
> >      "os-vol-host-attr:host          | osdev-ctrl2 at rbd#rbd"
> >
> > but this needs to be changed to:
> >      "os-vol-host-attr:host          | osdev-ctrl1 at rbd#rbd"
> >
> > As both controllers are members of the same ceph cluster, an "openstack
> > volume migrate" is not appropriate.  If it is appropriate, my testing
> > has shown that it errors out and deletes the source volume from ceph.
> >
> > I can alter this field manually in the cinder database,  but in
> > following the "don't mess with the data model" mantra, is there a means
> > to do this from the cli?
>
> https://docs.openstack.org/cinder/stein/cli/cinder-manage.html#cinder-volume
>
> cinder-manage volume update_host --currenthost <current host>
> --newhost <new host>
>
> That should do it :)
>

Hi,

Since you've already create volumes in the new cinder-volume service
Mohammed's suggestion is the right one.

For the future, when you want to move the service to a new node, I would
recommend you setting the 'backend_host' configuration option in the
driver's section or the 'host' option in the DEFAULT section.

That way you don't need to modify the database and the service will
start with the same host as the old one regardless of where you are
running it.

This is the recommended way to deploy Cinder-Volume in Active-Passive,
as you won't need to make any changes when you start the service on a
new node.

Cheers,
Gorka.

> > Thanks,
> > Gary.
> >
> > Openstack release: Queens.
> > Distro: Redhat (Centos) 7.6
> >
> > --
> > Gary Molenkamp                  Computer Science/Science Technology Services
> > Systems Administrator           University of Western Ontario
> > molenkam at uwo.ca                 http://www.csd.uwo.ca
> > (519) 661-2111 x86882           (519) 661-3566
> >
>
>
> --
> Mohammed Naser â?? vexxhost
> -----------------------------------------------------
> D. 514-316-8872
> D. 800-910-1726 ext. 200
> E. mnaser at vexxhost.com
> W. http://vexxhost.com
>