periodic_share_replica_update should not touch active replicas

Bug #1924230 reported by Maurice Escher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Low
Maurice Escher

Bug Description

Hi,

I believe the intend of share manager's periodic_share_replica_update() is to check on the health of secondary replicas.

https://opendev.org/openstack/manila/src/commit/ad4315eb360ccc9afbd78d4bc5b5e5e0716df87b/manila/share/manager.py#L2566-L2569

Same like periodic_share_replica_snapshot_update() it should not touch the active replica
https://opendev.org/openstack/manila/src/commit/ad4315eb360ccc9afbd78d4bc5b5e5e0716df87b/manila/share/manager.py#L3776-L3779

Or at least the comment for qualified_replica() is wrong ;)

I noticed because _share_replica_update() may fail on getting _active_replica later if there is no active replica, e.g. if the share is in error state.

BR,
Maurice

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

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/manila/+/786367

Changed in manila:
status: New → In Progress
Revision history for this message
Maurice Escher (maurice-escher) wrote :
Changed in manila:
assignee: nobody → Maurice Escher (maurice-escher)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/manila/+/786658

Vida Haririan (vhariria)
Changed in manila:
importance: Undecided → Low
Revision history for this message
Vida Haririan (vhariria) wrote :
Changed in manila:
milestone: none → xena-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.opendev.org/c/openstack/manila/+/786367
Committed: https://opendev.org/openstack/manila/commit/5ba3117f20261d6a49a0ee0131c3c01c2bfb4d2d
Submitter: "Zuul (22348)"
Branch: master

commit 5ba3117f20261d6a49a0ee0131c3c01c2bfb4d2d
Author: Maurice Escher <email address hidden>
Date: Thu Apr 15 10:06:41 2021 +0200

    Don't run periodic_share_replica_update() on active replicas

    Similarly to periodic_share_replica_snapshot_update() skip active
    replicas and do what the comment above says.

    Change-Id: I719c670416c06f8eb9228a3537034285ae3733b4
    Partial-Bug: #1924230

Revision history for this message
Carlos Eduardo (silvacarlose) wrote :

Partially fixed in the master branch. Still waiting on https://review.opendev.org/c/openstack/manila/+/786658 to get merged.
Let's tag it as yoga-1 :)

Changed in manila:
milestone: xena-rc1 → yoga-1
milestone: yoga-1 → xena-rc1
milestone: xena-rc1 → yoga-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/manila/+/817112

Changed in manila:
milestone: yoga-1 → yoga-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.opendev.org/c/openstack/manila/+/786658
Committed: https://opendev.org/openstack/manila/commit/7b7d18e14243c82c20b49f134a5a007f5f21fcdd
Submitter: "Zuul (22348)"
Branch: master

commit 7b7d18e14243c82c20b49f134a5a007f5f21fcdd
Author: Maurice Escher <email address hidden>
Date: Fri Apr 16 15:26:20 2021 +0200

    early return for _share_replica_update() if there is no active replica

    If the parent share of the replica has no active replica,
    this is an error situation where _share_replica_update() simply
    returns and logs a warning if the replica being acted on has not
    been already in error state itself before.

    Change-Id: I9bdbbaafba413fa4b2a783130fd58a4b6c2cea4b
    Partial-Bug: #1924230

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

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/manila/+/821753

Vida Haririan (vhariria)
Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/manila/+/817112
Committed: https://opendev.org/openstack/manila/commit/c44108f9ce8b9b7fc632ae6c6386fd6a5e584ff1
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit c44108f9ce8b9b7fc632ae6c6386fd6a5e584ff1
Author: Maurice Escher <email address hidden>
Date: Thu Apr 15 10:06:41 2021 +0200

    Don't run periodic_share_replica_update() on active replicas

    Similarly to periodic_share_replica_snapshot_update() skip active
    replicas and do what the comment above says.

    Change-Id: I719c670416c06f8eb9228a3537034285ae3733b4
    Partial-Bug: #1924230
    (cherry picked from commit 5ba3117f20261d6a49a0ee0131c3c01c2bfb4d2d)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/manila/+/824616

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

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/manila/+/824617

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/821753
Committed: https://opendev.org/openstack/manila/commit/31f7c97205bb6a408a5c2fe5607c0e6e1d115ea1
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 31f7c97205bb6a408a5c2fe5607c0e6e1d115ea1
Author: Maurice Escher <email address hidden>
Date: Fri Apr 16 15:26:20 2021 +0200

    early return for _share_replica_update() if there is no active replica

    If the parent share of the replica has no active replica,
    this is an error situation where _share_replica_update() simply
    returns and logs a warning if the replica being acted on has not
    been already in error state itself before.

    Change-Id: I9bdbbaafba413fa4b2a783130fd58a4b6c2cea4b
    Partial-Bug: #1924230
    (cherry picked from commit 7b7d18e14243c82c20b49f134a5a007f5f21fcdd)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/manila/+/824616
Committed: https://opendev.org/openstack/manila/commit/860b45e21f0dcd43f85fc159d386686f39605c82
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 860b45e21f0dcd43f85fc159d386686f39605c82
Author: Maurice Escher <email address hidden>
Date: Thu Apr 15 10:06:41 2021 +0200

    Don't run periodic_share_replica_update() on active replicas

    Similarly to periodic_share_replica_snapshot_update() skip active
    replicas and do what the comment above says.

    Change-Id: I719c670416c06f8eb9228a3537034285ae3733b4
    Partial-Bug: #1924230
    (cherry picked from commit 5ba3117f20261d6a49a0ee0131c3c01c2bfb4d2d)
    (cherry picked from commit c44108f9ce8b9b7fc632ae6c6386fd6a5e584ff1)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/manila/+/824617
