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)
In Progress
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 :
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.