)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"f26066dfd2b905e96b702d8185e245dd2e2a1a04","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"7aa9a601_5bd59d20","updated":"2023-03-01 16:57:21.000000000","message":"Hi, Maurice! Could you please take a look at the comments inline? :)","commit_id":"06d4bf109cb39852c0d79c57cf9752f9651a6d27"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"053b096b4a31a94bc89f9bf553654f1779aeddb4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4c77974d_37009855","updated":"2023-01-05 07:17:35.000000000","message":"recheck\n\nmanila.tests.db.migrations.alembic.test_migration.TestManilaMigrationsMySQL.test_walk_versions timed out, which is unrelated","commit_id":"06d4bf109cb39852c0d79c57cf9752f9651a6d27"},{"author":{"_account_id":35075,"name":"Alexander Deiter","email":"adeiter@infinidat.com","username":"adeiter"},"change_message_id":"a35e2af1847697ff19aadacfe3650e296cd46a87","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"92994ec6_a8d48d65","updated":"2023-03-30 14:55:35.000000000","message":"run-INFINIDAT","commit_id":"06d4bf109cb39852c0d79c57cf9752f9651a6d27"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"d356b534845f24bb0d91005f3219cc07d4da03c6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"f21acd2c_5b9516db","updated":"2023-07-10 12:15:03.000000000","message":"Fix looks good, thanks for working on it, Maurice! Could you please work on a release note?","commit_id":"3a6134e99a31093f6ba76c76ff673d1a0948a916"},{"author":{"_account_id":35075,"name":"Alexander Deiter","email":"adeiter@infinidat.com","username":"adeiter"},"change_message_id":"5779152a202f21032a06982871103c6568a3dfe9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"ed2f2bd4_db1be39e","updated":"2023-06-02 19:46:34.000000000","message":"Looks good to me - thank you!","commit_id":"3a6134e99a31093f6ba76c76ff673d1a0948a916"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"2a2d00c816dc4e4738d6d29c65988ba5aadd7161","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"a9968ab9_94066d95","updated":"2023-06-01 19:28:13.000000000","message":"recheck\nMany failures - all seem unrelated to this change","commit_id":"3a6134e99a31093f6ba76c76ff673d1a0948a916"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"07027850edb446a828975f9b7cc94a6a1fef1f55","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"830a6959_37f8cd96","in_reply_to":"f21acd2c_5b9516db","updated":"2023-07-10 13:44:04.000000000","message":"done","commit_id":"3a6134e99a31093f6ba76c76ff673d1a0948a916"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"c6493669ab2826b20b71c1c51f6a3c3499bf1f91","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"e91e608a_7cacb3e1","updated":"2023-07-12 11:34:37.000000000","message":"LGTM, thanks Maurice and Kiran!","commit_id":"945579aefc2bbe6583e333ffd90a24a1044e059f"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"951c2445eefb87948f2ba6adb874ff03548c71b6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"d7055a13_28992f3d","updated":"2023-07-27 04:56:57.000000000","message":"Thanks Maurice; LGTM!","commit_id":"945579aefc2bbe6583e333ffd90a24a1044e059f"}],"manila/share/manager.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3d595d73af9277e94b7b283ded91107bbb92f2f5","unresolved":true,"context_lines":[{"line_number":2345,"context_line":"        share_replica \u003d self._get_share_instance_dict(context, share_replica)"},{"line_number":2346,"context_line":""},{"line_number":2347,"context_line":"        try:"},{"line_number":2348,"context_line":"            replica_ref \u003d self.driver.create_replica("},{"line_number":2349,"context_line":"                context, replica_list, share_replica,"},{"line_number":2350,"context_line":"                share_access_rules, available_share_snapshots,"},{"line_number":2351,"context_line":"                share_server\u003dshare_server) or {}"},{"line_number":2352,"context_line":""},{"line_number":2353,"context_line":"        except Exception as excep:"},{"line_number":2354,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2355,"context_line":"                LOG.error(\"Share replica %s failed on creation.\","}],"source_content_type":"text/x-python","patch_set":3,"id":"cd858eb9_f0a32063","line":2352,"range":{"start_line":2348,"start_character":0,"end_line":2352,"end_character":0},"updated":"2023-01-09 18:01:00.000000000","message":"access rules are being sent to the driver here with the assumption that they will be applied..","commit_id":"06d4bf109cb39852c0d79c57cf9752f9651a6d27"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ec588cd24140f0b14b040f9e733d76bbacbe8a0","unresolved":false,"context_lines":[{"line_number":2345,"context_line":"        share_replica \u003d self._get_share_instance_dict(context, share_replica)"},{"line_number":2346,"context_line":""},{"line_number":2347,"context_line":"        try:"},{"line_number":2348,"context_line":"            replica_ref \u003d self.driver.create_replica("},{"line_number":2349,"context_line":"                context, replica_list, share_replica,"},{"line_number":2350,"context_line":"                share_access_rules, available_share_snapshots,"},{"line_number":2351,"context_line":"                share_server\u003dshare_server) or {}"},{"line_number":2352,"context_line":""},{"line_number":2353,"context_line":"        except Exception as excep:"},{"line_number":2354,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2355,"context_line":"                LOG.error(\"Share replica %s failed on creation.\","}],"source_content_type":"text/x-python","patch_set":3,"id":"6a5c98e7_0f5949df","line":2352,"range":{"start_line":2348,"start_character":0,"end_line":2352,"end_character":0},"in_reply_to":"39fbd139_c6ed908b","updated":"2023-04-25 12:46:28.000000000","message":"Done","commit_id":"06d4bf109cb39852c0d79c57cf9752f9651a6d27"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"3e34de11e0c5870d6f6a921f70ad838c18e7d336","unresolved":true,"context_lines":[{"line_number":2345,"context_line":"        share_replica \u003d self._get_share_instance_dict(context, share_replica)"},{"line_number":2346,"context_line":""},{"line_number":2347,"context_line":"        try:"},{"line_number":2348,"context_line":"            replica_ref \u003d self.driver.create_replica("},{"line_number":2349,"context_line":"                context, replica_list, share_replica,"},{"line_number":2350,"context_line":"                share_access_rules, available_share_snapshots,"},{"line_number":2351,"context_line":"                share_server\u003dshare_server) or {}"},{"line_number":2352,"context_line":""},{"line_number":2353,"context_line":"        except Exception as excep:"},{"line_number":2354,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2355,"context_line":"                LOG.error(\"Share replica %s failed on creation.\","}],"source_content_type":"text/x-python","patch_set":3,"id":"39fbd139_c6ed908b","line":2352,"range":{"start_line":2348,"start_character":0,"end_line":2352,"end_character":0},"in_reply_to":"cd858eb9_f0a32063","updated":"2023-04-21 13:49:06.000000000","message":"access rules are processed in the driver, I see at least for NetApp","commit_id":"06d4bf109cb39852c0d79c57cf9752f9651a6d27"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3d595d73af9277e94b7b283ded91107bbb92f2f5","unresolved":true,"context_lines":[{"line_number":2384,"context_line":"                {\u0027status\u0027: constants.STATUS_AVAILABLE,"},{"line_number":2385,"context_line":"                 \u0027replica_state\u0027: replica_ref.get(\u0027replica_state\u0027),"},{"line_number":2386,"context_line":"                 \u0027progress\u0027: \u0027100%\u0027})"},{"line_number":2387,"context_line":""},{"line_number":2388,"context_line":"        if replica_ref.get(\u0027access_rules_status\u0027):"},{"line_number":2389,"context_line":"            self._update_share_instance_access_rules_state("},{"line_number":2390,"context_line":"                context, share_replica[\u0027id\u0027],"},{"line_number":2391,"context_line":"                replica_ref.get(\u0027access_rules_status\u0027))"},{"line_number":2392,"context_line":"        else:"},{"line_number":2393,"context_line":"            self._update_share_instance_access_rules_state("},{"line_number":2394,"context_line":"                context, share_replica[\u0027id\u0027],"},{"line_number":2395,"context_line":"                constants.STATUS_ACTIVE)"},{"line_number":2396,"context_line":""},{"line_number":2397,"context_line":"        if share_access_rules:"},{"line_number":2398,"context_line":"            self.share_api.allow_access_to_instance("}],"source_content_type":"text/x-python","patch_set":3,"id":"8ee79925_cfc7c24d","line":2395,"range":{"start_line":2387,"start_character":0,"end_line":2395,"end_character":40},"updated":"2023-01-09 18:01:00.000000000","message":"Looks like this logic needs to handle updates to individual access rules as well..","commit_id":"06d4bf109cb39852c0d79c57cf9752f9651a6d27"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"3e34de11e0c5870d6f6a921f70ad838c18e7d336","unresolved":false,"context_lines":[{"line_number":2384,"context_line":"                {\u0027status\u0027: constants.STATUS_AVAILABLE,"},{"line_number":2385,"context_line":"                 \u0027replica_state\u0027: replica_ref.get(\u0027replica_state\u0027),"},{"line_number":2386,"context_line":"                 \u0027progress\u0027: \u0027100%\u0027})"},{"line_number":2387,"context_line":""},{"line_number":2388,"context_line":"        if replica_ref.get(\u0027access_rules_status\u0027):"},{"line_number":2389,"context_line":"            self._update_share_instance_access_rules_state("},{"line_number":2390,"context_line":"                context, share_replica[\u0027id\u0027],"},{"line_number":2391,"context_line":"                replica_ref.get(\u0027access_rules_status\u0027))"},{"line_number":2392,"context_line":"        else:"},{"line_number":2393,"context_line":"            self._update_share_instance_access_rules_state("},{"line_number":2394,"context_line":"                context, share_replica[\u0027id\u0027],"},{"line_number":2395,"context_line":"                constants.STATUS_ACTIVE)"},{"line_number":2396,"context_line":""},{"line_number":2397,"context_line":"        if share_access_rules:"},{"line_number":2398,"context_line":"            self.share_api.allow_access_to_instance("}],"source_content_type":"text/x-python","patch_set":3,"id":"9929bce7_64d7bd25","line":2395,"range":{"start_line":2387,"start_character":0,"end_line":2395,"end_character":40},"in_reply_to":"8ee79925_cfc7c24d","updated":"2023-04-21 13:49:06.000000000","message":"Done","commit_id":"06d4bf109cb39852c0d79c57cf9752f9651a6d27"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3d595d73af9277e94b7b283ded91107bbb92f2f5","unresolved":true,"context_lines":[{"line_number":2394,"context_line":"                context, share_replica[\u0027id\u0027],"},{"line_number":2395,"context_line":"                constants.STATUS_ACTIVE)"},{"line_number":2396,"context_line":""},{"line_number":2397,"context_line":"        if share_access_rules:"},{"line_number":2398,"context_line":"            self.share_api.allow_access_to_instance("},{"line_number":2399,"context_line":"                context, share_replica)"},{"line_number":2400,"context_line":""},{"line_number":2401,"context_line":"        LOG.info(\"Share replica %s created successfully.\","},{"line_number":2402,"context_line":"                 share_replica[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"553a2970_c56d05ed","line":2399,"range":{"start_line":2397,"start_character":0,"end_line":2399,"end_character":39},"updated":"2023-01-09 18:01:00.000000000","message":"This call is unnecessary since the driver is expected to deal with access rules sequential to the creation of the replica: \n\nhttps://github.com/openstack/manila/blob/73848870a5811d42fbd04f6e43efa3c78e037b82/manila/share/driver.py#L1876-L1879\n\n\nor, the driver can ignore the rules if they don\u0027t apply (for example, with \u0027dr\u0027 style of replication); the rules are provided again during the promotion: https://github.com/openstack/manila/blob/73848870a5811d42fbd04f6e43efa3c78e037b82/manila/share/driver.py#L2137-L2138\n\n\nSo I think we should change the \"queued_to_apply\" state of the individual access rules to \"active\" in the \"else\" block above (Line 2392). It\u0027s possible there are rules that don\u0027t get applied eventually (i.e., invalid rules), we could allow the driver to tell us which ones in the \"create_replica\" and \"promote_replica\" operations.. something along these lines:\n\n     reported_access_rules_status \u003d replica_ref.get(\u0027access_rules_status\u0027)\n     if reported_access_rules_status in (None, \"active\"):\n            # update all rules to \"active\"\n            conditionally_change \u003d {\u0027queued_to_apply\u0027: \u0027active\u0027}\n            self.access_helper.get_and_update_share_instance_access_rules(\n                context, share_instance_id\u003dshare_replica[\u0027id\u0027],\n                conditionally_change\u003dconditionally_change)\n            # update \"access_rules_status\" on the replica\n            self._update_share_instance_access_rules_state(\n                context, share_replica[\u0027id\u0027],\n                constants.STATUS_ACTIVE)\n     elif replica_ref.get(\u0027share_access_rules\u0027):\n           # driver would like to update individual access rules\n           share_access_rules_dict \u003d {rule[\u0027id\u0027]: rule for rule in share_access_rules}\n           for rule_update in replica_ref.get(\u0027share_access_rules\u0027):\n               self.access_helper.get_and_update_share_instance_access_rule(\n                   context, \n                   rule_update[\u0027id\u0027], \n                   {\u0027state\u0027: rule_update[\u0027state\u0027]},\n                   share_instance_id\u003dshare_replica[\u0027id\u0027])\n               share_access_rules_dict.pop(rule_update[\u0027id\u0027])\n           if share_access_rules_dict:\n              for rule in share_access_rules_dict:\n                  self.access_helper.get_and_update_share_instance_access_rule(\n                   context, \n                   rule_update[\u0027id\u0027], \n                   {\u0027state\u0027: \u0027active\u0027},\n                   share_instance_id\u003dshare_replica[\u0027id\u0027])\n            self._update_share_instance_access_rules_state(\n                context, share_replica[\u0027id\u0027],\n                replica_ref.get(\u0027access_rules_status\u0027))","commit_id":"06d4bf109cb39852c0d79c57cf9752f9651a6d27"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"3e34de11e0c5870d6f6a921f70ad838c18e7d336","unresolved":false,"context_lines":[{"line_number":2394,"context_line":"                context, share_replica[\u0027id\u0027],"},{"line_number":2395,"context_line":"                constants.STATUS_ACTIVE)"},{"line_number":2396,"context_line":""},{"line_number":2397,"context_line":"        if share_access_rules:"},{"line_number":2398,"context_line":"            self.share_api.allow_access_to_instance("},{"line_number":2399,"context_line":"                context, share_replica)"},{"line_number":2400,"context_line":""},{"line_number":2401,"context_line":"        LOG.info(\"Share replica %s created successfully.\","},{"line_number":2402,"context_line":"                 share_replica[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"8539c5e7_9dfb5952","line":2399,"range":{"start_line":2397,"start_character":0,"end_line":2399,"end_character":39},"in_reply_to":"553a2970_c56d05ed","updated":"2023-04-21 13:49:06.000000000","message":"Done","commit_id":"06d4bf109cb39852c0d79c57cf9752f9651a6d27"}]}
