Incorrect replication status on clusters

Bug #1758024 reported by Gorka Eguileor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Gorka Eguileor

Bug Description

When running a replicated service in a cluster, the replication_status field in the Cluster DB table doesn't get updated in some cases, making the cluster look like it's non replicated:

- When starting a new clustered replicated service cluster.
- When enabling replication on an already clustered service.

The reason for that is that the service and cluster creation happens on the Service's __init__ method, while the replication status isn't known until later, when the start method in the service calls the manager's init_host_with_rpc, where the manager updates the service DB entry.

Gorka Eguileor (gorka)
Changed in cinder:
assignee: nobody → Gorka Eguileor (gorka)
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/555253

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/555253
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=43b1209f2a8accf7d2744da3c7a552e92d8a55be
Submitter: Zuul
Branch: master

commit 43b1209f2a8accf7d2744da3c7a552e92d8a55be
Author: Gorka Eguileor <email address hidden>
Date: Wed Mar 21 18:33:26 2018 +0100

    Fix: Incorrect replication status on clusters

    When running a replicated service in a cluster, the replication_status
    field in the Cluster DB table doesn't get updated in some cases, making
    the cluster look like it's non replicated:

    - When starting a new clustered replicated service cluster.
    - When enabling replication on an already clustered service.

    The reason for that is that the service and cluster creation happens on
    the Service's __init__ method, while the replication status isn't known
    until later, when the start method in the service calls the manager's
    init_host_with_rpc, where the manager updates the service DB entry.

    This patch adds an update for the replication field to the cluster table
    in that same place, making sure we have the right data.

    Closes-Bug: #1758024
    Change-Id: I0d2fded62372a2fc5f49538133c5b66694dccc77

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 13.0.0.0b1

This issue was fixed in the openstack/cinder 13.0.0.0b1 development milestone.

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

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/593959

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

Reviewed: https://review.openstack.org/593959
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=448ad106d34bfcc3440953bacd3db96a7c2ae3f7
Submitter: Zuul
Branch: stable/queens

commit 448ad106d34bfcc3440953bacd3db96a7c2ae3f7
Author: Gorka Eguileor <email address hidden>
Date: Wed Mar 21 18:33:26 2018 +0100

    Fix: Incorrect replication status on clusters

    When running a replicated service in a cluster, the replication_status
    field in the Cluster DB table doesn't get updated in some cases, making
    the cluster look like it's non replicated:

    - When starting a new clustered replicated service cluster.
    - When enabling replication on an already clustered service.

    The reason for that is that the service and cluster creation happens on
    the Service's __init__ method, while the replication status isn't known
    until later, when the start method in the service calls the manager's
    init_host_with_rpc, where the manager updates the service DB entry.

    This patch adds an update for the replication field to the cluster table
    in that same place, making sure we have the right data.

    Closes-Bug: #1758024
    Change-Id: I0d2fded62372a2fc5f49538133c5b66694dccc77
    (cherry picked from commit 43b1209f2a8accf7d2744da3c7a552e92d8a55be)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 12.0.4

This issue was fixed in the openstack/cinder 12.0.4 release.

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.