)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Kiran Pawar \u003ckinpaa@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-08-23 11:01:13 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"NetApp - Fix share revert to snapshot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For NetApp ONTAP driver, share revert to snapshot consider the largest"},{"line_number":10,"context_line":"size between original share size and snapshot size after revert is done."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"b6aee037_2e31b52e","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":37},"updated":"2024-08-23 18:55:58.000000000","message":"The commit message reads like you\u0027re doing something _just_ with the NetApp driver, but, the change is modifying a lot of other drivers. \n\nMaybe:\n\n\"Allow drivers to set share size after revert to snapshot\"","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kiran Pawar \u003ckinpaa@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-08-23 11:01:13 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"NetApp - Fix share revert to snapshot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For NetApp ONTAP driver, share revert to snapshot consider the largest"},{"line_number":10,"context_line":"size between original share size and snapshot size after revert is done."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"e235be42_57608bc7","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":37},"in_reply_to":"b6aee037_2e31b52e","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"NetApp - Fix share revert to snapshot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For NetApp ONTAP driver, share revert to snapshot consider the largest"},{"line_number":10,"context_line":"size between original share size and snapshot size after revert is done."},{"line_number":11,"context_line":"This is different from generic approach where share size is updated to"},{"line_number":12,"context_line":"snapshot size."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9e66d20e_e771fe2c","line":9,"range":{"start_line":9,"start_character":50,"end_line":9,"end_character":58},"updated":"2024-08-23 18:55:58.000000000","message":"nit: considers","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"NetApp - Fix share revert to snapshot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For NetApp ONTAP driver, share revert to snapshot consider the largest"},{"line_number":10,"context_line":"size between original share size and snapshot size after revert is done."},{"line_number":11,"context_line":"This is different from generic approach where share size is updated to"},{"line_number":12,"context_line":"snapshot size."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"4ec61d94_50f6edd6","line":9,"range":{"start_line":9,"start_character":50,"end_line":9,"end_character":58},"in_reply_to":"9e66d20e_e771fe2c","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For NetApp ONTAP driver, share revert to snapshot consider the largest"},{"line_number":10,"context_line":"size between original share size and snapshot size after revert is done."},{"line_number":11,"context_line":"This is different from generic approach where share size is updated to"},{"line_number":12,"context_line":"snapshot size."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-bug: #2064502"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"c34613d8_85ad47b8","line":11,"range":{"start_line":11,"start_character":8,"end_line":11,"end_character":38},"updated":"2024-08-23 18:55:58.000000000","message":"different from the users\u0027 and Manila\u0027s expectation\n\n(there\u0027s no generic approach to revert-to-snapshot)","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For NetApp ONTAP driver, share revert to snapshot consider the largest"},{"line_number":10,"context_line":"size between original share size and snapshot size after revert is done."},{"line_number":11,"context_line":"This is different from generic approach where share size is updated to"},{"line_number":12,"context_line":"snapshot size."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-bug: #2064502"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"dc2e7974_75522066","line":11,"range":{"start_line":11,"start_character":8,"end_line":11,"end_character":38},"in_reply_to":"c34613d8_85ad47b8","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"560e54056eb60928972fea517c7b076173227319","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"fa104159_f8ef958a","updated":"2024-06-13 15:48:34.000000000","message":"Interesting pattern, I think it can work - but have a look at my inline suggestion, please","commit_id":"4e703408ab48e6e8a531d21eb9836a521d195fb4"},{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"8d8bbf3e8c99155e31a865ab469cc3c615b54ea6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"b5a93585_63f0b8e8","updated":"2024-06-24 14:31:33.000000000","message":"Have few comments","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"4fac23eaaf95654fa3c79fc4b5086455352e9b75","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"cc203860_0197dc75","updated":"2024-06-26 20:07:37.000000000","message":"Hey Kiran, thanks for working on this bugfix.. i\u0027ve a question inline","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"6cb430a93e41162e4ca2da3d3ac10f605388339c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"9fb4c045_03c8fca8","updated":"2024-08-10 18:55:57.000000000","message":"Hi Kiran, I relooked into the code and provided a few more comments.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":36171,"name":"jayaanand borra","display_name":"jayaanand borra","email":"jayaanand.borra@netapp.com","username":"jayaanan","status":"netapp"},"change_message_id":"c0578298704efea762dc4cdc9c050eb46f4e79e3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"def0e9c1_23d180ea","updated":"2024-07-08 07:46:50.000000000","message":"LGTM with respect to NetApp code","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"ae30f91f8d14525f28761d2f166f644705c94aa9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"3ba4c378_6dba61d5","updated":"2024-06-26 14:00:51.000000000","message":"Thanks for responding all the query, code looks fine for me.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"0680aa7ddf4efdb919cad54cc6025a8b10ca65db","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"1b653910_0db738db","updated":"2024-06-14 11:34:58.000000000","message":"recheck","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"6cb430a93e41162e4ca2da3d3ac10f605388339c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"44a22285_688989e3","in_reply_to":"0019cf04_2c0aac58","updated":"2024-08-10 18:55:57.000000000","message":"As you asked, someone from NetApp can share their comment on this. Based on this, I am providing my comment here\n- this fix is applicable only when we increase the volume size and then restore the snapshot. I think the code was working before if we shrink the volume and then restored the snapshot. I am assuming that the quota changes have already been made for shrink case. So your changes are only for extend the volume case .\n- Since this fix applies only when share[\u0027size\u0027] \u003e snapshot[\u0027size\u0027], we can add this condition in share/api before reverting the quota or calling the share/manager code. I have already provided this comment.\n- One option which Goutham suggested (netapp driver return the size based on failed/pass and then share/manager can apply the quota accordingly), this approach looks good but \n 1. ONTAP ZAPI passes when we restore the snapshot in cases share_size\u003esnapshot_size. However, the share size does not change, which is expected on ONTAP. I think we are addressing the same issue in Manila. Therefore, even in the driver, we are not sure in which cases it will fail, that making it difficult to add the appropriate condition.\n 2.In my previous comment, I suggested that we can validate this in the share/api, so there is no need to call the revert snapshot code in the manager and driver. \n- Once you fix the above comment, code looks good for me.\n\nNote: Above comments are only for volume extend not for shrink, as the code change was only done for volume extend.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"815e353ed8fa039b05d226b1d10ddafccd160d42","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"cb7a0a30_59069bf8","in_reply_to":"44a22285_688989e3","updated":"2024-08-11 05:04:32.000000000","message":"\u003eIn my previous comment, I suggested that we can validate this in the share/api, so there is no need to call the revert snapshot code in the manager and driver.\nWhat do you mean no need to call revert to snapshot code ?","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"5052a3256ab3f0fd139753da95d0b9a8a377f2df","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"f58cc8b0_5bc4856b","in_reply_to":"cb7a0a30_59069bf8","updated":"2024-08-12 16:29:58.000000000","message":"As we discuss this over call, we can not move this code to api as we need to invoke snapshot revert code anyway","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"fc9861dc1a7a1156953f9e93ed66aa31e4eb26b6","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"0019cf04_2c0aac58","in_reply_to":"def0e9c1_23d180ea","updated":"2024-07-08 08:06:47.000000000","message":"Jayaanand,\nDo you agree with Maurice to try extend/shrink on backend to match snapshot size or this is not worth it and current code looks good ?","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"60f59219b6749c6a34f217383e5f80f0ff5b3622","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"c8e9389f_1e130566","updated":"2024-08-20 12:21:32.000000000","message":"https://9df02cf91efa6b3346bf-4d55b755a5fbe07e50d33f65724e0fd2.ssl.cf5.rackcdn.com/920382/6/check/manila-tempest-plugin-lvm/c04f1a9/controller/logs/screen-m-shr.txt\n\nshows LVM tests are failing because revert to snapshot take almost minute on backend (check req-a8eb7c4f-ef9f-4e8d-8f5f-ac166fdb75d4). So idea of revert to snapshot should return size seems not correct.\n\n@goutham/@carlos\nWDYT ?","commit_id":"97e1f944a9d6c0d1590f8b681d95353562d8e8fc"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"2f582378_796d00c4","updated":"2024-08-23 18:55:58.000000000","message":"Hi @kinpaa@gmail.com - thanks for the changes; please see comments inline","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"e6a9d98794257af10b41b3474d2589faf7898acf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"d0045e46_73a59f44","updated":"2024-08-27 10:41:03.000000000","message":"After discussion with Maurice, updated size calculation logic in NetApp driver. Change is good to review/merge.","commit_id":"21e5800f8aa0e31bba7f789bee25f128baf83221"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"56ed409a9a5d213fb8e7b01a223a357f3762e8e1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"19be5518_ea0265b2","updated":"2024-08-27 08:01:33.000000000","message":"recheck","commit_id":"21e5800f8aa0e31bba7f789bee25f128baf83221"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"1effd8d74d87a54dd06076970bd680de11946bfc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"7b5abb12_6e041e2f","updated":"2024-08-27 12:43:23.000000000","message":"Hi, please have a look at the inline comments.\n\nAdditionally, please adjust the comments explaining the driver interface in revert_to_snapshot() of manila/share/driver.py with the meaning of the new optional return parameter.","commit_id":"b713819a4e91fd6ade83373a85855f0e831b5f9e"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"ce30926f9a5b854aee4383289365a4bfa699f1f5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"49339ee1_c1e9868b","updated":"2024-08-27 13:19:49.000000000","message":"I added another thought regarding the quota handling.","commit_id":"b713819a4e91fd6ade83373a85855f0e831b5f9e"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"2d4191bb9f985ed22e898ee35ece0042c461f1eb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"aea0279c_4c4114e3","updated":"2024-08-28 21:00:49.000000000","message":"Hi @kinpaa@gmail.com\n\nThanks for the changes; some more comments inline","commit_id":"ba5d63de90f45fee9b1953db29e47270a33da74a"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"e969aa223beb266cfd052c036d360b17bc41f00a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"864893d9_5a8f32bd","updated":"2024-08-28 08:03:03.000000000","message":"Thanks","commit_id":"ba5d63de90f45fee9b1953db29e47270a33da74a"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"490738106aa0881ef9a1721412eb4446de05865e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"bdbcf0c6_bc7d0ebb","updated":"2024-08-29 13:16:21.000000000","message":"LGTM, thanks Kiran","commit_id":"28908d69dad4c39962b9ed15bb0eb6729db0996c"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"2b6a16dd6d88cbf98a099b0d787f7e4c38cbb484","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"b7647b72_8ff44f7d","updated":"2024-08-29 05:57:09.000000000","message":"Thank you, LGTM","commit_id":"28908d69dad4c39962b9ed15bb0eb6729db0996c"}],"manila/share/api.py":[{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"8d8bbf3e8c99155e31a865ab469cc3c615b54ea6","unresolved":true,"context_lines":[{"line_number":1263,"context_line":"            return None"},{"line_number":1264,"context_line":""},{"line_number":1265,"context_line":"        # some drivers, consider max of (snapshot, share) during restore."},{"line_number":1266,"context_line":"        if self.share_rpcapi.is_revert_to_snapshot_by_max_size(context, share):"},{"line_number":1267,"context_line":"            if share[\u0027size\u0027] \u003e snapshot[\u0027size\u0027]:"},{"line_number":1268,"context_line":"                return None"},{"line_number":1269,"context_line":""},{"line_number":1270,"context_line":"        try:"},{"line_number":1271,"context_line":"            return QUOTAS.reserve("},{"line_number":1272,"context_line":"                context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"49a1dcf4_53b97321","line":1269,"range":{"start_line":1266,"start_character":7,"end_line":1269,"end_character":0},"updated":"2024-06-24 14:31:33.000000000","message":"I am not expert but just wanted to understand the use case of this code.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"5052a3256ab3f0fd139753da95d0b9a8a377f2df","unresolved":false,"context_lines":[{"line_number":1263,"context_line":"            return None"},{"line_number":1264,"context_line":""},{"line_number":1265,"context_line":"        # some drivers, consider max of (snapshot, share) during restore."},{"line_number":1266,"context_line":"        if self.share_rpcapi.is_revert_to_snapshot_by_max_size(context, share):"},{"line_number":1267,"context_line":"            if share[\u0027size\u0027] \u003e snapshot[\u0027size\u0027]:"},{"line_number":1268,"context_line":"                return None"},{"line_number":1269,"context_line":""},{"line_number":1270,"context_line":"        try:"},{"line_number":1271,"context_line":"            return QUOTAS.reserve("},{"line_number":1272,"context_line":"                context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba2f5c13_cdd2f325","line":1269,"range":{"start_line":1266,"start_character":7,"end_line":1269,"end_character":0},"in_reply_to":"2163de31_37226832","updated":"2024-08-12 16:29:58.000000000","message":"As we discuss this over call, we can not move this code to api as we need to invoke snapshot revert code anyway","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"6cb430a93e41162e4ca2da3d3ac10f605388339c","unresolved":true,"context_lines":[{"line_number":1263,"context_line":"            return None"},{"line_number":1264,"context_line":""},{"line_number":1265,"context_line":"        # some drivers, consider max of (snapshot, share) during restore."},{"line_number":1266,"context_line":"        if self.share_rpcapi.is_revert_to_snapshot_by_max_size(context, share):"},{"line_number":1267,"context_line":"            if share[\u0027size\u0027] \u003e snapshot[\u0027size\u0027]:"},{"line_number":1268,"context_line":"                return None"},{"line_number":1269,"context_line":""},{"line_number":1270,"context_line":"        try:"},{"line_number":1271,"context_line":"            return QUOTAS.reserve("},{"line_number":1272,"context_line":"                context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"2163de31_37226832","line":1269,"range":{"start_line":1266,"start_character":7,"end_line":1269,"end_character":0},"in_reply_to":"25c63299_7a56aa52","updated":"2024-08-10 18:55:57.000000000","message":"Instead of adding this code here you can add this code before invoking _handle_revert_to_snapshot_quotas method as below \n\n    def revert_to_snapshot(self, context, share, snapshot):\n        \"\"\"Revert a share to a snapshot.\"\"\"\n\n        # some drivers, consider max of (snapshot, share) during restore.\n        if self.share_rpcapi.is_revert_to_snapshot_by_max_size(context, share):\n            if share[\u0027size\u0027] \u003e snapshot[\u0027size\u0027]:\n                return None\n        reservations \u003d self._handle_revert_to_snapshot_quotas(\n            context, share, snapshot)\nIn this case, even we will be not invoking the manager code and so no need to add the code in revert_to_snapshot method in manager.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"603b610a1d9182f4d96d4b391b03a45f9f12b2f6","unresolved":false,"context_lines":[{"line_number":1263,"context_line":"            return None"},{"line_number":1264,"context_line":""},{"line_number":1265,"context_line":"        # some drivers, consider max of (snapshot, share) during restore."},{"line_number":1266,"context_line":"        if self.share_rpcapi.is_revert_to_snapshot_by_max_size(context, share):"},{"line_number":1267,"context_line":"            if share[\u0027size\u0027] \u003e snapshot[\u0027size\u0027]:"},{"line_number":1268,"context_line":"                return None"},{"line_number":1269,"context_line":""},{"line_number":1270,"context_line":"        try:"},{"line_number":1271,"context_line":"            return QUOTAS.reserve("},{"line_number":1272,"context_line":"                context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"25c63299_7a56aa52","line":1269,"range":{"start_line":1266,"start_character":7,"end_line":1269,"end_character":0},"in_reply_to":"49a1dcf4_53b97321","updated":"2024-06-25 10:37:07.000000000","message":"if we allow to restore max size, and share_size is max, we dont modify quota.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"}],"manila/share/drivers/dell_emc/driver.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":314,"context_line":"                                           share_access_rules,"},{"line_number":315,"context_line":"                                           snapshot_access_rules,"},{"line_number":316,"context_line":"                                           share_server)"},{"line_number":317,"context_line":"            return snapshot.get(\u0027size\u0027)"},{"line_number":318,"context_line":"        else:"},{"line_number":319,"context_line":"            raise NotImplementedError()"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ca5b17e1_de555e05","line":317,"range":{"start_line":317,"start_character":12,"end_line":317,"end_character":39},"updated":"2024-08-23 18:55:58.000000000","message":"why are you editing each driver interface? \n\nThe return value is optional in the share manager. If there\u0027s nothing returned, please consider that there was no size update necessary.","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"4ff6ffcee6155c057aabefb8e30940453c059868","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                                           share_access_rules,"},{"line_number":315,"context_line":"                                           snapshot_access_rules,"},{"line_number":316,"context_line":"                                           share_server)"},{"line_number":317,"context_line":"            return snapshot.get(\u0027size\u0027)"},{"line_number":318,"context_line":"        else:"},{"line_number":319,"context_line":"            raise NotImplementedError()"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"665b9baa_50545918","line":317,"range":{"start_line":317,"start_character":12,"end_line":317,"end_character":39},"in_reply_to":"1d1d34c4_ed0258f3","updated":"2024-08-29 04:25:01.000000000","message":"yes, DELL driver is not modified, only NetApp is modified.","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"1effd8d74d87a54dd06076970bd680de11946bfc","unresolved":true,"context_lines":[{"line_number":314,"context_line":"                                           share_access_rules,"},{"line_number":315,"context_line":"                                           snapshot_access_rules,"},{"line_number":316,"context_line":"                                           share_server)"},{"line_number":317,"context_line":"            return snapshot.get(\u0027size\u0027)"},{"line_number":318,"context_line":"        else:"},{"line_number":319,"context_line":"            raise NotImplementedError()"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"a43b4d02_bee173fa","line":317,"range":{"start_line":317,"start_character":12,"end_line":317,"end_character":39},"in_reply_to":"8d9f591d_b4f50c54","updated":"2024-08-27 12:43:23.000000000","message":"On the other hand: the drivers that are written in a way that they are returning something currently should be checked and adjusted.\n\nI had a brief look and dell_emc unity driver seems to return something.","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"6edf0e40924cfabcb9e33ae0786ab06692a8c5a6","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                                           share_access_rules,"},{"line_number":315,"context_line":"                                           snapshot_access_rules,"},{"line_number":316,"context_line":"                                           share_server)"},{"line_number":317,"context_line":"            return snapshot.get(\u0027size\u0027)"},{"line_number":318,"context_line":"        else:"},{"line_number":319,"context_line":"            raise NotImplementedError()"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"e4ab3d64_6ad18a0c","line":317,"range":{"start_line":317,"start_character":12,"end_line":317,"end_character":39},"in_reply_to":"a43b4d02_bee173fa","updated":"2024-08-27 13:30:24.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                                           share_access_rules,"},{"line_number":315,"context_line":"                                           snapshot_access_rules,"},{"line_number":316,"context_line":"                                           share_server)"},{"line_number":317,"context_line":"            return snapshot.get(\u0027size\u0027)"},{"line_number":318,"context_line":"        else:"},{"line_number":319,"context_line":"            raise NotImplementedError()"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"8d9f591d_b4f50c54","line":317,"range":{"start_line":317,"start_character":12,"end_line":317,"end_character":39},"in_reply_to":"ca5b17e1_de555e05","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"2d4191bb9f985ed22e898ee35ece0042c461f1eb","unresolved":true,"context_lines":[{"line_number":314,"context_line":"                                           share_access_rules,"},{"line_number":315,"context_line":"                                           snapshot_access_rules,"},{"line_number":316,"context_line":"                                           share_server)"},{"line_number":317,"context_line":"            return snapshot.get(\u0027size\u0027)"},{"line_number":318,"context_line":"        else:"},{"line_number":319,"context_line":"            raise NotImplementedError()"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1d1d34c4_ed0258f3","line":317,"range":{"start_line":317,"start_character":12,"end_line":317,"end_character":39},"in_reply_to":"e4ab3d64_6ad18a0c","updated":"2024-08-28 21:00:49.000000000","message":"We can\u0027t be sure what they\u0027re returning.. i can\u0027t understand it just by looking at the code: \n\nhttps://opendev.org/openstack/manila/src/commit/2d987cf5859d9db72827b810c2fc3006743d9c1c/manila/share/drivers/dell_emc/plugins/unity/connection.py#L917\nhttps://opendev.org/openstack/manila/src/commit/2d987cf5859d9db72827b810c2fc3006743d9c1c/manila/share/drivers/dell_emc/plugins/unity/client.py#L344-L346\n\nIn the unit tests, they\u0027re faking the return value to be a boolean\n\nIf they\u0027re indeed returning a boolean or a string and the manager expects an integer/number, we need to add more handling for it; why not leave these drivers unmodified, just to be safe. \n\nIf Dell EMC has a similar concern as NetApp, they\u0027ll propose a change to fix their respective driver/s","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"2d4191bb9f985ed22e898ee35ece0042c461f1eb","unresolved":true,"context_lines":[{"line_number":310,"context_line":"    def revert_to_snapshot(self, context, snapshot, share_access_rules,"},{"line_number":311,"context_line":"                           snapshot_access_rules, share_server\u003dNone):"},{"line_number":312,"context_line":"        if self.revert_to_snap_support:"},{"line_number":313,"context_line":"            return self.plugin.revert_to_snapshot(context, snapshot,"},{"line_number":314,"context_line":"                                                  share_access_rules,"},{"line_number":315,"context_line":"                                                  snapshot_access_rules,"},{"line_number":316,"context_line":"                                                  share_server)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3350bfd9_b5969778","line":313,"range":{"start_line":313,"start_character":12,"end_line":313,"end_character":18},"updated":"2024-08-28 21:00:49.000000000","message":"Please see https://review.opendev.org/c/openstack/manila/+/920382/comment/ca5b17e1_de555e05/","commit_id":"ba5d63de90f45fee9b1953db29e47270a33da74a"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"4ff6ffcee6155c057aabefb8e30940453c059868","unresolved":false,"context_lines":[{"line_number":310,"context_line":"    def revert_to_snapshot(self, context, snapshot, share_access_rules,"},{"line_number":311,"context_line":"                           snapshot_access_rules, share_server\u003dNone):"},{"line_number":312,"context_line":"        if self.revert_to_snap_support:"},{"line_number":313,"context_line":"            return self.plugin.revert_to_snapshot(context, snapshot,"},{"line_number":314,"context_line":"                                                  share_access_rules,"},{"line_number":315,"context_line":"                                                  snapshot_access_rules,"},{"line_number":316,"context_line":"                                                  share_server)"}],"source_content_type":"text/x-python","patch_set":13,"id":"8316ce18_ac42dfa5","line":313,"range":{"start_line":313,"start_character":12,"end_line":313,"end_character":18},"in_reply_to":"3350bfd9_b5969778","updated":"2024-08-29 04:25:01.000000000","message":"Acknowledged","commit_id":"ba5d63de90f45fee9b1953db29e47270a33da74a"}],"manila/share/drivers/dell_emc/plugins/powerstore/connection.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":461,"context_line":"        else:"},{"line_number":462,"context_line":"            LOG.info(\"Snapshot %(snapshot)s successfully restored.\","},{"line_number":463,"context_line":"                     {\u0027snapshot\u0027: snapshot_name})"},{"line_number":464,"context_line":"            return snapshot[\u0027size\u0027]"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    def create_share_from_snapshot(self, context, share, snapshot,"},{"line_number":467,"context_line":"                                   share_server\u003dNone, parent_share\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"a037946f_7b19bb64","line":464,"updated":"2024-08-23 18:55:58.000000000","message":"nope; please don\u0027t modify these drivers..","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        else:"},{"line_number":462,"context_line":"            LOG.info(\"Snapshot %(snapshot)s successfully restored.\","},{"line_number":463,"context_line":"                     {\u0027snapshot\u0027: snapshot_name})"},{"line_number":464,"context_line":"            return snapshot[\u0027size\u0027]"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    def create_share_from_snapshot(self, context, share, snapshot,"},{"line_number":467,"context_line":"                                   share_server\u003dNone, parent_share\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"dd73804c_627285c2","line":464,"in_reply_to":"a037946f_7b19bb64","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"}],"manila/share/drivers/dell_emc/plugins/unity/connection.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":915,"context_line":"        \"\"\"Reverts a share (in place) to the specified snapshot.\"\"\""},{"line_number":916,"context_line":"        snapshot_id \u003d unity_utils.get_snapshot_id(snapshot)"},{"line_number":917,"context_line":"        self.client.restore_snapshot(snapshot_id)"},{"line_number":918,"context_line":"        return snapshot[\u0027size\u0027]"},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"    def get_default_filter_function(self):"},{"line_number":921,"context_line":"        if self.report_default_filter_function:"}],"source_content_type":"text/x-python","patch_set":8,"id":"89bf4b5c_305f1a48","line":918,"range":{"start_line":918,"start_character":0,"end_line":918,"end_character":31},"updated":"2024-08-23 18:55:58.000000000","message":"same","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":915,"context_line":"        \"\"\"Reverts a share (in place) to the specified snapshot.\"\"\""},{"line_number":916,"context_line":"        snapshot_id \u003d unity_utils.get_snapshot_id(snapshot)"},{"line_number":917,"context_line":"        self.client.restore_snapshot(snapshot_id)"},{"line_number":918,"context_line":"        return snapshot[\u0027size\u0027]"},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"    def get_default_filter_function(self):"},{"line_number":921,"context_line":"        if self.report_default_filter_function:"}],"source_content_type":"text/x-python","patch_set":8,"id":"2c49409a_d5c70309","line":918,"range":{"start_line":918,"start_character":0,"end_line":918,"end_character":31},"in_reply_to":"89bf4b5c_305f1a48","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"}],"manila/share/drivers/hitachi/hnas/driver.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":839,"context_line":"        LOG.info(\"Share %(share)s successfully reverted to snapshot \""},{"line_number":840,"context_line":"                 \"%(snapshot)s.\", {\u0027share\u0027: snapshot[\u0027share_id\u0027],"},{"line_number":841,"context_line":"                                   \u0027snapshot\u0027: snapshot[\u0027id\u0027]})"},{"line_number":842,"context_line":"        return snapshot[\u0027size\u0027]"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def _get_hnas_share_id(self, share_id):"},{"line_number":845,"context_line":"        hnas_id \u003d self.private_storage.get(share_id, \u0027hnas_id\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3674ec8c_06cd6c9a","line":842,"range":{"start_line":842,"start_character":0,"end_line":842,"end_character":31},"updated":"2024-08-23 18:55:58.000000000","message":"same","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":839,"context_line":"        LOG.info(\"Share %(share)s successfully reverted to snapshot \""},{"line_number":840,"context_line":"                 \"%(snapshot)s.\", {\u0027share\u0027: snapshot[\u0027share_id\u0027],"},{"line_number":841,"context_line":"                                   \u0027snapshot\u0027: snapshot[\u0027id\u0027]})"},{"line_number":842,"context_line":"        return snapshot[\u0027size\u0027]"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def _get_hnas_share_id(self, share_id):"},{"line_number":845,"context_line":"        hnas_id \u003d self.private_storage.get(share_id, \u0027hnas_id\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"35379f3c_87c8c821","line":842,"range":{"start_line":842,"start_character":0,"end_line":842,"end_character":31},"in_reply_to":"3674ec8c_06cd6c9a","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"}],"manila/share/drivers/huawei/huawei_nas.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":277,"context_line":"                                       share_access_rules,"},{"line_number":278,"context_line":"                                       snapshot_access_rules,"},{"line_number":279,"context_line":"                                       share_server)"},{"line_number":280,"context_line":"        return snapshot[\u0027size\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"f81fad21_5a2b58e7","line":280,"range":{"start_line":280,"start_character":0,"end_line":280,"end_character":31},"updated":"2024-08-23 18:55:58.000000000","message":"same","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                                       share_access_rules,"},{"line_number":278,"context_line":"                                       snapshot_access_rules,"},{"line_number":279,"context_line":"                                       share_server)"},{"line_number":280,"context_line":"        return snapshot[\u0027size\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"b07d4449_804bebc6","line":280,"range":{"start_line":280,"start_character":0,"end_line":280,"end_character":31},"in_reply_to":"f81fad21_5a2b58e7","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"}],"manila/share/drivers/huawei/v3/connection.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":1861,"context_line":""},{"line_number":1862,"context_line":"        snapshot_id \u003d self.helper._get_snapshot_id(fs_id, snapshot[\u0027id\u0027])"},{"line_number":1863,"context_line":"        self.helper.rollback_snapshot(snapshot_id)"},{"line_number":1864,"context_line":"        return snapshot[\u0027size\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"cc9e1ee8_57b04c0d","line":1864,"range":{"start_line":1864,"start_character":0,"end_line":1864,"end_character":31},"updated":"2024-08-23 18:55:58.000000000","message":"same","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":1861,"context_line":""},{"line_number":1862,"context_line":"        snapshot_id \u003d self.helper._get_snapshot_id(fs_id, snapshot[\u0027id\u0027])"},{"line_number":1863,"context_line":"        self.helper.rollback_snapshot(snapshot_id)"},{"line_number":1864,"context_line":"        return snapshot[\u0027size\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff134e14_977d98ba","line":1864,"range":{"start_line":1864,"start_character":0,"end_line":1864,"end_character":31},"in_reply_to":"cc9e1ee8_57b04c0d","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"}],"manila/share/drivers/infinidat/infinibox.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":559,"context_line":"        infinidat_parent_share \u003d self._get_infinidat_filesystem("},{"line_number":560,"context_line":"            snapshot[\u0027share\u0027])"},{"line_number":561,"context_line":"        infinidat_parent_share.restore(infinidat_snapshot)"},{"line_number":562,"context_line":"        return snapshot[\u0027size\u0027]"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    def extend_share(self, share, new_size, share_server\u003dNone):"},{"line_number":565,"context_line":"        infinidat_filesystem \u003d self._get_infinidat_filesystem(share)"}],"source_content_type":"text/x-python","patch_set":8,"id":"691ce5e3_63497ee7","line":562,"range":{"start_line":562,"start_character":0,"end_line":562,"end_character":31},"updated":"2024-08-23 18:55:58.000000000","message":"same","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":559,"context_line":"        infinidat_parent_share \u003d self._get_infinidat_filesystem("},{"line_number":560,"context_line":"            snapshot[\u0027share\u0027])"},{"line_number":561,"context_line":"        infinidat_parent_share.restore(infinidat_snapshot)"},{"line_number":562,"context_line":"        return snapshot[\u0027size\u0027]"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    def extend_share(self, share, new_size, share_server\u003dNone):"},{"line_number":565,"context_line":"        infinidat_filesystem \u003d self._get_infinidat_filesystem(share)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ce2e4838_dddadac0","line":562,"range":{"start_line":562,"start_character":0,"end_line":562,"end_character":31},"in_reply_to":"691ce5e3_63497ee7","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"}],"manila/share/drivers/lvm.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":489,"context_line":"                                              snapshot_export_location,"},{"line_number":490,"context_line":"                                              snapshot_access_rules,"},{"line_number":491,"context_line":"                                              [], [])"},{"line_number":492,"context_line":"        return snapshot[\u0027share\u0027][\u0027size\u0027]"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"    def create_snapshot(self, context, snapshot, share_server\u003dNone):"},{"line_number":495,"context_line":"        self._create_snapshot(context, snapshot)"}],"source_content_type":"text/x-python","patch_set":8,"id":"6eecd80f_66083c8a","line":492,"range":{"start_line":492,"start_character":0,"end_line":492,"end_character":40},"updated":"2024-08-23 18:55:58.000000000","message":"same","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":489,"context_line":"                                              snapshot_export_location,"},{"line_number":490,"context_line":"                                              snapshot_access_rules,"},{"line_number":491,"context_line":"                                              [], [])"},{"line_number":492,"context_line":"        return snapshot[\u0027share\u0027][\u0027size\u0027]"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"    def create_snapshot(self, context, snapshot, share_server\u003dNone):"},{"line_number":495,"context_line":"        self._create_snapshot(context, snapshot)"}],"source_content_type":"text/x-python","patch_set":8,"id":"a2968d70_5ea1a364","line":492,"range":{"start_line":492,"start_character":0,"end_line":492,"end_character":40},"in_reply_to":"6eecd80f_66083c8a","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"}],"manila/share/drivers/nexenta/ns5/nexenta_nas.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":340,"context_line":"        share_path \u003d self._get_dataset_path(snapshot[\u0027share\u0027])"},{"line_number":341,"context_line":"        payload \u003d {\u0027snapshot\u0027: snapshot_path}"},{"line_number":342,"context_line":"        self.nef.filesystems.rollback(share_path, payload)"},{"line_number":343,"context_line":"        return snapshot[\u0027size\u0027]"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def manage_existing(self, share, driver_options):"},{"line_number":346,"context_line":"        \"\"\"Brings an existing share under Manila management."}],"source_content_type":"text/x-python","patch_set":8,"id":"2bd6cce4_12828ad5","line":343,"range":{"start_line":343,"start_character":0,"end_line":343,"end_character":31},"updated":"2024-08-23 18:55:58.000000000","message":"same","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        share_path \u003d self._get_dataset_path(snapshot[\u0027share\u0027])"},{"line_number":341,"context_line":"        payload \u003d {\u0027snapshot\u0027: snapshot_path}"},{"line_number":342,"context_line":"        self.nef.filesystems.rollback(share_path, payload)"},{"line_number":343,"context_line":"        return snapshot[\u0027size\u0027]"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def manage_existing(self, share, driver_options):"},{"line_number":346,"context_line":"        \"\"\"Brings an existing share under Manila management."}],"source_content_type":"text/x-python","patch_set":8,"id":"958dbf28_0ab500b7","line":343,"range":{"start_line":343,"start_character":0,"end_line":343,"end_character":31},"in_reply_to":"2bd6cce4_12828ad5","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"}],"manila/share/drivers/purestorage/flashblade.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":507,"context_line":"                discard_non_snapshotted_data\u003dTrue,"},{"line_number":508,"context_line":"                file_system\u003dfs_attr,"},{"line_number":509,"context_line":"            )"},{"line_number":510,"context_line":"            return snapshot[\u0027size\u0027]"},{"line_number":511,"context_line":"        except purity_fb.rest.ApiException as ex:"},{"line_number":512,"context_line":"            msg \u003d _(\"Failed to revert snapshot: %s\\n\") % ex"},{"line_number":513,"context_line":"            LOG.exception(msg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"eab71f10_8536902f","line":510,"range":{"start_line":510,"start_character":0,"end_line":510,"end_character":35},"updated":"2024-08-23 18:55:58.000000000","message":"same","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":507,"context_line":"                discard_non_snapshotted_data\u003dTrue,"},{"line_number":508,"context_line":"                file_system\u003dfs_attr,"},{"line_number":509,"context_line":"            )"},{"line_number":510,"context_line":"            return snapshot[\u0027size\u0027]"},{"line_number":511,"context_line":"        except purity_fb.rest.ApiException as ex:"},{"line_number":512,"context_line":"            msg \u003d _(\"Failed to revert snapshot: %s\\n\") % ex"},{"line_number":513,"context_line":"            LOG.exception(msg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ef5f3215_c8f0f855","line":510,"range":{"start_line":510,"start_character":0,"end_line":510,"end_character":35},"in_reply_to":"eab71f10_8536902f","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"}],"manila/share/manager.py":[{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"8d8bbf3e8c99155e31a865ab469cc3c615b54ea6","unresolved":true,"context_lines":[{"line_number":3422,"context_line":""},{"line_number":3423,"context_line":"    @add_hooks"},{"line_number":3424,"context_line":"    @utils.require_driver_initialized"},{"line_number":3425,"context_line":"    def is_revert_to_snapshot_by_max_size(self, context):"},{"line_number":3426,"context_line":"        return self.driver.revert_to_snapshot_use_max_size"},{"line_number":3427,"context_line":""},{"line_number":3428,"context_line":"    @add_hooks"}],"source_content_type":"text/x-python","patch_set":4,"id":"1204c9ed_f893674d","line":3425,"updated":"2024-06-24 14:31:33.000000000","message":"This method should take share as second argument","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"603b610a1d9182f4d96d4b391b03a45f9f12b2f6","unresolved":false,"context_lines":[{"line_number":3422,"context_line":""},{"line_number":3423,"context_line":"    @add_hooks"},{"line_number":3424,"context_line":"    @utils.require_driver_initialized"},{"line_number":3425,"context_line":"    def is_revert_to_snapshot_by_max_size(self, context):"},{"line_number":3426,"context_line":"        return self.driver.revert_to_snapshot_use_max_size"},{"line_number":3427,"context_line":""},{"line_number":3428,"context_line":"    @add_hooks"}],"source_content_type":"text/x-python","patch_set":4,"id":"10f3470f_07fd0a68","line":3425,"in_reply_to":"1204c9ed_f893674d","updated":"2024-06-25 10:37:07.000000000","message":"No, rpcapi will consider share to determine host and accordingly call backend driver.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"4e08c66fe37c15fc4132e33ef93beb42c19872bb","unresolved":true,"context_lines":[{"line_number":3507,"context_line":"                share_type_id\u003dshare_type_id,"},{"line_number":3508,"context_line":"            )"},{"line_number":3509,"context_line":""},{"line_number":3510,"context_line":"        values \u003d {\u0027status\u0027: constants.STATUS_AVAILABLE}"},{"line_number":3511,"context_line":"        if self.is_revert_to_snapshot_by_max_size(context):"},{"line_number":3512,"context_line":"            if share[\u0027size\u0027] \u003c snapshot[\u0027size\u0027]:"},{"line_number":3513,"context_line":"                values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"}],"source_content_type":"text/x-python","patch_set":4,"id":"eddc4b6c_1ab0adeb","line":3510,"updated":"2024-06-21 11:22:33.000000000","message":"I went though the bug and I don\u0027t think this is valid bug. I executed few share snapshot workflow and those are working as expected.\n\nscenario-1 \n----------\n1. Create 10 GB share \n2. Create snapshot named \"snap1\" of share\n3. Now restore the snapshot \"snap1\"\n\nExpected:\nSnapshot will be restored and share size will be 10 GB. This is working fine\n\nscenario-2\n----------\n1. Create 10 GB share \n2. Shrink the share to 5GB\n2. Create snapshot named \"snap1\" of share\n3. Now restore the snapshot \"snap1\"\n\nExpected:\nSnapshot will be restored and share size is 5GB, this is working as expected.\n\nscenario-3\n----------\n1. Create 10 GB share\n2. Create snapshot \"snap1\" from share\n3. Shrink share to 5GB\n4. Revert share to snapshot \"snap1\"\n\nExpected:\nAs snapshot will be taken before the shrink when share size is 10gb so when we restore the snapshot \"snap1\" then share size will become 10 GB and even on backend storage it is showing 10 GB.\n\nI think, current workflow is working fine and the issue which is mentioned in bug https://bugs.launchpad.net/manila/+bug/2064502 is not valid. As per bug manila share size still remain 5 GB but I have verify that share size also showing 10 GB (on both manila and backend storage) after snapshot restore. So, I don\u0027t think any fix is require for this bug, please correct me if I am wrong.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"8d8bbf3e8c99155e31a865ab469cc3c615b54ea6","unresolved":true,"context_lines":[{"line_number":3507,"context_line":"                share_type_id\u003dshare_type_id,"},{"line_number":3508,"context_line":"            )"},{"line_number":3509,"context_line":""},{"line_number":3510,"context_line":"        values \u003d {\u0027status\u0027: constants.STATUS_AVAILABLE}"},{"line_number":3511,"context_line":"        if self.is_revert_to_snapshot_by_max_size(context):"},{"line_number":3512,"context_line":"            if share[\u0027size\u0027] \u003c snapshot[\u0027size\u0027]:"},{"line_number":3513,"context_line":"                values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"}],"source_content_type":"text/x-python","patch_set":4,"id":"d5bfaf2f_68679e92","line":3510,"in_reply_to":"59ad0123_ad765cbe","updated":"2024-06-24 14:31:33.000000000","message":"ohh, got it. Thanks","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"e6ad064a515e69491d6347f3e9d1cb3c69500d43","unresolved":false,"context_lines":[{"line_number":3507,"context_line":"                share_type_id\u003dshare_type_id,"},{"line_number":3508,"context_line":"            )"},{"line_number":3509,"context_line":""},{"line_number":3510,"context_line":"        values \u003d {\u0027status\u0027: constants.STATUS_AVAILABLE}"},{"line_number":3511,"context_line":"        if self.is_revert_to_snapshot_by_max_size(context):"},{"line_number":3512,"context_line":"            if share[\u0027size\u0027] \u003c snapshot[\u0027size\u0027]:"},{"line_number":3513,"context_line":"                values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"}],"source_content_type":"text/x-python","patch_set":4,"id":"025ba431_250d7168","line":3510,"in_reply_to":"845953f1_795f060a","updated":"2024-06-27 07:35:01.000000000","message":"No, NetApp driver will keep share to 20 GB. NetApp driver takes whichever is greater.. \nsince here share is 20GB after extension while original snapshot is 10GB, in manila we wrongly assume share of 10GB which is 20GB on backend, so manila also adjust quota to 20GB.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"4fac23eaaf95654fa3c79fc4b5086455352e9b75","unresolved":true,"context_lines":[{"line_number":3507,"context_line":"                share_type_id\u003dshare_type_id,"},{"line_number":3508,"context_line":"            )"},{"line_number":3509,"context_line":""},{"line_number":3510,"context_line":"        values \u003d {\u0027status\u0027: constants.STATUS_AVAILABLE}"},{"line_number":3511,"context_line":"        if self.is_revert_to_snapshot_by_max_size(context):"},{"line_number":3512,"context_line":"            if share[\u0027size\u0027] \u003c snapshot[\u0027size\u0027]:"},{"line_number":3513,"context_line":"                values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"}],"source_content_type":"text/x-python","patch_set":4,"id":"845953f1_795f060a","line":3510,"in_reply_to":"c841e576_9c29a817","updated":"2024-06-26 20:07:37.000000000","message":"So in this case, the netapp driver can shrink the share back to 10 GB?","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"603b610a1d9182f4d96d4b391b03a45f9f12b2f6","unresolved":false,"context_lines":[{"line_number":3507,"context_line":"                share_type_id\u003dshare_type_id,"},{"line_number":3508,"context_line":"            )"},{"line_number":3509,"context_line":""},{"line_number":3510,"context_line":"        values \u003d {\u0027status\u0027: constants.STATUS_AVAILABLE}"},{"line_number":3511,"context_line":"        if self.is_revert_to_snapshot_by_max_size(context):"},{"line_number":3512,"context_line":"            if share[\u0027size\u0027] \u003c snapshot[\u0027size\u0027]:"},{"line_number":3513,"context_line":"                values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"}],"source_content_type":"text/x-python","patch_set":4,"id":"c841e576_9c29a817","line":3510,"in_reply_to":"d5bfaf2f_68679e92","updated":"2024-06-25 10:37:07.000000000","message":"Done","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"f553f6eab2c20ddfe729b5b29bac5452c8b0e8b8","unresolved":true,"context_lines":[{"line_number":3507,"context_line":"                share_type_id\u003dshare_type_id,"},{"line_number":3508,"context_line":"            )"},{"line_number":3509,"context_line":""},{"line_number":3510,"context_line":"        values \u003d {\u0027status\u0027: constants.STATUS_AVAILABLE}"},{"line_number":3511,"context_line":"        if self.is_revert_to_snapshot_by_max_size(context):"},{"line_number":3512,"context_line":"            if share[\u0027size\u0027] \u003c snapshot[\u0027size\u0027]:"},{"line_number":3513,"context_line":"                values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"}],"source_content_type":"text/x-python","patch_set":4,"id":"59ad0123_ad765cbe","line":3510,"in_reply_to":"eddc4b6c_1ab0adeb","updated":"2024-06-21 11:28:24.000000000","message":"Try for\n1. create share 10 GB\n2. Take snapshot\n3. Extend share to 20 GB\n4. restore share to snapshot\n\nManila does restore and changes share size to 10 FB, while share is 20 GB on backend. (i.e. maximum size between share and snapshot is retained)","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"8d8bbf3e8c99155e31a865ab469cc3c615b54ea6","unresolved":true,"context_lines":[{"line_number":3508,"context_line":"            )"},{"line_number":3509,"context_line":""},{"line_number":3510,"context_line":"        values \u003d {\u0027status\u0027: constants.STATUS_AVAILABLE}"},{"line_number":3511,"context_line":"        if self.is_revert_to_snapshot_by_max_size(context):"},{"line_number":3512,"context_line":"            if share[\u0027size\u0027] \u003c snapshot[\u0027size\u0027]:"},{"line_number":3513,"context_line":"                values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"},{"line_number":3514,"context_line":"        else:"},{"line_number":3515,"context_line":"            values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"},{"line_number":3516,"context_line":""},{"line_number":3517,"context_line":"        self.db.share_update(context, share_id, values)"},{"line_number":3518,"context_line":"        self.db.share_snapshot_update("}],"source_content_type":"text/x-python","patch_set":4,"id":"f3b70b5d_ffba59e7","line":3515,"range":{"start_line":3511,"start_character":8,"end_line":3515,"end_character":53},"updated":"2024-06-24 14:31:33.000000000","message":"Instead of if else condition where you are setting the same value you can have only one condition as below.\nif (self.is_revert_to_snapshot_by_max_size(context)\n                and share[\u0027size\u0027] \u003c snapshot[\u0027size\u0027])\\\n                or not self.is_revert_to_snapshot_by_max_size(context):","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"815e353ed8fa039b05d226b1d10ddafccd160d42","unresolved":true,"context_lines":[{"line_number":3508,"context_line":"            )"},{"line_number":3509,"context_line":""},{"line_number":3510,"context_line":"        values \u003d {\u0027status\u0027: constants.STATUS_AVAILABLE}"},{"line_number":3511,"context_line":"        if self.is_revert_to_snapshot_by_max_size(context):"},{"line_number":3512,"context_line":"            if share[\u0027size\u0027] \u003c snapshot[\u0027size\u0027]:"},{"line_number":3513,"context_line":"                values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"},{"line_number":3514,"context_line":"        else:"},{"line_number":3515,"context_line":"            values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"},{"line_number":3516,"context_line":""},{"line_number":3517,"context_line":"        self.db.share_update(context, share_id, values)"},{"line_number":3518,"context_line":"        self.db.share_snapshot_update("}],"source_content_type":"text/x-python","patch_set":4,"id":"9dfc3196_56ba9e14","line":3515,"range":{"start_line":3511,"start_character":8,"end_line":3515,"end_character":53},"in_reply_to":"0f8acc7e_4ff914f1","updated":"2024-08-11 05:04:32.000000000","message":"what do you mean this code is not required ? We need to update share to correct size.\n\nIf share size is smaller, the snapshot size would be size of share after restore. While if share size is larger, the share size remain unchanged after restore. So NetApp takes maximum of either after restore is done. So this code is needed to update correct share size. Previously we were blindly copying snapshot size to share. This was good as long as snapshot \u003e\u003d share size. but if smaller, share size remain unchanged on backend and so frontend should do the same.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"5052a3256ab3f0fd139753da95d0b9a8a377f2df","unresolved":false,"context_lines":[{"line_number":3508,"context_line":"            )"},{"line_number":3509,"context_line":""},{"line_number":3510,"context_line":"        values \u003d {\u0027status\u0027: constants.STATUS_AVAILABLE}"},{"line_number":3511,"context_line":"        if self.is_revert_to_snapshot_by_max_size(context):"},{"line_number":3512,"context_line":"            if share[\u0027size\u0027] \u003c snapshot[\u0027size\u0027]:"},{"line_number":3513,"context_line":"                values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"},{"line_number":3514,"context_line":"        else:"},{"line_number":3515,"context_line":"            values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"},{"line_number":3516,"context_line":""},{"line_number":3517,"context_line":"        self.db.share_update(context, share_id, values)"},{"line_number":3518,"context_line":"        self.db.share_snapshot_update("}],"source_content_type":"text/x-python","patch_set":4,"id":"97fe3e55_4ea77bc3","line":3515,"range":{"start_line":3511,"start_character":8,"end_line":3515,"end_character":53},"in_reply_to":"9dfc3196_56ba9e14","updated":"2024-08-12 16:29:58.000000000","message":"As we discuss this over call, we can not move this code to api as we need to invoke snapshot revert code anyway","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"6cb430a93e41162e4ca2da3d3ac10f605388339c","unresolved":true,"context_lines":[{"line_number":3508,"context_line":"            )"},{"line_number":3509,"context_line":""},{"line_number":3510,"context_line":"        values \u003d {\u0027status\u0027: constants.STATUS_AVAILABLE}"},{"line_number":3511,"context_line":"        if self.is_revert_to_snapshot_by_max_size(context):"},{"line_number":3512,"context_line":"            if share[\u0027size\u0027] \u003c snapshot[\u0027size\u0027]:"},{"line_number":3513,"context_line":"                values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"},{"line_number":3514,"context_line":"        else:"},{"line_number":3515,"context_line":"            values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"},{"line_number":3516,"context_line":""},{"line_number":3517,"context_line":"        self.db.share_update(context, share_id, values)"},{"line_number":3518,"context_line":"        self.db.share_snapshot_update("}],"source_content_type":"text/x-python","patch_set":4,"id":"0f8acc7e_4ff914f1","line":3515,"range":{"start_line":3511,"start_character":8,"end_line":3515,"end_character":53},"in_reply_to":"efd0fd62_b97a9439","updated":"2024-08-10 18:55:57.000000000","message":"In my previous comment as I mentioned that we can return from revert_to_snapshot method if \"share[\u0027size\u0027] \u003e snapshot[\u0027size\u0027]\" condition hit before calling manager code, so this code is not require.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"603b610a1d9182f4d96d4b391b03a45f9f12b2f6","unresolved":false,"context_lines":[{"line_number":3508,"context_line":"            )"},{"line_number":3509,"context_line":""},{"line_number":3510,"context_line":"        values \u003d {\u0027status\u0027: constants.STATUS_AVAILABLE}"},{"line_number":3511,"context_line":"        if self.is_revert_to_snapshot_by_max_size(context):"},{"line_number":3512,"context_line":"            if share[\u0027size\u0027] \u003c snapshot[\u0027size\u0027]:"},{"line_number":3513,"context_line":"                values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"},{"line_number":3514,"context_line":"        else:"},{"line_number":3515,"context_line":"            values.update({\u0027size\u0027: snapshot[\u0027size\u0027]})"},{"line_number":3516,"context_line":""},{"line_number":3517,"context_line":"        self.db.share_update(context, share_id, values)"},{"line_number":3518,"context_line":"        self.db.share_snapshot_update("}],"source_content_type":"text/x-python","patch_set":4,"id":"efd0fd62_b97a9439","line":3515,"range":{"start_line":3511,"start_character":8,"end_line":3515,"end_character":53},"in_reply_to":"f3b70b5d_ffba59e7","updated":"2024-06-25 10:37:07.000000000","message":"I prefer current code as it is for better readability.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":264,"context_line":"class ShareManager(manager.SchedulerDependentManager):"},{"line_number":265,"context_line":"    \"\"\"Manages NAS storages.\"\"\""},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    RPC_API_VERSION \u003d \u00271.29\u0027"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def __init__(self, share_driver\u003dNone, service_name\u003dNone, *args, **kwargs):"},{"line_number":270,"context_line":"        \"\"\"Load the driver from args, or from flags.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"de0c1dd3_7b945dcd","line":267,"range":{"start_line":267,"start_character":0,"end_line":267,"end_character":28},"updated":"2024-08-23 18:55:58.000000000","message":"please see comment in the rpc module; this bump is unnecessary","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":264,"context_line":"class ShareManager(manager.SchedulerDependentManager):"},{"line_number":265,"context_line":"    \"\"\"Manages NAS storages.\"\"\""},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    RPC_API_VERSION \u003d \u00271.29\u0027"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def __init__(self, share_driver\u003dNone, service_name\u003dNone, *args, **kwargs):"},{"line_number":270,"context_line":"        \"\"\"Load the driver from args, or from flags.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"5dabca3e_8e915db4","line":267,"range":{"start_line":267,"start_character":0,"end_line":267,"end_character":28},"in_reply_to":"de0c1dd3_7b945dcd","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":3463,"context_line":"            context, snapshot_instance, snapshot\u003dsnapshot)"},{"line_number":3464,"context_line":""},{"line_number":3465,"context_line":"        try:"},{"line_number":3466,"context_line":"            new_size \u003d self.driver.revert_to_snapshot("},{"line_number":3467,"context_line":"                context,"},{"line_number":3468,"context_line":"                snapshot_instance_dict,"},{"line_number":3469,"context_line":"                share_access_rules,"}],"source_content_type":"text/x-python","patch_set":8,"id":"967dbe51_b53e807c","line":3466,"range":{"start_line":3466,"start_character":12,"end_line":3466,"end_character":20},"updated":"2024-08-23 18:55:58.000000000","message":"\"updated_share_size\"","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":3463,"context_line":"            context, snapshot_instance, snapshot\u003dsnapshot)"},{"line_number":3464,"context_line":""},{"line_number":3465,"context_line":"        try:"},{"line_number":3466,"context_line":"            new_size \u003d self.driver.revert_to_snapshot("},{"line_number":3467,"context_line":"                context,"},{"line_number":3468,"context_line":"                snapshot_instance_dict,"},{"line_number":3469,"context_line":"                share_access_rules,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3abada81_f245e38e","line":3466,"range":{"start_line":3466,"start_character":12,"end_line":3466,"end_character":20},"in_reply_to":"967dbe51_b53e807c","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":3499,"context_line":""},{"line_number":3500,"context_line":"        if not new_size:"},{"line_number":3501,"context_line":"            # fail-safe in case driver returned size is invalid"},{"line_number":3502,"context_line":"            new_size \u003d snapshot[\u0027size\u0027]"},{"line_number":3503,"context_line":""},{"line_number":3504,"context_line":"        if reservations:"},{"line_number":3505,"context_line":"            if new_size \u003d\u003d share[\u0027size\u0027]:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ab95d29d_1ab5a890","line":3502,"range":{"start_line":3502,"start_character":12,"end_line":3502,"end_character":20},"updated":"2024-08-23 18:55:58.000000000","message":"s/new_size/updated_share_size","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":3497,"context_line":"                    resource_id\u003dshare_id,"},{"line_number":3498,"context_line":"                    exception\u003dexcep)"},{"line_number":3499,"context_line":""},{"line_number":3500,"context_line":"        if not new_size:"},{"line_number":3501,"context_line":"            # fail-safe in case driver returned size is invalid"},{"line_number":3502,"context_line":"            new_size \u003d snapshot[\u0027size\u0027]"},{"line_number":3503,"context_line":""},{"line_number":3504,"context_line":"        if reservations:"},{"line_number":3505,"context_line":"            if new_size \u003d\u003d share[\u0027size\u0027]:"}],"source_content_type":"text/x-python","patch_set":8,"id":"c895eed1_80774953","line":3502,"range":{"start_line":3500,"start_character":8,"end_line":3502,"end_character":39},"updated":"2024-08-23 18:55:58.000000000","message":"since you have this; please do not modify any share driver apart from the NetApp driver.","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":3499,"context_line":""},{"line_number":3500,"context_line":"        if not new_size:"},{"line_number":3501,"context_line":"            # fail-safe in case driver returned size is invalid"},{"line_number":3502,"context_line":"            new_size \u003d snapshot[\u0027size\u0027]"},{"line_number":3503,"context_line":""},{"line_number":3504,"context_line":"        if reservations:"},{"line_number":3505,"context_line":"            if new_size \u003d\u003d share[\u0027size\u0027]:"}],"source_content_type":"text/x-python","patch_set":8,"id":"81ce4c8a_3f4f7330","line":3502,"range":{"start_line":3502,"start_character":12,"end_line":3502,"end_character":20},"in_reply_to":"ab95d29d_1ab5a890","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":3497,"context_line":"                    resource_id\u003dshare_id,"},{"line_number":3498,"context_line":"                    exception\u003dexcep)"},{"line_number":3499,"context_line":""},{"line_number":3500,"context_line":"        if not new_size:"},{"line_number":3501,"context_line":"            # fail-safe in case driver returned size is invalid"},{"line_number":3502,"context_line":"            new_size \u003d snapshot[\u0027size\u0027]"},{"line_number":3503,"context_line":""},{"line_number":3504,"context_line":"        if reservations:"},{"line_number":3505,"context_line":"            if new_size \u003d\u003d share[\u0027size\u0027]:"}],"source_content_type":"text/x-python","patch_set":8,"id":"71de722d_2af4adb9","line":3502,"range":{"start_line":3500,"start_character":8,"end_line":3502,"end_character":39},"in_reply_to":"c895eed1_80774953","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":3502,"context_line":"            new_size \u003d snapshot[\u0027size\u0027]"},{"line_number":3503,"context_line":""},{"line_number":3504,"context_line":"        if reservations:"},{"line_number":3505,"context_line":"            if new_size \u003d\u003d share[\u0027size\u0027]:"},{"line_number":3506,"context_line":"                QUOTAS.rollback("},{"line_number":3507,"context_line":"                    context, reservations, project_id\u003dproject_id,"},{"line_number":3508,"context_line":"                    user_id\u003duser_id, share_type_id\u003dshare_type_id,"},{"line_number":3509,"context_line":"                )"},{"line_number":3510,"context_line":"            else:"},{"line_number":3511,"context_line":"                QUOTAS.commit("},{"line_number":3512,"context_line":"                    context, reservations, project_id\u003dproject_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3bdfd907_d29d8342","line":3509,"range":{"start_line":3505,"start_character":12,"end_line":3509,"end_character":17},"updated":"2024-08-23 18:55:58.000000000","message":"what if new_size is greater than share[\u0027size\u0027]?","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":3502,"context_line":"            new_size \u003d snapshot[\u0027size\u0027]"},{"line_number":3503,"context_line":""},{"line_number":3504,"context_line":"        if reservations:"},{"line_number":3505,"context_line":"            if new_size \u003d\u003d share[\u0027size\u0027]:"},{"line_number":3506,"context_line":"                QUOTAS.rollback("},{"line_number":3507,"context_line":"                    context, reservations, project_id\u003dproject_id,"},{"line_number":3508,"context_line":"                    user_id\u003duser_id, share_type_id\u003dshare_type_id,"},{"line_number":3509,"context_line":"                )"},{"line_number":3510,"context_line":"            else:"},{"line_number":3511,"context_line":"                QUOTAS.commit("},{"line_number":3512,"context_line":"                    context, reservations, project_id\u003dproject_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7daf6668_b4c71f67","line":3509,"range":{"start_line":3505,"start_character":12,"end_line":3509,"end_character":17},"in_reply_to":"3bdfd907_d29d8342","updated":"2024-08-26 15:30:57.000000000","message":"if new_size is greater than share[\u0027size\u0027] then it must be snapshot size (since in all drivers except netapp we consider snapshot size as supreme), where else condition will execute and commit the quota.","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"1effd8d74d87a54dd06076970bd680de11946bfc","unresolved":true,"context_lines":[{"line_number":3497,"context_line":"                    resource_id\u003dshare_id,"},{"line_number":3498,"context_line":"                    exception\u003dexcep)"},{"line_number":3499,"context_line":""},{"line_number":3500,"context_line":"        if not updated_share_size:"},{"line_number":3501,"context_line":"            # fail-safe in case driver returned size is invalid"},{"line_number":3502,"context_line":"            updated_share_size \u003d snapshot[\u0027size\u0027]"},{"line_number":3503,"context_line":""},{"line_number":3504,"context_line":"        if reservations:"}],"source_content_type":"text/x-python","patch_set":11,"id":"d572d67d_8bb77c78","line":3501,"range":{"start_line":3500,"start_character":8,"end_line":3501,"end_character":63},"updated":"2024-08-27 12:43:23.000000000","message":"Can we at least make sure, please, that `updated_share_size` is a valid integer if the driver returned something?","commit_id":"b713819a4e91fd6ade83373a85855f0e831b5f9e"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"6edf0e40924cfabcb9e33ae0786ab06692a8c5a6","unresolved":false,"context_lines":[{"line_number":3497,"context_line":"                    resource_id\u003dshare_id,"},{"line_number":3498,"context_line":"                    exception\u003dexcep)"},{"line_number":3499,"context_line":""},{"line_number":3500,"context_line":"        if not updated_share_size:"},{"line_number":3501,"context_line":"            # fail-safe in case driver returned size is invalid"},{"line_number":3502,"context_line":"            updated_share_size \u003d snapshot[\u0027size\u0027]"},{"line_number":3503,"context_line":""},{"line_number":3504,"context_line":"        if reservations:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7b810da4_63971ed2","line":3501,"range":{"start_line":3500,"start_character":8,"end_line":3501,"end_character":63},"in_reply_to":"d572d67d_8bb77c78","updated":"2024-08-27 13:30:24.000000000","message":"Done","commit_id":"b713819a4e91fd6ade83373a85855f0e831b5f9e"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"ce30926f9a5b854aee4383289365a4bfa699f1f5","unresolved":true,"context_lines":[{"line_number":3502,"context_line":"            updated_share_size \u003d snapshot[\u0027size\u0027]"},{"line_number":3503,"context_line":""},{"line_number":3504,"context_line":"        if reservations:"},{"line_number":3505,"context_line":"            if updated_share_size \u003d\u003d share[\u0027size\u0027]:"},{"line_number":3506,"context_line":"                QUOTAS.rollback("},{"line_number":3507,"context_line":"                    context, reservations, project_id\u003dproject_id,"},{"line_number":3508,"context_line":"                    user_id\u003duser_id, share_type_id\u003dshare_type_id,"}],"source_content_type":"text/x-python","patch_set":11,"id":"6745021f_707625ea","line":3505,"range":{"start_line":3505,"start_character":12,"end_line":3505,"end_character":51},"updated":"2024-08-27 13:19:49.000000000","message":"We consider only two options: driver returning updated_share_size \u003d\u003d share_size and updated_share_size \u003d\u003d snapshot_size (the else condition)\nIn all the other cases the quota will be wrong, no?\n\nI know that this is academical/theoretical, but could we maybe write it in the way that we get a warning?\n\ne.g. in pseudo-python:\n\n```\nif updated_share_size \u003d\u003d share[\u0027size\u0027]:\n   quotas.rollback()\nif updated_share_size \u003d\u003d snapshot[\u0027size\u0027]:\n   quotas.commit()\nelse:\n   log.error(f\"driver returned some unexpected size {updated_share_size} on revert to snapshot operation. You need to adjust the quota\")\n```\n\nAnd whenever the first driver intentionally returns some other value, we would know and the more complicated reservations update can be implemented then.","commit_id":"b713819a4e91fd6ade83373a85855f0e831b5f9e"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"7c710cac5552d6b3fba0a198131a463b9546b6ab","unresolved":false,"context_lines":[{"line_number":3502,"context_line":"            updated_share_size \u003d snapshot[\u0027size\u0027]"},{"line_number":3503,"context_line":""},{"line_number":3504,"context_line":"        if reservations:"},{"line_number":3505,"context_line":"            if updated_share_size \u003d\u003d share[\u0027size\u0027]:"},{"line_number":3506,"context_line":"                QUOTAS.rollback("},{"line_number":3507,"context_line":"                    context, reservations, project_id\u003dproject_id,"},{"line_number":3508,"context_line":"                    user_id\u003duser_id, share_type_id\u003dshare_type_id,"}],"source_content_type":"text/x-python","patch_set":11,"id":"a69d6e8a_a6bd3dec","line":3505,"range":{"start_line":3505,"start_character":12,"end_line":3505,"end_character":51},"in_reply_to":"5e92c66b_6c6dfea5","updated":"2024-08-27 16:36:58.000000000","message":"updated, better to handle corner case.","commit_id":"b713819a4e91fd6ade83373a85855f0e831b5f9e"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"6edf0e40924cfabcb9e33ae0786ab06692a8c5a6","unresolved":true,"context_lines":[{"line_number":3502,"context_line":"            updated_share_size \u003d snapshot[\u0027size\u0027]"},{"line_number":3503,"context_line":""},{"line_number":3504,"context_line":"        if reservations:"},{"line_number":3505,"context_line":"            if updated_share_size \u003d\u003d share[\u0027size\u0027]:"},{"line_number":3506,"context_line":"                QUOTAS.rollback("},{"line_number":3507,"context_line":"                    context, reservations, project_id\u003dproject_id,"},{"line_number":3508,"context_line":"                    user_id\u003duser_id, share_type_id\u003dshare_type_id,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5e92c66b_6c6dfea5","line":3505,"range":{"start_line":3505,"start_character":12,"end_line":3505,"end_character":51},"in_reply_to":"6745021f_707625ea","updated":"2024-08-27 13:30:24.000000000","message":"we made sure driver returning None will be having snapshot_size, so I adjusted code for driver returning non-None and non-INT value will also be having snapshot_size. let me know if its fine.","commit_id":"b713819a4e91fd6ade83373a85855f0e831b5f9e"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"2d4191bb9f985ed22e898ee35ece0042c461f1eb","unresolved":true,"context_lines":[{"line_number":3507,"context_line":"                updated_share_size \u003d snapshot[\u0027size\u0027]"},{"line_number":3508,"context_line":""},{"line_number":3509,"context_line":"        if reservations:"},{"line_number":3510,"context_line":"            if updated_share_size \u003d\u003d share[\u0027size\u0027]:"},{"line_number":3511,"context_line":"                QUOTAS.rollback("},{"line_number":3512,"context_line":"                    context, reservations, project_id\u003dproject_id,"},{"line_number":3513,"context_line":"                    user_id\u003duser_id, share_type_id\u003dshare_type_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"8ada8d01_1f5fcd37","line":3510,"range":{"start_line":3510,"start_character":50,"end_line":3510,"end_character":51},"updated":"2024-08-28 21:00:49.000000000","message":"Can you please add a comment below this line?\n\n```\n  # NOTE(kpdev): The driver tells us that the share size wasn\u0027t\n  # modified to the snapshot\u0027s size; so no need to commit quota changes\n```","commit_id":"ba5d63de90f45fee9b1953db29e47270a33da74a"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"4ff6ffcee6155c057aabefb8e30940453c059868","unresolved":false,"context_lines":[{"line_number":3507,"context_line":"                updated_share_size \u003d snapshot[\u0027size\u0027]"},{"line_number":3508,"context_line":""},{"line_number":3509,"context_line":"        if reservations:"},{"line_number":3510,"context_line":"            if updated_share_size \u003d\u003d share[\u0027size\u0027]:"},{"line_number":3511,"context_line":"                QUOTAS.rollback("},{"line_number":3512,"context_line":"                    context, reservations, project_id\u003dproject_id,"},{"line_number":3513,"context_line":"                    user_id\u003duser_id, share_type_id\u003dshare_type_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"c3eca187_76b4636d","line":3510,"range":{"start_line":3510,"start_character":50,"end_line":3510,"end_character":51},"in_reply_to":"8ada8d01_1f5fcd37","updated":"2024-08-29 04:25:01.000000000","message":"Done","commit_id":"ba5d63de90f45fee9b1953db29e47270a33da74a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"2d4191bb9f985ed22e898ee35ece0042c461f1eb","unresolved":true,"context_lines":[{"line_number":3518,"context_line":"                    user_id\u003duser_id, share_type_id\u003dshare_type_id,"},{"line_number":3519,"context_line":"                )"},{"line_number":3520,"context_line":"            else:"},{"line_number":3521,"context_line":"                LOG.error(\"Driver returned some unexpected size %d on revert \""},{"line_number":3522,"context_line":"                          \"to snapshot operation. You need to adjust the \""},{"line_number":3523,"context_line":"                          \"quota\", updated_share_size)"},{"line_number":3524,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"259f1f4d_cd5581c5","line":3521,"range":{"start_line":3521,"start_character":43,"end_line":3521,"end_character":47},"updated":"2024-08-28 21:00:49.000000000","message":"an","commit_id":"ba5d63de90f45fee9b1953db29e47270a33da74a"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"4ff6ffcee6155c057aabefb8e30940453c059868","unresolved":false,"context_lines":[{"line_number":3518,"context_line":"                    user_id\u003duser_id, share_type_id\u003dshare_type_id,"},{"line_number":3519,"context_line":"                )"},{"line_number":3520,"context_line":"            else:"},{"line_number":3521,"context_line":"                LOG.error(\"Driver returned some unexpected size %d on revert \""},{"line_number":3522,"context_line":"                          \"to snapshot operation. You need to adjust the \""},{"line_number":3523,"context_line":"                          \"quota\", updated_share_size)"},{"line_number":3524,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7b08d3a1_a9d24041","line":3521,"range":{"start_line":3521,"start_character":43,"end_line":3521,"end_character":47},"in_reply_to":"259f1f4d_cd5581c5","updated":"2024-08-29 04:25:01.000000000","message":"Done","commit_id":"ba5d63de90f45fee9b1953db29e47270a33da74a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"2d4191bb9f985ed22e898ee35ece0042c461f1eb","unresolved":true,"context_lines":[{"line_number":3520,"context_line":"            else:"},{"line_number":3521,"context_line":"                LOG.error(\"Driver returned some unexpected size %d on revert \""},{"line_number":3522,"context_line":"                          \"to snapshot operation. You need to adjust the \""},{"line_number":3523,"context_line":"                          \"quota\", updated_share_size)"},{"line_number":3524,"context_line":""},{"line_number":3525,"context_line":"        self.db.share_update("},{"line_number":3526,"context_line":"            context, share_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"2228781f_02e9eb0d","line":3523,"range":{"start_line":3523,"start_character":53,"end_line":3523,"end_character":54},"updated":"2024-08-28 21:00:49.000000000","message":"So we\u0027re leaving the reservation behind to expire? Why not clean it up with a roll back?","commit_id":"ba5d63de90f45fee9b1953db29e47270a33da74a"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"4ff6ffcee6155c057aabefb8e30940453c059868","unresolved":false,"context_lines":[{"line_number":3520,"context_line":"            else:"},{"line_number":3521,"context_line":"                LOG.error(\"Driver returned some unexpected size %d on revert \""},{"line_number":3522,"context_line":"                          \"to snapshot operation. You need to adjust the \""},{"line_number":3523,"context_line":"                          \"quota\", updated_share_size)"},{"line_number":3524,"context_line":""},{"line_number":3525,"context_line":"        self.db.share_update("},{"line_number":3526,"context_line":"            context, share_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"b8d819b3_372e13c9","line":3523,"range":{"start_line":3523,"start_character":53,"end_line":3523,"end_character":54},"in_reply_to":"2228781f_02e9eb0d","updated":"2024-08-29 04:25:01.000000000","message":"Done","commit_id":"ba5d63de90f45fee9b1953db29e47270a33da74a"}],"manila/share/rpcapi.py":[{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"560e54056eb60928972fea517c7b076173227319","unresolved":true,"context_lines":[{"line_number":536,"context_line":"    def is_revert_to_snapshot_by_max_size(self, context, share):"},{"line_number":537,"context_line":"        host \u003d utils.extract_host(share[\u0027instance\u0027][\u0027host\u0027])"},{"line_number":538,"context_line":"        call_context \u003d self.client.prepare(server\u003dhost, version\u003d\u00271.28\u0027)"},{"line_number":539,"context_line":"        return call_context.cast(context,"},{"line_number":540,"context_line":"                                 \u0027is_revert_to_snapshot_by_max_size\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"654c31a6_c813a089","line":539,"range":{"start_line":539,"start_character":28,"end_line":539,"end_character":32},"updated":"2024-06-13 15:48:34.000000000","message":"I think this should be a `call`, because it relies on a return value","commit_id":"4e703408ab48e6e8a531d21eb9836a521d195fb4"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8542a87860b6fa109d1e7a3d774e747a6c8daf68","unresolved":false,"context_lines":[{"line_number":536,"context_line":"    def is_revert_to_snapshot_by_max_size(self, context, share):"},{"line_number":537,"context_line":"        host \u003d utils.extract_host(share[\u0027instance\u0027][\u0027host\u0027])"},{"line_number":538,"context_line":"        call_context \u003d self.client.prepare(server\u003dhost, version\u003d\u00271.28\u0027)"},{"line_number":539,"context_line":"        return call_context.cast(context,"},{"line_number":540,"context_line":"                                 \u0027is_revert_to_snapshot_by_max_size\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"31fd9ce7_ffc77648","line":539,"range":{"start_line":539,"start_character":28,"end_line":539,"end_character":32},"in_reply_to":"654c31a6_c813a089","updated":"2024-06-14 09:20:42.000000000","message":"Done","commit_id":"4e703408ab48e6e8a531d21eb9836a521d195fb4"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"0811aeb2eb68337ed78bc30487a2fa99ae447f7b","unresolved":false,"context_lines":[{"line_number":536,"context_line":"    def is_revert_to_snapshot_by_max_size(self, context, share):"},{"line_number":537,"context_line":"        host \u003d utils.extract_host(share[\u0027instance\u0027][\u0027host\u0027])"},{"line_number":538,"context_line":"        call_context \u003d self.client.prepare(server\u003dhost, version\u003d\u00271.28\u0027)"},{"line_number":539,"context_line":"        return call_context.cast(context,"},{"line_number":540,"context_line":"                                 \u0027is_revert_to_snapshot_by_max_size\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ac255bb_a55d6925","line":539,"range":{"start_line":539,"start_character":28,"end_line":539,"end_character":32},"in_reply_to":"654c31a6_c813a089","updated":"2024-06-14 09:53:06.000000000","message":"rebased","commit_id":"4e703408ab48e6e8a531d21eb9836a521d195fb4"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"4fac23eaaf95654fa3c79fc4b5086455352e9b75","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"ffab8f7c_db963ecf","line":541,"range":{"start_line":536,"start_character":1,"end_line":541,"end_character":0},"updated":"2024-06-26 20:07:37.000000000","message":"Adding a \"call\" is bound to be problematic in an async workflow that we currently have for the revert-to-snapshot API. This is because, the API now creates an RPC message, and waits for a consumer to respond to the message and return a value. If the share manager service is down, or is slow to respond, the API waits until a pre-defined timeout. \n\nI was looking at the conversation on the bug again, and the link that Maurice pointed to: https://docs.netapp.com/us-en/ontap-cli-9101//volume-snapshot-restore.html\n\nSpecifically the call out regarding ONTAP\u0027s behavior: \"After the restore is complete, the size of the flexible volume will be set to either the current volume size or the snapshot size - whichever is greater.\"\n\n\nSo, if this is the case; can we ensure, in the netapp driver, that the share size is modified to match the manila quota after the revert operation is complete?","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"86e4129a2e5eada421bac6e81095130a4e5f116b","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"adba4d8b_fbe17910","line":541,"range":{"start_line":536,"start_character":1,"end_line":541,"end_character":0},"in_reply_to":"0ed318e4_b0436e1f","updated":"2024-08-19 16:22:05.000000000","message":"Based on suggestion from Goutham, I have changed revert_to_snapshot call to return volume size. Hope this is ok as I am not sure about changes in non-Netapp driver files.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"4c2aa57115dec839fa92318893e0e379e9b47481","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"0ed318e4_b0436e1f","line":541,"range":{"start_line":536,"start_character":1,"end_line":541,"end_character":0},"in_reply_to":"85f52262_c29a1d50","updated":"2024-08-17 18:03:32.000000000","message":"Yes, Manila should show the same value for share size what ONTAP is showing. So, consistency is require to show the size in Manila and ONTAP.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"6edf0e40924cfabcb9e33ae0786ab06692a8c5a6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"54390666_bb635888","line":541,"range":{"start_line":536,"start_character":1,"end_line":541,"end_character":0},"in_reply_to":"adba4d8b_fbe17910","updated":"2024-08-27 13:30:24.000000000","message":"Done","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"71d89cbd2a84240e192710534f20bcb5ca382fbf","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"85f52262_c29a1d50","line":541,"range":{"start_line":536,"start_character":1,"end_line":541,"end_character":0},"in_reply_to":"b37d47f0_ff66d2ba","updated":"2024-08-13 06:57:29.000000000","message":"While discussion with Gireesh, we realized that driver trying to shrink(adjust size) and then revert snapshot to share will be different behavior compared to what NetApp documentation says. So we should handle the correct size calculation in Manila instead of shrinking share. \n\nwdyt ?","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"aed9c545081ca68e2cd8cd245f2a256fa59a2ee6","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"f1377d9d_4b7bd128","line":541,"range":{"start_line":536,"start_character":1,"end_line":541,"end_character":0},"in_reply_to":"e667a9b3_5afa421a","updated":"2024-06-27 09:04:51.000000000","message":"Doing an internal shrink in the NetApp driver would be difficult, depending on the change rate and the snapshot delta it will not always be possible for all the data to fit into the smaller volume because also the snapshots are part of the NetApp volume (I think that may also be the reason why NetApp behaves that way)\n\nIn addition to the shrink, we would have to implement the non-shrink scenario anyhow then.\nOr just throw errors and put some more work on the admins to fix quota and size mismatches :( \n\nBut: I don\u0027t know how often this would be a problem, maybe this is just a rare edge case after all?","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"b5be8361d6eedccbd5cd1da15fde3bba815c148c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"b37d47f0_ff66d2ba","line":541,"range":{"start_line":536,"start_character":1,"end_line":541,"end_character":0},"in_reply_to":"e8bbfdb8_48437b9f","updated":"2024-07-01 07:36:20.000000000","message":"Sounds fair -  let\u0027s observe how often this is a problem in the real world","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"a414872f3a1af7eb4b3cc9c5b3ace54e1031f033","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"e8bbfdb8_48437b9f","line":541,"range":{"start_line":536,"start_character":1,"end_line":541,"end_character":0},"in_reply_to":"f1377d9d_4b7bd128","updated":"2024-06-28 22:50:55.000000000","message":":/\n\nmaybe the driver can try? and if it fails, it can give up and return the size it wants to apply and adjust the share manager can set the quota accordingly.. \n\nI understand this breaks consistency, but, we can clarify the behavior of the operation in the docs:\n\n```\nWhen reverting a share from a snapshot that is smaller or bigger\nthan the share, the size of the share may not match the size of\nthe snapshot if the service is unable to resize the share at \nthat time. Users can resize the share appropriately if necessary.\n```","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"e6ad064a515e69491d6347f3e9d1cb3c69500d43","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"e667a9b3_5afa421a","line":541,"range":{"start_line":536,"start_character":1,"end_line":541,"end_character":0},"in_reply_to":"ffab8f7c_db963ecf","updated":"2024-06-27 07:35:01.000000000","message":"since we know share size is modified to greater value, we just need to match the manila quota. Why do you want to do other way ? .. \n\nthe backend has already made restoration and updated share to greater value.","commit_id":"4f2d3a50bb79981a2285c175f279fe34ea2db9b8"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":89,"context_line":"            restore_backup() methods"},{"line_number":90,"context_line":"        1.27 - Update delete_share_instance() and delete_snapshot() methods"},{"line_number":91,"context_line":"        1.28 - Add update_share_from_metadata() method"},{"line_number":92,"context_line":"        1.29 - Update revert_to_snapshot()"},{"line_number":93,"context_line":"    \"\"\""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"57610ff4_8db8d860","line":92,"range":{"start_line":92,"start_character":0,"end_line":92,"end_character":42},"updated":"2024-08-23 18:55:58.000000000","message":"There are no changes necessary to the rpcapi anymore.. can you please revert all these changed","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            restore_backup() methods"},{"line_number":90,"context_line":"        1.27 - Update delete_share_instance() and delete_snapshot() methods"},{"line_number":91,"context_line":"        1.28 - Add update_share_from_metadata() method"},{"line_number":92,"context_line":"        1.29 - Update revert_to_snapshot()"},{"line_number":93,"context_line":"    \"\"\""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"e8b5a948_196320b6","line":92,"range":{"start_line":92,"start_character":0,"end_line":92,"end_character":42},"in_reply_to":"57610ff4_8db8d860","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"1effd8d74d87a54dd06076970bd680de11946bfc","unresolved":true,"context_lines":[{"line_number":160,"context_line":"    def revert_to_snapshot(self, context, share, snapshot, host, reservations):"},{"line_number":161,"context_line":"        host \u003d utils.extract_host(host)"},{"line_number":162,"context_line":"        call_context \u003d self.client.prepare(server\u003dhost, version\u003d\u00271.18\u0027)"},{"line_number":163,"context_line":"        return call_context.cast("},{"line_number":164,"context_line":"            context,"},{"line_number":165,"context_line":"            \u0027revert_to_snapshot\u0027,"},{"line_number":166,"context_line":"            snapshot_id\u003dsnapshot[\u0027id\u0027],"},{"line_number":167,"context_line":"            reservations\u003dreservations)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def delete_share_instance(self, context, share_instance, force\u003dFalse,"},{"line_number":170,"context_line":"                              deferred_delete\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5ca3f08d_eece1772","line":167,"range":{"start_line":163,"start_character":8,"end_line":167,"end_character":38},"updated":"2024-08-27 12:43:23.000000000","message":"I think all manila/share/rpcapi.py changes here can be reverted, the `return` is not needed and the others are then just white-space changes","commit_id":"b713819a4e91fd6ade83373a85855f0e831b5f9e"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"6edf0e40924cfabcb9e33ae0786ab06692a8c5a6","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def revert_to_snapshot(self, context, share, snapshot, host, reservations):"},{"line_number":161,"context_line":"        host \u003d utils.extract_host(host)"},{"line_number":162,"context_line":"        call_context \u003d self.client.prepare(server\u003dhost, version\u003d\u00271.18\u0027)"},{"line_number":163,"context_line":"        return call_context.cast("},{"line_number":164,"context_line":"            context,"},{"line_number":165,"context_line":"            \u0027revert_to_snapshot\u0027,"},{"line_number":166,"context_line":"            snapshot_id\u003dsnapshot[\u0027id\u0027],"},{"line_number":167,"context_line":"            reservations\u003dreservations)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def delete_share_instance(self, context, share_instance, force\u003dFalse,"},{"line_number":170,"context_line":"                              deferred_delete\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":11,"id":"cac7ca7a_76f62e4b","line":167,"range":{"start_line":163,"start_character":8,"end_line":167,"end_character":38},"in_reply_to":"5ca3f08d_eece1772","updated":"2024-08-27 13:30:24.000000000","message":"Done","commit_id":"b713819a4e91fd6ade83373a85855f0e831b5f9e"}],"manila/tests/share/drivers/dummy.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":432,"context_line":"    def revert_to_snapshot(self, context, snapshot, share_access_rules,"},{"line_number":433,"context_line":"                           snapshot_access_rules, share_server\u003dNone):"},{"line_number":434,"context_line":"        \"\"\"Reverts a share (in place) to the specified snapshot.\"\"\""},{"line_number":435,"context_line":"        return snapshot.get(\u0027size\u0027)"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    @slow_me_down"},{"line_number":438,"context_line":"    def extend_share(self, share, new_size, share_server\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"e68b3341_28841afd","line":435,"range":{"start_line":435,"start_character":15,"end_line":435,"end_character":35},"updated":"2024-08-23 18:55:58.000000000","message":"just for testing; maybe return size+1 here so we can test the quota behavior implicitly","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":432,"context_line":"    def revert_to_snapshot(self, context, snapshot, share_access_rules,"},{"line_number":433,"context_line":"                           snapshot_access_rules, share_server\u003dNone):"},{"line_number":434,"context_line":"        \"\"\"Reverts a share (in place) to the specified snapshot.\"\"\""},{"line_number":435,"context_line":"        return snapshot.get(\u0027size\u0027)"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    @slow_me_down"},{"line_number":438,"context_line":"    def extend_share(self, share, new_size, share_server\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"708ece8d_0a47412f","line":435,"range":{"start_line":435,"start_character":15,"end_line":435,"end_character":35},"in_reply_to":"e68b3341_28841afd","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"2d4191bb9f985ed22e898ee35ece0042c461f1eb","unresolved":true,"context_lines":[{"line_number":432,"context_line":"    def revert_to_snapshot(self, context, snapshot, share_access_rules,"},{"line_number":433,"context_line":"                           snapshot_access_rules, share_server\u003dNone):"},{"line_number":434,"context_line":"        \"\"\"Reverts a share (in place) to the specified snapshot.\"\"\""},{"line_number":435,"context_line":"        return snapshot.get(\u0027size\u0027, 0) + 1"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    @slow_me_down"},{"line_number":438,"context_line":"    def extend_share(self, share, new_size, share_server\u003dNone):"}],"source_content_type":"text/x-python","patch_set":13,"id":"dcb8574e_b6a60ae2","line":435,"range":{"start_line":435,"start_character":8,"end_line":435,"end_character":42},"updated":"2024-08-28 21:00:49.000000000","message":"This will cause an error log in the share manager based on your latest code change.. because size+1 isn\u0027t the share\u0027s size nor the snapshot\u0027s size\n\nSo please change this back and we can use unit tests to confirm behavior","commit_id":"ba5d63de90f45fee9b1953db29e47270a33da74a"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"4ff6ffcee6155c057aabefb8e30940453c059868","unresolved":false,"context_lines":[{"line_number":432,"context_line":"    def revert_to_snapshot(self, context, snapshot, share_access_rules,"},{"line_number":433,"context_line":"                           snapshot_access_rules, share_server\u003dNone):"},{"line_number":434,"context_line":"        \"\"\"Reverts a share (in place) to the specified snapshot.\"\"\""},{"line_number":435,"context_line":"        return snapshot.get(\u0027size\u0027, 0) + 1"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    @slow_me_down"},{"line_number":438,"context_line":"    def extend_share(self, share, new_size, share_server\u003dNone):"}],"source_content_type":"text/x-python","patch_set":13,"id":"24a90d37_3cbef3f1","line":435,"range":{"start_line":435,"start_character":8,"end_line":435,"end_character":42},"in_reply_to":"dcb8574e_b6a60ae2","updated":"2024-08-29 04:25:01.000000000","message":"Done","commit_id":"ba5d63de90f45fee9b1953db29e47270a33da74a"}],"manila/tests/share/test_manager.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":7970,"context_line":"        mock_share_snapshot_update \u003d self.mock_object("},{"line_number":7971,"context_line":"            self.share_manager.db, \u0027share_snapshot_update\u0027)"},{"line_number":7972,"context_line":"        mock_driver.revert_to_snapshot.return_value \u003d ("},{"line_number":7973,"context_line":"            5 if revert_return_share_size else 4)"},{"line_number":7974,"context_line":""},{"line_number":7975,"context_line":"        self.share_manager._revert_to_snapshot(self.context, share, snapshot,"},{"line_number":7976,"context_line":"                                               reservations,"}],"source_content_type":"text/x-python","patch_set":8,"id":"0b32f8c3_34670b42","line":7973,"range":{"start_line":7973,"start_character":47,"end_line":7973,"end_character":48},"updated":"2024-08-23 18:55:58.000000000","message":"None","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":7970,"context_line":"        mock_share_snapshot_update \u003d self.mock_object("},{"line_number":7971,"context_line":"            self.share_manager.db, \u0027share_snapshot_update\u0027)"},{"line_number":7972,"context_line":"        mock_driver.revert_to_snapshot.return_value \u003d ("},{"line_number":7973,"context_line":"            5 if revert_return_share_size else 4)"},{"line_number":7974,"context_line":""},{"line_number":7975,"context_line":"        self.share_manager._revert_to_snapshot(self.context, share, snapshot,"},{"line_number":7976,"context_line":"                                               reservations,"}],"source_content_type":"text/x-python","patch_set":8,"id":"10f00e8f_1a258d58","line":7973,"range":{"start_line":7973,"start_character":47,"end_line":7973,"end_character":48},"in_reply_to":"0b32f8c3_34670b42","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"}],"releasenotes/notes/bug-2064502-netapp-fix-revert-to-snapshot-f23ab4dc325b2c42.yaml":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3e6859225b8398af6e738b09e1217e7295472499","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    For NetApp ONTAP driver, share revert to snapshot consider the largest"},{"line_number":5,"context_line":"    size between original share size and snapshot size after revert is done."},{"line_number":6,"context_line":"    Fixed this scenario in Manila. For more details, please check"},{"line_number":7,"context_line":"    Launchpad `bug 2064502 \u003chttps://bugs.launchpad.net/manila/+bug/2064502\u003e`_"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"2170e911_580b61c5","line":7,"range":{"start_line":4,"start_character":4,"end_line":7,"end_character":77},"updated":"2024-08-23 18:55:58.000000000","message":"```suggestion\n    When reverting shares to snapshots that are larger or smaller than\n    the share, some storage systems such as NetApp ONTAP always defer\n    to the larger of the two sizes. Manila\u0027s share manager interface now\n    accounts for this behavior, and adjusts project quotas appropriately.\n    For more details, please check\n    Launchpad `bug 2064502 \u003chttps://bugs.launchpad.net/manila/+bug/2064502\u003e`_\n```","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"8ce2012dbf8898f8a51923f8fd82923e0d688b09","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    For NetApp ONTAP driver, share revert to snapshot consider the largest"},{"line_number":5,"context_line":"    size between original share size and snapshot size after revert is done."},{"line_number":6,"context_line":"    Fixed this scenario in Manila. For more details, please check"},{"line_number":7,"context_line":"    Launchpad `bug 2064502 \u003chttps://bugs.launchpad.net/manila/+bug/2064502\u003e`_"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"5d9378bc_efdc6a06","line":7,"range":{"start_line":4,"start_character":4,"end_line":7,"end_character":77},"in_reply_to":"2170e911_580b61c5","updated":"2024-08-26 15:30:57.000000000","message":"Done","commit_id":"d23d4efd1025efd8346b45f1c4b0a2d6ae58b13c"}]}
