On start services incorrectly set RPC client and serializer version pinning

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

Bug Description

When a service starts (c-sch, c-bak, c-vol) they set the versions for the RPC client and serializer using existing Service entries in the DB, but they don't consider themselves when determining the minimum version.

By not considering themselves we have 2 problematic scenarios:

1- When a service is first started it will pin to None version since there are no Services in the DB
2- When a service is upgraded and restarted it will pin to the old version since the entry in the DB has not been updated yet.

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

Changed in cinder:
status: New → In Progress
tags: added: mitaka-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/307104

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

Reviewed: https://review.openstack.org/304685
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=7efb2c6267417d27938d16712bf0704a2e5f25df
Submitter: Jenkins
Branch: master

commit 7efb2c6267417d27938d16712bf0704a2e5f25df
Author: Gorka Eguileor <email address hidden>
Date: Tue Apr 12 13:50:55 2016 +0200

    Fix service version pinning on start

    When a service starts (c-sch, c-bak, c-vol) they set the versions for
    the RPC client and serializer using existing Service entries in the DB,
    but they don't consider themselves when determining the minimum version.

    By not considering themselves we have 2 problematic scenarios:

    1- When a service is first started it will pin to None version since
    there are no Services in the DB 2- When a service is upgraded and
    restarted it will pin to the old version since the entry in the DB has
    not been updated yet.

    The problem is that Service.__init__ creates the service manager, which
    in turn creates required RPC API instances, and it is at this point that
    the pinning happens without the presence of this service DB entry.

    This patch fixes this by moving the creation of the DB entry from the
    Service.start method to the Service.__init__ method that gets called
    from Service.create method.

    There was an alternative solution, but it was more intrusive since it
    required changes not only to Service.start but also to all managers
    (since each one create different instances RPC APIs.

    Closes-Bug: #1569299
    backport-potential: mitaka
    Change-Id: I21f8e81d9923f44b22cc43c9c173bc560a93c631

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

Reviewed: https://review.openstack.org/307104
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=6523415445d0bd622f53f7f87e5cb4977024bed0
Submitter: Jenkins
Branch: stable/mitaka

commit 6523415445d0bd622f53f7f87e5cb4977024bed0
Author: Gorka Eguileor <email address hidden>
Date: Tue Apr 12 13:50:55 2016 +0200

    Fix service version pinning on start

    When a service starts (c-sch, c-bak, c-vol) they set the versions for
    the RPC client and serializer using existing Service entries in the DB,
    but they don't consider themselves when determining the minimum version.

    By not considering themselves we have 2 problematic scenarios:

    1- When a service is first started it will pin to None version since
    there are no Services in the DB 2- When a service is upgraded and
    restarted it will pin to the old version since the entry in the DB has
    not been updated yet.

    The problem is that Service.__init__ creates the service manager, which
    in turn creates required RPC API instances, and it is at this point that
    the pinning happens without the presence of this service DB entry.

    This patch fixes this by moving the creation of the DB entry from the
    Service.start method to the Service.__init__ method that gets called
    from Service.create method.

    There was an alternative solution, but it was more intrusive since it
    required changes not only to Service.start but also to all managers
    (since each one create different instances RPC APIs.

    Closes-Bug: #1569299
    Change-Id: I21f8e81d9923f44b22cc43c9c173bc560a93c631
    (cherry picked from commit 7efb2c6267417d27938d16712bf0704a2e5f25df)

tags: added: in-stable-mitaka
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/cinder 9.0.0.0b1

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

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/cinder 8.1.0

This issue was fixed in the openstack/cinder 8.1.0 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.