Committed: https://opendev.org/openstack/manila/commit/f7376849929511b251f3668f91639bda3d9ec885
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit f7376849929511b251f3668f91639bda3d9ec885
Author: Maurice Escher <email address hidden>
Date: Fri Apr 16 15:26:20 2021 +0200

    early return for _share_replica_update() if there is no active replica

    If the parent share of the replica has no active replica,
    this is an error situation where _share_replica_update() simply
    returns and logs a warning if the replica being acted on has not
    been already in error state itself before.

    Change-Id: I9bdbbaafba413fa4b2a783130fd58a4b6c2cea4b
    Partial-Bug: #1924230
    (cherry picked from commit 7b7d18e14243c82c20b49f134a5a007f5f21fcdd)
    (cherry picked from commit 31f7c97205bb6a408a5c2fe5607c0e6e1d115ea1)

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

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/manila/+/825065

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

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/manila/+/825066

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/825065
Committed: https://opendev.org/openstack/manila/commit/533eff9ff25f9a1df0523771cfe409aeb9724dd7
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 533eff9ff25f9a1df0523771cfe409aeb9724dd7
Author: Maurice Escher <email address hidden>
Date: Thu Apr 15 10:06:41 2021 +0200

    Don't run periodic_share_replica_update() on active replicas

    Similarly to periodic_share_replica_snapshot_update() skip active
    replicas and do what the comment above says.

    Change-Id: I719c670416c06f8eb9228a3537034285ae3733b4
    Partial-Bug: #1924230
    (cherry picked from commit 5ba3117f20261d6a49a0ee0131c3c01c2bfb4d2d)
    (cherry picked from commit c44108f9ce8b9b7fc632ae6c6386fd6a5e584ff1)
    (cherry picked from commit 860b45e21f0dcd43f85fc159d386686f39605c82)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/manila/+/826228

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

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/manila/+/826229

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/825066
Committed: https://opendev.org/openstack/manila/commit/daeae4ccb05eeb212c7a29643464b0c4dfe41783
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit daeae4ccb05eeb212c7a29643464b0c4dfe41783
Author: Maurice Escher <email address hidden>
Date: Fri Apr 16 15:26:20 2021 +0200

    early return for _share_replica_update() if there is no active replica

    If the parent share of the replica has no active replica,
    this is an error situation where _share_replica_update() simply
    returns and logs a warning if the replica being acted on has not
    been already in error state itself before.

    Change-Id: I9bdbbaafba413fa4b2a783130fd58a4b6c2cea4b
    Partial-Bug: #1924230
    (cherry picked from commit 7b7d18e14243c82c20b49f134a5a007f5f21fcdd)
    (cherry picked from commit 31f7c97205bb6a408a5c2fe5607c0e6e1d115ea1)
    (cherry picked from commit f7376849929511b251f3668f91639bda3d9ec885)

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/826228
Committed: https://opendev.org/openstack/manila/commit/32f7ca042743ad80beb1674a8c0d67255179380b
Submitter: "Zuul (22348)"
Branch: stable/train

commit 32f7ca042743ad80beb1674a8c0d67255179380b
Author: Maurice Escher <email address hidden>
Date: Thu Apr 15 10:06:41 2021 +0200

    Don't run periodic_share_replica_update() on active replicas

    Similarly to periodic_share_replica_snapshot_update() skip active
    replicas and do what the comment above says.

    Change-Id: I719c670416c06f8eb9228a3537034285ae3733b4
    Partial-Bug: #1924230
    (cherry picked from commit 5ba3117f20261d6a49a0ee0131c3c01c2bfb4d2d)
    (cherry picked from commit c44108f9ce8b9b7fc632ae6c6386fd6a5e584ff1)
    (cherry picked from commit 860b45e21f0dcd43f85fc159d386686f39605c82)
    (cherry picked from commit 533eff9ff25f9a1df0523771cfe409aeb9724dd7)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/manila/+/826229
Committed: https://opendev.org/openstack/manila/commit/fab69a13f5497f3a707af28c878a53ca8df2e375
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit fab69a13f5497f3a707af28c878a53ca8df2e375
Author: Maurice Escher <email address hidden>
Date: Fri Apr 16 15:26:20 2021 +0200

    early return for _share_replica_update() if there is no active replica

    If the parent share of the replica has no active replica,
    this is an error situation where _share_replica_update() simply
    returns and logs a warning if the replica being acted on has not
    been already in error state itself before.

    Change-Id: I9bdbbaafba413fa4b2a783130fd58a4b6c2cea4b
    Partial-Bug: #1924230
    (cherry picked from commit 7b7d18e14243c82c20b49f134a5a007f5f21fcdd)
    (cherry picked from commit 31f7c97205bb6a408a5c2fe5607c0e6e1d115ea1)
    (cherry picked from commit f7376849929511b251f3668f91639bda3d9ec885)
    (cherry picked from commit daeae4ccb05eeb212c7a29643464b0c4dfe41783)

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.