manila share-replica-promote does not enable autogrowth/-shrink of the share on NetApp

Bug #1957075 reported by Dietmar Ebert
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Fernando Ferraz

Bug Description

Description
===========

Creating a replica for a share provisions a new volume with autogrowth/-shrink enabled. The replica can grow/shrink depending on the settings of the share.
Promoting a replica does not update the "new" replica/share to also have autogrowith/-shrink enabled.

Steps to reproduce
==================

stack@openstack:~> manila create --name test NFS 1
+---------------------------------------+--------------------------------------+
| Property | Value |
+---------------------------------------+--------------------------------------+
| id | 3a8878c2-0187-45e1-aaf0-43c328c7128a |
| size | 1 |
| availability_zone | None |
| created_at | 2022-01-11T11:26:30.000000 |
| status | creating |
| name | test |
| description | None |
| project_id | 97d1893f1b084003a09d87a8da3c909a |
| snapshot_id | None |
| share_network_id | None |
| share_proto | NFS |
| metadata | {} |
| share_type | f0655acb-3810-4b0a-9ef5-1848758e86ea |
| is_public | False |
| snapshot_support | True |
| task_state | None |
| share_type_name | shared |
| access_rules_status | active |
| replication_type | dr |
| has_replicas | False |
| user_id | aad0db47eeb1437f82f200359377c051 |
| create_share_from_snapshot_support | True |
| revert_to_snapshot_support | True |
| share_group_id | None |
| source_share_group_snapshot_member_id | None |
| mount_snapshot_support | False |
| progress | None |
| share_server_id | None |
| host | |
+---------------------------------------+--------------------------------------+

stack@openstack:~> manila list
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+---------------------------------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+---------------------------------+-------------------+
| 3a8878c2-0187-45e1-aaf0-43c328c7128a | test | 1 | NFS | available | False | shared | openstack@vsim-1#aggr2_wdf_data | nova |
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+---------------------------------+-------------------+

stack@openstack:~> manila show test
+---------------------------------------+------------------------------------------------------------------+
| Property | Value |
+---------------------------------------+------------------------------------------------------------------+
| id | 3a8878c2-0187-45e1-aaf0-43c328c7128a |
| size | 1 |
| availability_zone | nova |
| created_at | 2022-01-11T11:26:30.000000 |
| status | available |
| name | test |
| description | None |
| project_id | 97d1893f1b084003a09d87a8da3c909a |
| snapshot_id | None |
| share_network_id | None |
| share_proto | NFS |
| metadata | {} |
| share_type | f0655acb-3810-4b0a-9ef5-1848758e86ea |
| is_public | False |
| snapshot_support | True |
| task_state | None |
| share_type_name | shared |
| access_rules_status | active |
| replication_type | dr |
| has_replicas | False |
| user_id | aad0db47eeb1437f82f200359377c051 |
| create_share_from_snapshot_support | True |
| revert_to_snapshot_support | True |
| share_group_id | None |
| source_share_group_snapshot_member_id | None |
| mount_snapshot_support | False |
| progress | 100% |
| share_server_id | None |
| host | openstack@vsim-1#aggr2_wdf_data |
| export_locations | |
| | id = 48dde46b-f58c-4083-a406-ec750eb6942d |
| | path = 192.168.2.100:/share_421b4632_423e_4a7a_b9a8_cfd0e2195e50 |
| | preferred = True |
| | share_instance_id = 421b4632-423e-4a7a-b9a8-cfd0e2195e50 |
| | is_admin_only = False |
| | id = 2b051a20-d91f-4bd8-9ca7-a0ea5a9d4023 |
| | path = 192.168.1.200:/share_421b4632_423e_4a7a_b9a8_cfd0e2195e50 |
| | preferred = True |
| | share_instance_id = 421b4632-423e-4a7a-b9a8-cfd0e2195e50 |
| | is_admin_only = False |
+---------------------------------------+------------------------------------------------------------------+

vsim1::*> vol show -vserver svm-1 -volume share_421b4632_423e_4a7a_b9a8_cfd0e2195e50 -fields autosize-mode
vserver volume autosize-mode
------- ------------------------------------------ -------------
svm-1 share_421b4632_423e_4a7a_b9a8_cfd0e2195e50 off

stack@openstack:~> manila share-replica-create test
+------------------------+--------------------------------------+
| Property | Value |
+------------------------+--------------------------------------+
| id | f5c625c9-77ab-4744-a746-fd3b2d29c0db |
| share_id | 3a8878c2-0187-45e1-aaf0-43c328c7128a |
| availability_zone | None |
| created_at | 2022-01-11T11:44:16.763611 |
| status | creating |
| share_network_id | None |
| replica_state | None |
| updated_at | None |
| share_server_id | None |
| host | |
| cast_rules_to_readonly | False |
+------------------------+--------------------------------------+

stack@openstack:~> manila share-replica-list
+--------------------------------------+-----------+---------------+--------------------------------------+---------------------------------+-------------------+----------------------------+
| ID | Status | Replica State | Share ID | Host | Availability Zone | Updated At |
+--------------------------------------+-----------+---------------+--------------------------------------+---------------------------------+-------------------+----------------------------+
| 421b4632-423e-4a7a-b9a8-cfd0e2195e50 | available | active | 3a8878c2-0187-45e1-aaf0-43c328c7128a | openstack@vsim-1#aggr2_wdf_data | nova | 2022-01-11T11:26:32.000000 |
| f5c625c9-77ab-4744-a746-fd3b2d29c0db | available | out_of_sync | 3a8878c2-0187-45e1-aaf0-43c328c7128a | openstack@vsim-1#aggr2_wdf_data | nova | 2022-01-11T11:44:19.000000 |
+--------------------------------------+-----------+---------------+--------------------------------------+---------------------------------+-------------------+----------------------------+

stack@openstack:~> manila share-replica-show f5c625c9-77ab-4744-a746-fd3b2d29c0db
+------------------------+--------------------------------------+
| Property | Value |
+------------------------+--------------------------------------+
| id | f5c625c9-77ab-4744-a746-fd3b2d29c0db |
| share_id | 3a8878c2-0187-45e1-aaf0-43c328c7128a |
| availability_zone | nova |
| created_at | 2022-01-11T11:44:16.000000 |
| status | available |
| share_network_id | None |
| replica_state | in_sync |
| updated_at | 2022-01-11T11:46:49.000000 |
| share_server_id | None |
| host | openstack@vsim-1#aggr2_wdf_data |
| cast_rules_to_readonly | False |
| export_locations | [] |
+------------------------+--------------------------------------+

vsim1::*> vol show -vserver svm-1 -volume share_f5c625c9_77ab_4744_a746_fd3b2d29c0db -fields autosize-mode
vserver volume autosize-mode
------- ------------------------------------------ -------------
svm-1 share_f5c625c9_77ab_4744_a746_fd3b2d29c0db grow_shrink

*** Promote ***

stack@openstack:~> manila share-replica-promote f5c625c9-77ab-4744-a746-fd3b2d29c0db
stack@openstack:~> manila share-replica-list
+--------------------------------------+--------------------+---------------+--------------------------------------+---------------------------------+-------------------+----------------------------+
| ID | Status | Replica State | Share ID | Host | Availability Zone | Updated At |
+--------------------------------------+--------------------+---------------+--------------------------------------+---------------------------------+-------------------+----------------------------+
| 421b4632-423e-4a7a-b9a8-cfd0e2195e50 | available | active | 3a8878c2-0187-45e1-aaf0-43c328c7128a | openstack@vsim-1#aggr2_wdf_data | nova | 2022-01-11T11:26:32.000000 |
| f5c625c9-77ab-4744-a746-fd3b2d29c0db | replication_change | in_sync | 3a8878c2-0187-45e1-aaf0-43c328c7128a | openstack@vsim-1#aggr2_wdf_data | nova | 2022-01-11T11:55:05.000000 |
+--------------------------------------+--------------------+---------------+--------------------------------------+---------------------------------+-------------------+----------------------------+
stack@openstack:~> manila share-replica-list
+--------------------------------------+-----------+---------------+--------------------------------------+---------------------------------+-------------------+----------------------------+
| ID | Status | Replica State | Share ID | Host | Availability Zone | Updated At |
+--------------------------------------+-----------+---------------+--------------------------------------+---------------------------------+-------------------+----------------------------+
| 421b4632-423e-4a7a-b9a8-cfd0e2195e50 | available | out_of_sync | 3a8878c2-0187-45e1-aaf0-43c328c7128a | openstack@vsim-1#aggr2_wdf_data | nova | 2022-01-11T11:55:18.000000 |
| f5c625c9-77ab-4744-a746-fd3b2d29c0db | available | active | 3a8878c2-0187-45e1-aaf0-43c328c7128a | openstack@vsim-1#aggr2_wdf_data | nova | 2022-01-11T11:55:18.000000 |
+--------------------------------------+-----------+---------------+--------------------------------------+---------------------------------+-------------------+----------------------------+

(new source, former replica)
vsim1::*> vol show -vserver svm-1 -volume share_f5c625c9_77ab_4744_a746_fd3b2d29c0db -fields autosize-mode
vserver volume autosize-mode
------- ------------------------------------------ -------------
svm-1 share_f5c625c9_77ab_4744_a746_fd3b2d29c0db grow_shrink

(new replica, former source)
vsim1::*> vol show -vserver svm-1 -volume share_421b4632_423e_4a7a_b9a8_cfd0e2195e50 -fields autosize-mode
vserver volume autosize-mode
------- ------------------------------------------ -------------
svm-1 share_421b4632_423e_4a7a_b9a8_cfd0e2195e50 off

Expected results
================
The promoted share should have autosize-mode set to grow_shrink.

Actual result
=============
It looks like autosize-mode of the promoted share is not touched.

Environment
===========

* Version: latest / also seen in Victoria
* Storage Backend: NetApp / Simulator

Logs & Configs
==============

N/A

Vida Haririan (vhariria)
tags: added: netapp replication
Vida Haririan (vhariria)
Changed in manila:
importance: Undecided → Medium
Revision history for this message
Vida Haririan (vhariria) wrote :
Revision history for this message
Maurice Escher (maurice-escher) wrote (last edit ):

I see there was some confusion in the meeting, I hope I can clear it up a bit:

The active replica does not have grow_shrink in this scenario, but only the passive.
And that is not, because we want that, but because that is the default working mode of snapmirror as far as I know: if you extend the size on the snapmirror source, you conveniently don't have to manually extend the size on the target, too. I'm not sure if this manual size change would even be possible, maybe with xdp, but most likely not with dp snapmirrors.

So the active replica will have the correct (manila = source of truth) size. If it is pretty much full the passive replica may already grow bigger depending on the autosize thresholds.

But now comes the replica promote: the old active replica is now passive and keeps its autosize none setting, and the old passive is now active and keeps its autosize grow_shrink setting.

Now the active one can grow out of control (bad because it is bigger than what is known to manila, bigger than what is billed for), and the new snapmirror target can not follow to grow automatically (bad as well, because sync will not work)

Changed in manila:
assignee: nobody → Fernando Ferraz (fernando-ferraz)
Changed in manila:
status: New → In Progress
Revision history for this message
Maurice Escher (maurice-escher) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.opendev.org/c/openstack/manila/+/833793
Committed: https://opendev.org/openstack/manila/commit/8896534bb4860d6bf4ad7d6f016b9a38e85c9840
Submitter: "Zuul (22348)"
Branch: master

commit 8896534bb4860d6bf4ad7d6f016b9a38e85c9840
Author: Nahim Alves de Souza <email address hidden>
Date: Tue Mar 15 13:37:28 2022 +0000

    [NetApp] Fixed replica promotion to updated autosize attributes

    When a volume is created in NetApp ONTAP, it has a few autosize
    attributes that are set by default. The values of the attributes
    are defined according to the volume type (DP/RW).

    During the replica promotion, the types are swaped between source
    and destination volumes, but the autosize values were not being
    updated. This patch fixes this behavior, calling an autosize reset
    after promoting the replica.

    Closes-Bug: #1957075
    Change-Id: I9a4e5763927b7585a8fbd6b0004d6a123dcd7fae

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

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

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

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

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

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

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/+/894844

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 17.0.0.0rc1

This issue was fixed in the openstack/manila 17.0.0.0rc1 release candidate.

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/894841
Committed: https://opendev.org/openstack/manila/commit/b4ac0d89d160dd8e284327802ad891560be8548b
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit b4ac0d89d160dd8e284327802ad891560be8548b
Author: Nahim Alves de Souza <email address hidden>
Date: Tue Mar 15 13:37:28 2022 +0000

    [NetApp] Fixed replica promotion to updated autosize attributes

    When a volume is created in NetApp ONTAP, it has a few autosize
    attributes that are set by default. The values of the attributes
    are defined according to the volume type (DP/RW).

    During the replica promotion, the types are swaped between source
    and destination volumes, but the autosize values were not being
    updated. This patch fixes this behavior, calling an autosize reset
    after promoting the replica.

    Closes-Bug: #1957075
    Change-Id: I9a4e5763927b7585a8fbd6b0004d6a123dcd7fae
    (cherry picked from commit 8896534bb4860d6bf4ad7d6f016b9a38e85c9840)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 16.1.0

This issue was fixed in the openstack/manila 16.1.0 release.

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/894842
Committed: https://opendev.org/openstack/manila/commit/3a218a0d16ee3be6bbf5ecccc46c476ea906409f
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 3a218a0d16ee3be6bbf5ecccc46c476ea906409f
Author: Nahim Alves de Souza <email address hidden>
Date: Tue Mar 15 13:37:28 2022 +0000

    [NetApp] Fixed replica promotion to updated autosize attributes

    When a volume is created in NetApp ONTAP, it has a few autosize
    attributes that are set by default. The values of the attributes
    are defined according to the volume type (DP/RW).

    During the replica promotion, the types are swaped between source
    and destination volumes, but the autosize values were not being
    updated. This patch fixes this behavior, calling an autosize reset
    after promoting the replica.

    Closes-Bug: #1957075
    Change-Id: I9a4e5763927b7585a8fbd6b0004d6a123dcd7fae
    (cherry picked from commit 8896534bb4860d6bf4ad7d6f016b9a38e85c9840)
    (cherry picked from commit b4ac0d89d160dd8e284327802ad891560be8548b)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 15.3.0

This issue was fixed in the openstack/manila 15.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (stable/yoga)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/yoga
Review: https://review.opendev.org/c/openstack/manila/+/894843
Reason: stable/yoga branch of openstack/manila is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/yoga if you want to further work on this patch.

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

Fix proposed to branch: unmaintained/yoga
Review: https://review.opendev.org/c/openstack/manila/+/909547

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (stable/xena)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/xena
Review: https://review.opendev.org/c/openstack/manila/+/894844
Reason: stable/xena branch of openstack/manila is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/xena if you want to further work on this patch.

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

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

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.