)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"101f3ef3cd8101394ef34096b2613d14a0644c4a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Dai Dang Van \u003cdaikk115@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-06-18 10:57:19 +0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement extend and share features for glusterfs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* implement extend_share function"},{"line_number":10,"context_line":"* implement shrink_share function"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a9d85d2_13add431","line":7,"range":{"start_line":7,"start_character":20,"end_line":7,"end_character":21},"updated":"2016-06-19 01:08:49.000000000","message":"extend and shrink share features?","commit_id":"2e4d35e85cf23f7e86343ad43c9b68af5f59504a"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"e13cbb26950f0a6939da03a19686b7a58c5ebcc5","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Dai Dang Van \u003cdaikk115@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-06-18 10:57:19 +0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement extend and share features for glusterfs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* implement extend_share function"},{"line_number":10,"context_line":"* implement shrink_share function"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a9d85d2_cacb821d","line":7,"range":{"start_line":7,"start_character":20,"end_line":7,"end_character":21},"in_reply_to":"5a9d85d2_13add431","updated":"2016-06-20 02:01:54.000000000","message":"yes.","commit_id":"2e4d35e85cf23f7e86343ad43c9b68af5f59504a"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"101f3ef3cd8101394ef34096b2613d14a0644c4a","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* implement extend_share function"},{"line_number":10,"context_line":"* implement shrink_share function"},{"line_number":11,"context_line":"* change size fake share to 2GB"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I3f69c4ac66900409ec8bf20ea207f782c1b73a29"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a9d85d2_337730d6","line":11,"range":{"start_line":11,"start_character":31,"end_line":11,"end_character":31},"updated":"2016-06-19 01:08:49.000000000","message":"Need to add: \"Implements: blueprint glusterfs-...\"","commit_id":"2e4d35e85cf23f7e86343ad43c9b68af5f59504a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b1e70abac6158b82f65c35ad28af4a9542a6955c","unresolved":false,"context_lines":[{"line_number":9,"context_line":"* create _resize_share() function"},{"line_number":10,"context_line":"* implement extend_share() function on _resize_share() function"},{"line_number":11,"context_line":"* implement shrink_share() function on _resize_share() function"},{"line_number":12,"context_line":"* change size fake share to 2GB"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I3f69c4ac66900409ec8bf20ea207f782c1b73a29"},{"line_number":15,"context_line":"Implements: blueprint resize-glusterfs-share"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3aaa91ec_a8af16e2","line":12,"range":{"start_line":12,"start_character":1,"end_line":12,"end_character":31},"updated":"2016-06-22 00:26:05.000000000","message":"Not necessary. Please use the kwargs to create the share as per your requirement in the unit tests.","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"df736a0937d5607011a3a04181fad8981665f536","unresolved":false,"context_lines":[{"line_number":9,"context_line":"* create _resize_share() function"},{"line_number":10,"context_line":"* implement extend_share() function on _resize_share() function"},{"line_number":11,"context_line":"* implement shrink_share() function on _resize_share() function"},{"line_number":12,"context_line":"* change size fake share to 2GB"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I3f69c4ac66900409ec8bf20ea207f782c1b73a29"},{"line_number":15,"context_line":"Implements: blueprint resize-glusterfs-share"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3aaa91ec_cb96ca93","line":12,"range":{"start_line":12,"start_character":1,"end_line":12,"end_character":31},"in_reply_to":"3aaa91ec_a8af16e2","updated":"2016-06-22 09:44:07.000000000","message":"Ok. I thouhgt other drivers need it, so I changed it.","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"}],"doc/source/devref/share_back_ends_feature_support_mapping.rst":[{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"3acfad83551a357700db0a29e32492ab45fe57ec","unresolved":false,"context_lines":[{"line_number":43,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":44,"context_line":"|               EMC Isilon               |           K           |          \\-           |       M      |      \\-      |            K           |              K             |            \\-            |"},{"line_number":45,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":46,"context_line":"|            Red Hat GlusterFS           |           J           |          \\-           |      M       |      M       |  volume layout (L)     |  volume layout (L)         |            \\-            |"},{"line_number":47,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":48,"context_line":"|        Red Hat GlusterFS-Native        |           J           |          \\-           |      \\-      |      \\-      |            K           |              L             |            \\-            |"},{"line_number":49,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5a9d85d2_f82a8a7d","line":46,"range":{"start_line":46,"start_character":95,"end_line":46,"end_character":113},"updated":"2016-06-20 11:47:51.000000000","message":"I am confused, shouldn\u0027t it be \"N\" for Newton?","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b1e70abac6158b82f65c35ad28af4a9542a6955c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":44,"context_line":"|               EMC Isilon               |           K           |          \\-           |       M      |      \\-      |            K           |              K             |            \\-            |"},{"line_number":45,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":46,"context_line":"|            Red Hat GlusterFS           |           J           |          \\-           |      M       |      M       |  volume layout (L)     |  volume layout (L)         |            \\-            |"},{"line_number":47,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":48,"context_line":"|        Red Hat GlusterFS-Native        |           J           |          \\-           |      \\-      |      \\-      |            K           |              L             |            \\-            |"},{"line_number":49,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3aaa91ec_289b26cb","line":46,"range":{"start_line":46,"start_character":95,"end_line":46,"end_character":113},"in_reply_to":"5a9d85d2_1312d9b4","updated":"2016-06-22 00:26:05.000000000","message":"It would be \"N\" -\u003e Newton release. This change cannot be back ported to Mitaka.","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"9a9d9d33ebcc6f929cf7c8f509fccf9d83faddba","unresolved":false,"context_lines":[{"line_number":43,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":44,"context_line":"|               EMC Isilon               |           K           |          \\-           |       M      |      \\-      |            K           |              K             |            \\-            |"},{"line_number":45,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":46,"context_line":"|            Red Hat GlusterFS           |           J           |          \\-           |      M       |      M       |  volume layout (L)     |  volume layout (L)         |            \\-            |"},{"line_number":47,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":48,"context_line":"|        Red Hat GlusterFS-Native        |           J           |          \\-           |      \\-      |      \\-      |            K           |              L             |            \\-            |"},{"line_number":49,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5a9d85d2_1312d9b4","line":46,"range":{"start_line":46,"start_character":95,"end_line":46,"end_character":113},"in_reply_to":"5a9d85d2_f82a8a7d","updated":"2016-06-20 12:38:57.000000000","message":"Yes, I\u0027m proposing a blueprint. So I don\u0027t know what release can these features implement? \nCan you give me an advice?","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"9af73b93334bbd801d789cbd4d179390d3a257be","unresolved":false,"context_lines":[{"line_number":45,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":46,"context_line":"|            Red Hat GlusterFS           |           J           |          \\-           |       N      |      N       |  volume layout (L)     |  volume layout (L)         |            \\-            |"},{"line_number":47,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":48,"context_line":"|        Red Hat GlusterFS-Native        |           J           |          \\-           |      \\-      |      \\-      |            K           |              L             |            \\-            |"},{"line_number":49,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":50,"context_line":"|                  HDFS                  |           K           |          \\-           |       M      |      \\-      |            K           |              K             |            \\-            |"},{"line_number":51,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"}],"source_content_type":"text/x-rst","patch_set":13,"id":"dada55a8_9138c0d4","line":48,"range":{"start_line":48,"start_character":96,"end_line":48,"end_character":114},"updated":"2016-07-21 16:38:11.000000000","message":"In release notes you say that \"native\" driver starts supporting extend and shrink. But here you update glusterfs+nfs driver doc.","commit_id":"dcf07bf71029780e22200e8feec258794fbf81c5"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"ba301ef432cd2cc547abb94ccfd6e6c596529d5a","unresolved":false,"context_lines":[{"line_number":45,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":46,"context_line":"|            Red Hat GlusterFS           |           J           |          \\-           |       N      |      N       |  volume layout (L)     |  volume layout (L)         |            \\-            |"},{"line_number":47,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":48,"context_line":"|        Red Hat GlusterFS-Native        |           J           |          \\-           |      \\-      |      \\-      |            K           |              L             |            \\-            |"},{"line_number":49,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"},{"line_number":50,"context_line":"|                  HDFS                  |           K           |          \\-           |       M      |      \\-      |            K           |              K             |            \\-            |"},{"line_number":51,"context_line":"+----------------------------------------+-----------------------+-----------------------+--------------+--------------+------------------------+----------------------------+--------------------------+"}],"source_content_type":"text/x-rst","patch_set":13,"id":"dada55a8_8b5cb2ee","line":48,"range":{"start_line":48,"start_character":96,"end_line":48,"end_character":114},"in_reply_to":"dada55a8_9138c0d4","updated":"2016-07-23 18:27:44.000000000","message":"Thanks for your reviews. I forgot to fix it.\n\nI have change release notes follow that:\n\nhttps://review.openstack.org/#/c/331389/5/releasenotes/notes/extend-and-shrink-share-in-glusterfs-driver-2bc3eae861e82e67.yaml\n\nBut after that, I realized it is glusterfs+nfs, not \"native\" following here:\n\nhttp://docs.openstack.org/developer/manila/devref/glusterfs_driver.html\n\nTherefore, I think I will change a bit the release notes in next patchset.","commit_id":"dcf07bf71029780e22200e8feec258794fbf81c5"}],"manila/share/drivers/glusterfs/layout_directory.py":[{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"101f3ef3cd8101394ef34096b2613d14a0644c4a","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        raise NotImplementedError"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def extend_share(self, share, new_size, share_server\u003dNone):"},{"line_number":209,"context_line":"        sizestr \u003d six.text_type(new_size) + \u0027GB\u0027"},{"line_number":210,"context_line":"        share_dir \u003d \u0027/\u0027 + share[\u0027name\u0027]"},{"line_number":211,"context_line":"        # change limit quota on the sub-directory/share"},{"line_number":212,"context_line":"        args \u003d (\u0027volume\u0027, \u0027quota\u0027, self.gluster_manager.volume,"},{"line_number":213,"context_line":"                \u0027limit-usage\u0027, share_dir, sizestr)"},{"line_number":214,"context_line":"        try:"},{"line_number":215,"context_line":"            self.gluster_manager.gluster_call(*args)"},{"line_number":216,"context_line":"        except exception.GlusterfsException:"},{"line_number":217,"context_line":"            LOG.error(_LE(\u0027Unable to extend share %s\u0027), share[\u0027name\u0027])"},{"line_number":218,"context_line":"            raise"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        comp_share \u003d self.gluster_manager.components.copy()"},{"line_number":221,"context_line":"        comp_share[\u0027path\u0027] \u003d \u0027/\u0027 + share[\u0027name\u0027]"},{"line_number":222,"context_line":"        export_location \u003d self.driver._setup_via_manager("},{"line_number":223,"context_line":"            {\u0027share\u0027: share,"},{"line_number":224,"context_line":"             \u0027manager\u0027: self._glustermanager(comp_share)})"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        return export_location"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def shrink_share(self, share, new_size, share_server\u003dNone):"},{"line_number":229,"context_line":"        sizestr \u003d six.text_type(new_size) + \u0027GB\u0027"},{"line_number":230,"context_line":"        share_dir \u003d \u0027/\u0027 + share[\u0027name\u0027]"},{"line_number":231,"context_line":"        # change limit quota on the sub-directory/share"},{"line_number":232,"context_line":"        args \u003d (\u0027volume\u0027, \u0027quota\u0027, self.gluster_manager.volume,"},{"line_number":233,"context_line":"                \u0027limit-usage\u0027, share_dir, sizestr)"},{"line_number":234,"context_line":"        try:"},{"line_number":235,"context_line":"            self.gluster_manager.gluster_call(*args)"},{"line_number":236,"context_line":"        except exception.GlusterfsException:"},{"line_number":237,"context_line":"            LOG.error(_LE(\u0027Unable to shrink share %s\u0027), share[\u0027name\u0027])"},{"line_number":238,"context_line":"            raise"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        comp_share \u003d self.gluster_manager.components.copy()"},{"line_number":241,"context_line":"        comp_share[\u0027path\u0027] \u003d \u0027/\u0027 + share[\u0027name\u0027]"},{"line_number":242,"context_line":"        export_location \u003d self.driver._setup_via_manager("},{"line_number":243,"context_line":"            {\u0027share\u0027: share,"},{"line_number":244,"context_line":"             \u0027manager\u0027: self._glustermanager(comp_share)})"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        return export_location"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a9d85d2_d33fccd4","line":246,"range":{"start_line":209,"start_character":8,"end_line":246,"end_character":30},"updated":"2016-06-19 01:08:49.000000000","message":"These two function could be combined to one function.","commit_id":"2e4d35e85cf23f7e86343ad43c9b68af5f59504a"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"e13cbb26950f0a6939da03a19686b7a58c5ebcc5","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        raise NotImplementedError"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def extend_share(self, share, new_size, share_server\u003dNone):"},{"line_number":209,"context_line":"        sizestr \u003d six.text_type(new_size) + \u0027GB\u0027"},{"line_number":210,"context_line":"        share_dir \u003d \u0027/\u0027 + share[\u0027name\u0027]"},{"line_number":211,"context_line":"        # change limit quota on the sub-directory/share"},{"line_number":212,"context_line":"        args \u003d (\u0027volume\u0027, \u0027quota\u0027, self.gluster_manager.volume,"},{"line_number":213,"context_line":"                \u0027limit-usage\u0027, share_dir, sizestr)"},{"line_number":214,"context_line":"        try:"},{"line_number":215,"context_line":"            self.gluster_manager.gluster_call(*args)"},{"line_number":216,"context_line":"        except exception.GlusterfsException:"},{"line_number":217,"context_line":"            LOG.error(_LE(\u0027Unable to extend share %s\u0027), share[\u0027name\u0027])"},{"line_number":218,"context_line":"            raise"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        comp_share \u003d self.gluster_manager.components.copy()"},{"line_number":221,"context_line":"        comp_share[\u0027path\u0027] \u003d \u0027/\u0027 + share[\u0027name\u0027]"},{"line_number":222,"context_line":"        export_location \u003d self.driver._setup_via_manager("},{"line_number":223,"context_line":"            {\u0027share\u0027: share,"},{"line_number":224,"context_line":"             \u0027manager\u0027: self._glustermanager(comp_share)})"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        return export_location"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def shrink_share(self, share, new_size, share_server\u003dNone):"},{"line_number":229,"context_line":"        sizestr \u003d six.text_type(new_size) + \u0027GB\u0027"},{"line_number":230,"context_line":"        share_dir \u003d \u0027/\u0027 + share[\u0027name\u0027]"},{"line_number":231,"context_line":"        # change limit quota on the sub-directory/share"},{"line_number":232,"context_line":"        args \u003d (\u0027volume\u0027, \u0027quota\u0027, self.gluster_manager.volume,"},{"line_number":233,"context_line":"                \u0027limit-usage\u0027, share_dir, sizestr)"},{"line_number":234,"context_line":"        try:"},{"line_number":235,"context_line":"            self.gluster_manager.gluster_call(*args)"},{"line_number":236,"context_line":"        except exception.GlusterfsException:"},{"line_number":237,"context_line":"            LOG.error(_LE(\u0027Unable to shrink share %s\u0027), share[\u0027name\u0027])"},{"line_number":238,"context_line":"            raise"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        comp_share \u003d self.gluster_manager.components.copy()"},{"line_number":241,"context_line":"        comp_share[\u0027path\u0027] \u003d \u0027/\u0027 + share[\u0027name\u0027]"},{"line_number":242,"context_line":"        export_location \u003d self.driver._setup_via_manager("},{"line_number":243,"context_line":"            {\u0027share\u0027: share,"},{"line_number":244,"context_line":"             \u0027manager\u0027: self._glustermanager(comp_share)})"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        return export_location"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a9d85d2_caf2626f","line":246,"range":{"start_line":209,"start_character":8,"end_line":246,"end_character":30},"in_reply_to":"5a9d85d2_d33fccd4","updated":"2016-06-20 02:01:54.000000000","message":"Thanks, I think I will create _resize() function.","commit_id":"2e4d35e85cf23f7e86343ad43c9b68af5f59504a"},{"author":{"_account_id":9521,"name":"Csaba Henk","email":"chenk@redhat.com","username":"chenk"},"change_message_id":"7c921cb357709bbe1db03fae9ae9fa125efb0a3a","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        self.gluster_manager.check_gluster_version("},{"line_number":75,"context_line":"            self.driver.GLUSTERFS_VERSION_MIN)"},{"line_number":76,"context_line":"        self._check_mount_glusterfs()"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # enable quota options of a GlusteFS volume to allow"},{"line_number":79,"context_line":"        # creation of shares of specific size"},{"line_number":80,"context_line":"        args \u003d (\u0027volume\u0027, \u0027quota\u0027, self.gluster_manager.volume, \u0027enable\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_92fde73c","side":"PARENT","line":77,"updated":"2016-06-21 12:46:44.000000000","message":"Here please add a setting for quota-deem-statfs off to make sure that df(1) reports the physical size of the volume.","commit_id":"66976ed508d19c3241e7e8a6e26491a5c42c8897"},{"author":{"_account_id":9521,"name":"Csaba Henk","email":"chenk@redhat.com","username":"chenk"},"change_message_id":"7c921cb357709bbe1db03fae9ae9fa125efb0a3a","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    def _resize_share(self, share, new_size):"},{"line_number":138,"context_line":"        \"\"\"Set a hard limit for share.\"\"\""},{"line_number":139,"context_line":"        sizestr \u003d six.text_type(new_size) + \u0027GB\u0027"},{"line_number":140,"context_line":"        share_dir \u003d \u0027/\u0027 + share[\u0027name\u0027]"},{"line_number":141,"context_line":"        # change limit quota on the sub-directory/share"},{"line_number":142,"context_line":"        args \u003d (\u0027volume\u0027, \u0027quota\u0027, self.gluster_manager.volume,"},{"line_number":143,"context_line":"                \u0027limit-usage\u0027, share_dir, sizestr)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_d5d0f955","line":140,"updated":"2016-06-21 12:46:44.000000000","message":"Please check the volume size by running df(1) on self._get_local_share_path(share), parsing the output. If the new_size exceeds the volume size, err out.","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":9521,"name":"Csaba Henk","email":"chenk@redhat.com","username":"chenk"},"change_message_id":"cff89240095470373d41ad61b9f341f4e3b254b1","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    def _resize_share(self, share, new_size):"},{"line_number":138,"context_line":"        \"\"\"Set a hard limit for share.\"\"\""},{"line_number":139,"context_line":"        sizestr \u003d six.text_type(new_size) + \u0027GB\u0027"},{"line_number":140,"context_line":"        share_dir \u003d \u0027/\u0027 + share[\u0027name\u0027]"},{"line_number":141,"context_line":"        # change limit quota on the sub-directory/share"},{"line_number":142,"context_line":"        args \u003d (\u0027volume\u0027, \u0027quota\u0027, self.gluster_manager.volume,"},{"line_number":143,"context_line":"                \u0027limit-usage\u0027, share_dir, sizestr)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_89c29551","line":140,"in_reply_to":"3aaa91ec_4881524a","updated":"2016-06-29 23:28:37.000000000","message":"The error case I\u0027m referring to is specific to the extension case, while your statement about the manager\u0027s expectation is valid in the shrinking case.\n\nIn the extension case we cannot speak about expectations (as it just passes up the exception from the driver), but at least the code gives a hint what exception to use, which would be then `ShareExtendingError`.","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b1e70abac6158b82f65c35ad28af4a9542a6955c","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    def _resize_share(self, share, new_size):"},{"line_number":138,"context_line":"        \"\"\"Set a hard limit for share.\"\"\""},{"line_number":139,"context_line":"        sizestr \u003d six.text_type(new_size) + \u0027GB\u0027"},{"line_number":140,"context_line":"        share_dir \u003d \u0027/\u0027 + share[\u0027name\u0027]"},{"line_number":141,"context_line":"        # change limit quota on the sub-directory/share"},{"line_number":142,"context_line":"        args \u003d (\u0027volume\u0027, \u0027quota\u0027, self.gluster_manager.volume,"},{"line_number":143,"context_line":"                \u0027limit-usage\u0027, share_dir, sizestr)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_4881524a","line":140,"in_reply_to":"5a9d85d2_d5d0f955","updated":"2016-06-22 00:26:05.000000000","message":"+1\n\nThe manager is expecting the exception \"ShareShrinkingPossibleDataLoss\"","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":9521,"name":"Csaba Henk","email":"chenk@redhat.com","username":"chenk"},"change_message_id":"7c921cb357709bbe1db03fae9ae9fa125efb0a3a","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        try:"},{"line_number":145,"context_line":"            self.gluster_manager.gluster_call(*args)"},{"line_number":146,"context_line":"        except exception.GlusterfsException:"},{"line_number":147,"context_line":"            LOG.error(_LE(\u0027Unable to resize share %s\u0027), share[\u0027name\u0027])"},{"line_number":148,"context_line":"            raise"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        comp_share \u003d self.gluster_manager.components.copy()"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_f529b538","line":147,"updated":"2016-06-21 12:46:44.000000000","message":"Please refine error messages to differentiate between the cases of new_size \u003e volume size and failure of gluster_calls.","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"3acfad83551a357700db0a29e32492ab45fe57ec","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        try:"},{"line_number":145,"context_line":"            self.gluster_manager.gluster_call(*args)"},{"line_number":146,"context_line":"        except exception.GlusterfsException:"},{"line_number":147,"context_line":"            LOG.error(_LE(\u0027Unable to resize share %s\u0027), share[\u0027name\u0027])"},{"line_number":148,"context_line":"            raise"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        comp_share \u003d self.gluster_manager.components.copy()"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_58575e02","line":147,"range":{"start_line":147,"start_character":51,"end_line":147,"end_character":53},"updated":"2016-06-20 11:47:51.000000000","message":"add a period after %s","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"9a9d9d33ebcc6f929cf7c8f509fccf9d83faddba","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        try:"},{"line_number":145,"context_line":"            self.gluster_manager.gluster_call(*args)"},{"line_number":146,"context_line":"        except exception.GlusterfsException:"},{"line_number":147,"context_line":"            LOG.error(_LE(\u0027Unable to resize share %s\u0027), share[\u0027name\u0027])"},{"line_number":148,"context_line":"            raise"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        comp_share \u003d self.gluster_manager.components.copy()"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_cebee4fe","line":147,"range":{"start_line":147,"start_character":51,"end_line":147,"end_character":53},"in_reply_to":"5a9d85d2_58575e02","updated":"2016-06-20 12:38:57.000000000","message":"Sorry, can I ask you a question?\n\nWhy do we need a period after %s. I also see at create_share() function is not have it. So, why do we need it here?","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b1e70abac6158b82f65c35ad28af4a9542a6955c","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            LOG.error(_LE(\u0027Unable to resize share %s\u0027), share[\u0027name\u0027])"},{"line_number":148,"context_line":"            raise"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        comp_share \u003d self.gluster_manager.components.copy()"},{"line_number":151,"context_line":"        comp_share[\u0027path\u0027] \u003d \u0027/\u0027 + share[\u0027name\u0027]"},{"line_number":152,"context_line":"        export_location \u003d self.driver._setup_via_manager("},{"line_number":153,"context_line":"            {\u0027share\u0027: share,"},{"line_number":154,"context_line":"             \u0027manager\u0027: self._glustermanager(comp_share)})"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        return export_location"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def create_share(self, ctx, share, share_server\u003dNone):"},{"line_number":159,"context_line":"        \"\"\"Create a sub-directory/share in the GlusterFS volume.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_e8e75e3e","line":156,"range":{"start_line":150,"start_character":7,"end_line":156,"end_character":30},"updated":"2016-06-22 00:26:05.000000000","message":"Do you expect the export location to change?\n\nThe share manager does not expect drivers to update anything during the extend/shrink calls..","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"87ffe665b8235efe0d28bad0df23ab0ba24ad611","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        return self._resize_share(share, new_size)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def shrink_share(self, share, new_size, share_server\u003dNone):"},{"line_number":234,"context_line":"        \"\"\"Uses resize_share to shrink a share.\"\"\""},{"line_number":235,"context_line":"        return self._resize_share(share, new_size)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_df2bf8e9","line":235,"range":{"start_line":234,"start_character":0,"end_line":235,"end_character":50},"updated":"2016-06-21 12:19:06.000000000","message":"You need to verify if the consumed space is larger than new_size. If it is, you need to raise ShareShrinkingPossibleDataLoss().","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b1e70abac6158b82f65c35ad28af4a9542a6955c","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        return self._resize_share(share, new_size)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def shrink_share(self, share, new_size, share_server\u003dNone):"},{"line_number":234,"context_line":"        \"\"\"Uses resize_share to shrink a share.\"\"\""},{"line_number":235,"context_line":"        return self._resize_share(share, new_size)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_c8b6e23c","line":235,"range":{"start_line":234,"start_character":0,"end_line":235,"end_character":50},"in_reply_to":"5a9d85d2_df2bf8e9","updated":"2016-06-22 00:26:05.000000000","message":"+1","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"396e1333f7532139c151bcc354e47c4ec800afb7","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            else:"},{"line_number":232,"context_line":"                volume_size \u003d int(stdout.split()[8][:-1])"},{"line_number":233,"context_line":"                if new_size \u003e volume_size:"},{"line_number":234,"context_line":"                    msg \u003d \"New size for extending share must be \" \\"},{"line_number":235,"context_line":"                          \"less than or equal volume size which contain share \" \\"},{"line_number":236,"context_line":"                          \"(volume: %(volume_size)s, extended: %(new_size)s).\" \\"},{"line_number":237,"context_line":"                          % {\u0027volume_size\u0027: volume_size, \u0027new_size\u0027: new_size}"},{"line_number":238,"context_line":"                    raise exception.ShareExtendingError(message\u003dmsg)"},{"line_number":239,"context_line":"                else:"},{"line_number":240,"context_line":"                    self._resize_share(share, new_size)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_427d7f6d","line":237,"range":{"start_line":234,"start_character":26,"end_line":237,"end_character":78},"updated":"2016-07-05 03:52:21.000000000","message":"Please use \"( )\" instead of  \"\\\".","commit_id":"d78862f67030b1faeb3848b41f9998de33033964"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"396e1333f7532139c151bcc354e47c4ec800afb7","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                          \"less than or equal volume size which contain share \" \\"},{"line_number":236,"context_line":"                          \"(volume: %(volume_size)s, extended: %(new_size)s).\" \\"},{"line_number":237,"context_line":"                          % {\u0027volume_size\u0027: volume_size, \u0027new_size\u0027: new_size}"},{"line_number":238,"context_line":"                    raise exception.ShareExtendingError(message\u003dmsg)"},{"line_number":239,"context_line":"                else:"},{"line_number":240,"context_line":"                    self._resize_share(share, new_size)"},{"line_number":241,"context_line":"        except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_62919b52","line":238,"range":{"start_line":238,"start_character":36,"end_line":238,"end_character":68},"updated":"2016-07-05 03:52:21.000000000","message":"In link: https://github.com/openstack/manila/blob/master/manila/exception.py#L576\n\nfor example:\nhttps://github.com/openstack/manila/blob/master/manila/share/manager.py#L2532\n\nraise exception.ShareExtendingError(\n                    reason\u003dsix.text_type(e),    \n                    share_id\u003dshare_id)","commit_id":"d78862f67030b1faeb3848b41f9998de33033964"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"b99937db48bbbc85b63e28fef24d3ce9c40d1d6f","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                          \"less than or equal volume size which contain share \" \\"},{"line_number":236,"context_line":"                          \"(volume: %(volume_size)s, extended: %(new_size)s).\" \\"},{"line_number":237,"context_line":"                          % {\u0027volume_size\u0027: volume_size, \u0027new_size\u0027: new_size}"},{"line_number":238,"context_line":"                    raise exception.ShareExtendingError(message\u003dmsg)"},{"line_number":239,"context_line":"                else:"},{"line_number":240,"context_line":"                    self._resize_share(share, new_size)"},{"line_number":241,"context_line":"        except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_f5f37e08","line":238,"range":{"start_line":238,"start_character":36,"end_line":238,"end_character":68},"in_reply_to":"1aa78d24_62919b52","updated":"2016-07-05 07:19:48.000000000","message":"Ok, I think we can make msg as reason.","commit_id":"d78862f67030b1faeb3848b41f9998de33033964"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"5641df8e156cfdb98a436e8ca477474bf22aa2c3","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                          \"less than or equal volume size which contain share \" \\"},{"line_number":236,"context_line":"                          \"(volume: %(volume_size)s, extended: %(new_size)s).\" \\"},{"line_number":237,"context_line":"                          % {\u0027volume_size\u0027: volume_size, \u0027new_size\u0027: new_size}"},{"line_number":238,"context_line":"                    raise exception.ShareExtendingError(message\u003dmsg)"},{"line_number":239,"context_line":"                else:"},{"line_number":240,"context_line":"                    self._resize_share(share, new_size)"},{"line_number":241,"context_line":"        except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_7b6dbd97","line":238,"range":{"start_line":238,"start_character":36,"end_line":238,"end_character":68},"in_reply_to":"1aa78d24_d8eaf7ab","updated":"2016-07-05 08:01:43.000000000","message":"yes, I mean exactly what you said.","commit_id":"d78862f67030b1faeb3848b41f9998de33033964"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"bb22c741d3edc39f04fd42ae9eaa255ac559ff57","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                          \"less than or equal volume size which contain share \" \\"},{"line_number":236,"context_line":"                          \"(volume: %(volume_size)s, extended: %(new_size)s).\" \\"},{"line_number":237,"context_line":"                          % {\u0027volume_size\u0027: volume_size, \u0027new_size\u0027: new_size}"},{"line_number":238,"context_line":"                    raise exception.ShareExtendingError(message\u003dmsg)"},{"line_number":239,"context_line":"                else:"},{"line_number":240,"context_line":"                    self._resize_share(share, new_size)"},{"line_number":241,"context_line":"        except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_d8eaf7ab","line":238,"range":{"start_line":238,"start_character":36,"end_line":238,"end_character":68},"in_reply_to":"1aa78d24_f5f37e08","updated":"2016-07-05 07:42:31.000000000","message":"Hi Dai Dang Van, there is no \u0027message\u0027 parameter in ShareExtendingError. You could change to:\nraise exception.ShareExtendingError(\n                    reason\u003dmsg,    \n                    share_id\u003dshare[\u0027id\u0027])","commit_id":"d78862f67030b1faeb3848b41f9998de33033964"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"396e1333f7532139c151bcc354e47c4ec800afb7","unresolved":false,"context_lines":[{"line_number":240,"context_line":"                    self._resize_share(share, new_size)"},{"line_number":241,"context_line":"        except Exception as exc:"},{"line_number":242,"context_line":"            if isinstance(exc, exception.ShareExtendingError):"},{"line_number":243,"context_line":"                raise exception.ShareExtendingError(exc)"},{"line_number":244,"context_line":"            if isinstance(exc, exception.GlusterfsException):"},{"line_number":245,"context_line":"                raise exception.GlusterfsException(exc)"},{"line_number":246,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_22867313","line":243,"range":{"start_line":243,"start_character":16,"end_line":243,"end_character":56},"updated":"2016-07-05 03:52:21.000000000","message":"above","commit_id":"d78862f67030b1faeb3848b41f9998de33033964"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"396e1333f7532139c151bcc354e47c4ec800afb7","unresolved":false,"context_lines":[{"line_number":261,"context_line":"            else:"},{"line_number":262,"context_line":"                consumed \u003d int(stdout.split()[9][:-1])"},{"line_number":263,"context_line":"                if new_size \u003c consumed:"},{"line_number":264,"context_line":"                    msg \u003d \"New size for shrinking share must be \" \\"},{"line_number":265,"context_line":"                          \"greater than or equal consumed space \" \\"},{"line_number":266,"context_line":"                          \"(consumed space: %(consumed)s, shrinked: %(new_size)s).\" \\"},{"line_number":267,"context_line":"                          % {\u0027consumed\u0027: consumed, \u0027new_size\u0027: new_size}"},{"line_number":268,"context_line":"                    raise exception.ShareShrinkingPossibleDataLoss(message\u003dmsg)"},{"line_number":269,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_a2b54332","line":266,"range":{"start_line":264,"start_character":25,"end_line":266,"end_character":85},"updated":"2016-07-05 03:52:21.000000000","message":"Please use \"( )\" instead of  \"\\\".","commit_id":"d78862f67030b1faeb3848b41f9998de33033964"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"396e1333f7532139c151bcc354e47c4ec800afb7","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                          \"greater than or equal consumed space \" \\"},{"line_number":266,"context_line":"                          \"(consumed space: %(consumed)s, shrinked: %(new_size)s).\" \\"},{"line_number":267,"context_line":"                          % {\u0027consumed\u0027: consumed, \u0027new_size\u0027: new_size}"},{"line_number":268,"context_line":"                    raise exception.ShareShrinkingPossibleDataLoss(message\u003dmsg)"},{"line_number":269,"context_line":"                else:"},{"line_number":270,"context_line":"                    self._resize_share(share, new_size)"},{"line_number":271,"context_line":"        except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_a2a9c37d","line":268,"range":{"start_line":268,"start_character":36,"end_line":268,"end_character":79},"updated":"2016-07-05 03:52:21.000000000","message":"https://github.com/openstack/manila/blob/master/manila/exception.py#L586\n\nraise exception.ShareShrinkingPossibleDataLoss(share_id\u003dshare[\u0027share_id\u0027])","commit_id":"d78862f67030b1faeb3848b41f9998de33033964"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"5641df8e156cfdb98a436e8ca477474bf22aa2c3","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                          \"greater than or equal consumed space \" \\"},{"line_number":266,"context_line":"                          \"(consumed space: %(consumed)s, shrinked: %(new_size)s).\" \\"},{"line_number":267,"context_line":"                          % {\u0027consumed\u0027: consumed, \u0027new_size\u0027: new_size}"},{"line_number":268,"context_line":"                    raise exception.ShareShrinkingPossibleDataLoss(message\u003dmsg)"},{"line_number":269,"context_line":"                else:"},{"line_number":270,"context_line":"                    self._resize_share(share, new_size)"},{"line_number":271,"context_line":"        except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_5b72814a","line":268,"range":{"start_line":268,"start_character":36,"end_line":268,"end_character":79},"in_reply_to":"1aa78d24_350d063f","updated":"2016-07-05 08:01:43.000000000","message":"Ok, I agree with you we can use LOG.error(msg) and ShareShrinkingPossibleDataLoss(share_id\u003dshare_id)\n\nBut, I see message parameter in super class of ShareShrinkingPossibleDataLoss is ManilaException. So when I run code, it\u0027s OK.\n\nIs that right?","commit_id":"d78862f67030b1faeb3848b41f9998de33033964"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"b99937db48bbbc85b63e28fef24d3ce9c40d1d6f","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                          \"greater than or equal consumed space \" \\"},{"line_number":266,"context_line":"                          \"(consumed space: %(consumed)s, shrinked: %(new_size)s).\" \\"},{"line_number":267,"context_line":"                          % {\u0027consumed\u0027: consumed, \u0027new_size\u0027: new_size}"},{"line_number":268,"context_line":"                    raise exception.ShareShrinkingPossibleDataLoss(message\u003dmsg)"},{"line_number":269,"context_line":"                else:"},{"line_number":270,"context_line":"                    self._resize_share(share, new_size)"},{"line_number":271,"context_line":"        except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_d512c208","line":268,"range":{"start_line":268,"start_character":36,"end_line":268,"end_character":79},"in_reply_to":"1aa78d24_a2a9c37d","updated":"2016-07-05 07:19:48.000000000","message":"I just think with above message, user can see how much space is being used in manila-share.log and easier in choice suitable size for shrink.\n\nIf we raise a ShareShrinkingPossibleDataLoss(share_id\u003dshare[\u0027share_id\u0027]), user only know \"possible data loss\"","commit_id":"d78862f67030b1faeb3848b41f9998de33033964"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"c25cdf25fe4e37383fdf7d198eea92739e9828e4","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                          \"greater than or equal consumed space \" \\"},{"line_number":266,"context_line":"                          \"(consumed space: %(consumed)s, shrinked: %(new_size)s).\" \\"},{"line_number":267,"context_line":"                          % {\u0027consumed\u0027: consumed, \u0027new_size\u0027: new_size}"},{"line_number":268,"context_line":"                    raise exception.ShareShrinkingPossibleDataLoss(message\u003dmsg)"},{"line_number":269,"context_line":"                else:"},{"line_number":270,"context_line":"                    self._resize_share(share, new_size)"},{"line_number":271,"context_line":"        except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_350d063f","line":268,"range":{"start_line":268,"start_character":36,"end_line":268,"end_character":79},"in_reply_to":"1aa78d24_d512c208","updated":"2016-07-05 07:36:33.000000000","message":"Hi Dai Dang Van, The problem is the \u0027message\u0027 parameter is not exist in ShareShrinkingPossibleDataLoss, the ShareShrinkingPossibleDataLoss only have one parameter named \u0027share_id\u0027. If you write the code like this:\"exception.ShareShrinkingPossibleDataLoss(message\u003dmsg)\", it will thrown error.\n\nIf you want to show how much space is being used, you could add \"LOG.error(msg)\" before raise.\n\nhttps://github.com/openstack/manila/blob/master/manila/exception.py#L586","commit_id":"d78862f67030b1faeb3848b41f9998de33033964"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"396e1333f7532139c151bcc354e47c4ec800afb7","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                    self._resize_share(share, new_size)"},{"line_number":271,"context_line":"        except Exception as exc:"},{"line_number":272,"context_line":"            if isinstance(exc, exception.ShareShrinkingPossibleDataLoss):"},{"line_number":273,"context_line":"                raise exception.ShareShrinkingPossibleDataLoss(exc)"},{"line_number":274,"context_line":"            if isinstance(exc, exception.GlusterfsException):"},{"line_number":275,"context_line":"                raise exception.GlusterfsException(exc)"},{"line_number":276,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_42b1ffe0","line":273,"range":{"start_line":273,"start_character":32,"end_line":273,"end_character":67},"updated":"2016-07-05 03:52:21.000000000","message":"above","commit_id":"d78862f67030b1faeb3848b41f9998de33033964"},{"author":{"_account_id":19741,"name":"Hieu LE","email":"hieulq2@viettel.com.vn","username":"hieulq"},"change_message_id":"85f8c78e450d5939bc34740ea44de32e111453e2","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class GlusterfsDirectoryMappedLayout(layout.GlusterfsShareLayoutBase):"},{"line_number":48,"context_line":"    "},{"line_number":49,"context_line":"    def __init__(self, driver, *args, **kwargs):"},{"line_number":50,"context_line":"        super(GlusterfsDirectoryMappedLayout, self).__init__("},{"line_number":51,"context_line":"            driver, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1aa78d24_b8337061","line":48,"range":{"start_line":48,"start_character":0,"end_line":48,"end_character":4},"updated":"2016-07-06 06:34:17.000000000","message":"this line is not needed, please run tox -e pep8 before each commit.","commit_id":"1094ac77f13587b6afa7bb938772ab82ff1f8acc"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"729aa45147b27cfd35e784eb99100701f86f8094","unresolved":false,"context_lines":[{"line_number":136,"context_line":"                \u0027free_capacity_gb\u0027: (smpv.f_bavail * smpv.f_frsize) \u003e\u003e 30}"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def _resize_share(self, share, new_size):"},{"line_number":139,"context_line":"        \"\"\"Set a hard limit for share.\"\"\""},{"line_number":140,"context_line":"        sizestr \u003d six.text_type(new_size) + \u0027GB\u0027"},{"line_number":141,"context_line":"        share_dir \u003d \u0027/\u0027 + share[\u0027name\u0027]"},{"line_number":142,"context_line":"        # change limit quota on the sub-directory/share"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_34e5b2a3","line":139,"range":{"start_line":139,"start_character":0,"end_line":139,"end_character":41},"updated":"2016-07-12 10:26:24.000000000","message":"A nit: maybe \"reset\" is better than \"set\" in this context?","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"729aa45147b27cfd35e784eb99100701f86f8094","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        \"\"\"Uses resize_share to extend a share.\"\"\""},{"line_number":224,"context_line":"        local_share_path \u003d self._get_local_share_path(share)"},{"line_number":225,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":226,"context_line":"        try:"},{"line_number":227,"context_line":"            stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":228,"context_line":"            if stderr:"},{"line_number":229,"context_line":"                LOG.error(_LE(\u0027Could not find %s \u0027), local_share_path)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_74de1a6e","line":226,"updated":"2016-07-12 10:26:24.000000000","message":"This try block is huge! Do you really need to pack everything in one try block? If all you need is to explicitly raise some exceptions, then you don\u0027t need try block at all.","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"e16c950daa5523aab1dd7a15bb0ad0c53480f6ce","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        \"\"\"Uses resize_share to extend a share.\"\"\""},{"line_number":224,"context_line":"        local_share_path \u003d self._get_local_share_path(share)"},{"line_number":225,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":226,"context_line":"        try:"},{"line_number":227,"context_line":"            stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":228,"context_line":"            if stderr:"},{"line_number":229,"context_line":"                LOG.error(_LE(\u0027Could not find %s \u0027), local_share_path)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_d4359ba8","line":226,"in_reply_to":"1aa78d24_74de1a6e","updated":"2016-07-15 08:42:58.000000000","message":"thanks for your support, I will change it in next patch set","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"729aa45147b27cfd35e784eb99100701f86f8094","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        try:"},{"line_number":227,"context_line":"            stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":228,"context_line":"            if stderr:"},{"line_number":229,"context_line":"                LOG.error(_LE(\u0027Could not find %s \u0027), local_share_path)"},{"line_number":230,"context_line":"                raise exception.ProcessExecutionError(stderr\u003dstderr)"},{"line_number":231,"context_line":"            else:"},{"line_number":232,"context_line":"                volume_size \u003d int(stdout.split()[8][:-1])"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_946626b9","line":229,"range":{"start_line":229,"start_character":48,"end_line":229,"end_character":49},"updated":"2016-07-12 10:26:24.000000000","message":"A dot is missing.","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"729aa45147b27cfd35e784eb99100701f86f8094","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        try:"},{"line_number":227,"context_line":"            stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":228,"context_line":"            if stderr:"},{"line_number":229,"context_line":"                LOG.error(_LE(\u0027Could not find %s \u0027), local_share_path)"},{"line_number":230,"context_line":"                raise exception.ProcessExecutionError(stderr\u003dstderr)"},{"line_number":231,"context_line":"            else:"},{"line_number":232,"context_line":"                volume_size \u003d int(stdout.split()[8][:-1])"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_79b1f38e","line":229,"updated":"2016-07-12 10:26:24.000000000","message":"For some reason I believe that one can get non-empty stderr in many cases, not only when there is no such path. Which means that this error message is misleading.","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"e16c950daa5523aab1dd7a15bb0ad0c53480f6ce","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        try:"},{"line_number":227,"context_line":"            stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":228,"context_line":"            if stderr:"},{"line_number":229,"context_line":"                LOG.error(_LE(\u0027Could not find %s \u0027), local_share_path)"},{"line_number":230,"context_line":"                raise exception.ProcessExecutionError(stderr\u003dstderr)"},{"line_number":231,"context_line":"            else:"},{"line_number":232,"context_line":"                volume_size \u003d int(stdout.split()[8][:-1])"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_1c051c45","line":229,"in_reply_to":"1aa78d24_79b1f38e","updated":"2016-07-15 08:42:58.000000000","message":"I think we can raise only stderr.","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"729aa45147b27cfd35e784eb99100701f86f8094","unresolved":false,"context_lines":[{"line_number":232,"context_line":"                volume_size \u003d int(stdout.split()[8][:-1])"},{"line_number":233,"context_line":"                if new_size \u003e volume_size:"},{"line_number":234,"context_line":"                    reason \u003d (_(\"New size for extending share must be \""},{"line_number":235,"context_line":"                                \"less than or equal volume size which contain\""},{"line_number":236,"context_line":"                                \"share (volume: %(vol)s, extended: %(new)s).\")"},{"line_number":237,"context_line":"                              % {\u0027vol\u0027: volume_size, \u0027new\u0027: new_size})"},{"line_number":238,"context_line":"                    raise exception.ShareExtendingError("}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_790d733d","line":235,"range":{"start_line":235,"start_character":46,"end_line":235,"end_character":54},"updated":"2016-07-12 10:26:24.000000000","message":"\"equal to\"?","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"729aa45147b27cfd35e784eb99100701f86f8094","unresolved":false,"context_lines":[{"line_number":232,"context_line":"                volume_size \u003d int(stdout.split()[8][:-1])"},{"line_number":233,"context_line":"                if new_size \u003e volume_size:"},{"line_number":234,"context_line":"                    reason \u003d (_(\"New size for extending share must be \""},{"line_number":235,"context_line":"                                \"less than or equal volume size which contain\""},{"line_number":236,"context_line":"                                \"share (volume: %(vol)s, extended: %(new)s).\")"},{"line_number":237,"context_line":"                              % {\u0027vol\u0027: volume_size, \u0027new\u0027: new_size})"},{"line_number":238,"context_line":"                    raise exception.ShareExtendingError("}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_597517c9","line":235,"range":{"start_line":235,"start_character":76,"end_line":235,"end_character":78},"updated":"2016-07-12 10:26:24.000000000","message":"A space is missing? Also, probably \"contains\"?","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"729aa45147b27cfd35e784eb99100701f86f8094","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                        reason\u003dreason, share_id\u003dshare[\u0027id\u0027])"},{"line_number":240,"context_line":"                else:"},{"line_number":241,"context_line":"                    self._resize_share(share, new_size)"},{"line_number":242,"context_line":"        except Exception as exc:"},{"line_number":243,"context_line":"            if isinstance(exc, exception.ShareExtendingError):"},{"line_number":244,"context_line":"                raise exception.ShareExtendingError(exc)"},{"line_number":245,"context_line":"            if isinstance(exc, exception.GlusterfsException):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_b9c51b5d","line":242,"updated":"2016-07-12 10:26:24.000000000","message":"Do you have any reason not to create a separate except clause per expected exception? Separate clauses seem easier to read. Also, why don\u0027t you simply reraise exceptions? In other words, I believe exception handling should probably look like this:\n\ntry:\n  \u003csome code\u003e\nexcept exception.FirstException:\n  \u003cdo something\u003e\n  raise\nexcept exception.SecondException:\n  \u003cdo something different\u003e\n  raise\nexcept Exception as e:\n  \u003cdo something completely different\u003e\n  raise\n\nAlso if all you want to do is to reraise for certain exceptions you could combine them like this:\n\ntry:\n    \u003csome code\u003e\nexcept (exception.FirstException, exception.SecondException):\n    raise\nexcept Exception as e:\n    \u003cdo some handling\u003e","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"729aa45147b27cfd35e784eb99100701f86f8094","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        \"\"\"Uses resize_share to shrink a share.\"\"\""},{"line_number":255,"context_line":"        local_share_path \u003d self._get_local_share_path(share)"},{"line_number":256,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":257,"context_line":"        try:"},{"line_number":258,"context_line":"            stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":259,"context_line":"            if stderr:"},{"line_number":260,"context_line":"                LOG.error(_LE(\u0027Could not find %s \u0027), local_share_path)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_3455b2c1","line":257,"updated":"2016-07-12 10:26:24.000000000","message":"Same question as in extend_share().","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"729aa45147b27cfd35e784eb99100701f86f8094","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        try:"},{"line_number":258,"context_line":"            stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":259,"context_line":"            if stderr:"},{"line_number":260,"context_line":"                LOG.error(_LE(\u0027Could not find %s \u0027), local_share_path)"},{"line_number":261,"context_line":"                raise exception.ProcessExecutionError(stderr\u003dstderr)"},{"line_number":262,"context_line":"            else:"},{"line_number":263,"context_line":"                consumed \u003d int(stdout.split()[9][:-1])"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_b40082ac","line":260,"range":{"start_line":260,"start_character":48,"end_line":260,"end_character":49},"updated":"2016-07-12 10:26:24.000000000","message":"A dot is missing.","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"729aa45147b27cfd35e784eb99100701f86f8094","unresolved":false,"context_lines":[{"line_number":263,"context_line":"                consumed \u003d int(stdout.split()[9][:-1])"},{"line_number":264,"context_line":"                if new_size \u003c consumed:"},{"line_number":265,"context_line":"                    LOG.error(_LE(\"New size for shrinking share must be \""},{"line_number":266,"context_line":"                                  \"greater than or equal consumed space \""},{"line_number":267,"context_line":"                                  \"(consumed: %(cons)s, shrinked: %(new)s).\"),"},{"line_number":268,"context_line":"                              {\u0027cons\u0027: consumed, \u0027new\u0027: new_size})"},{"line_number":269,"context_line":"                    raise exception.ShareShrinkingPossibleDataLoss("}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_7421fa4c","line":266,"range":{"start_line":266,"start_character":51,"end_line":266,"end_character":57},"updated":"2016-07-12 10:26:24.000000000","message":"\"equal to\"?","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"729aa45147b27cfd35e784eb99100701f86f8094","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                        share_id\u003dshare[\u0027id\u0027])"},{"line_number":271,"context_line":"                else:"},{"line_number":272,"context_line":"                    self._resize_share(share, new_size)"},{"line_number":273,"context_line":"        except Exception as exc:"},{"line_number":274,"context_line":"            if isinstance(exc, exception.ShareShrinkingPossibleDataLoss):"},{"line_number":275,"context_line":"                raise exception.ShareShrinkingPossibleDataLoss(exc)"},{"line_number":276,"context_line":"            if isinstance(exc, exception.GlusterfsException):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_39964b3e","line":273,"updated":"2016-07-12 10:26:24.000000000","message":"Same question as at line 242.","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"729aa45147b27cfd35e784eb99100701f86f8094","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                raise exception.GlusterfsException(exc)"},{"line_number":278,"context_line":"            else:"},{"line_number":279,"context_line":"                LOG.error("},{"line_number":280,"context_line":"                    _LE(\u0027Could not use df utility \u0027"},{"line_number":281,"context_line":"                        \u0027to get volume size of share %s\u0027), share[\u0027name\u0027])"},{"line_number":282,"context_line":"                raise exception.ProcessExecutionError(exc)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_74a45aa5","line":280,"range":{"start_line":280,"start_character":25,"end_line":280,"end_character":49},"updated":"2016-07-12 10:26:24.000000000","message":"This one is misleading. You can use it, it just errs for some reason. I would have reworded this.","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"e16c950daa5523aab1dd7a15bb0ad0c53480f6ce","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                raise exception.GlusterfsException(exc)"},{"line_number":278,"context_line":"            else:"},{"line_number":279,"context_line":"                LOG.error("},{"line_number":280,"context_line":"                    _LE(\u0027Could not use df utility \u0027"},{"line_number":281,"context_line":"                        \u0027to get volume size of share %s\u0027), share[\u0027name\u0027])"},{"line_number":282,"context_line":"                raise exception.ProcessExecutionError(exc)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_1408c327","line":280,"range":{"start_line":280,"start_character":25,"end_line":280,"end_character":49},"in_reply_to":"1aa78d24_74a45aa5","updated":"2016-07-15 08:42:58.000000000","message":"To avoid the misleading, I just simply raise only exception","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"729aa45147b27cfd35e784eb99100701f86f8094","unresolved":false,"context_lines":[{"line_number":278,"context_line":"            else:"},{"line_number":279,"context_line":"                LOG.error("},{"line_number":280,"context_line":"                    _LE(\u0027Could not use df utility \u0027"},{"line_number":281,"context_line":"                        \u0027to get volume size of share %s\u0027), share[\u0027name\u0027])"},{"line_number":282,"context_line":"                raise exception.ProcessExecutionError(exc)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1aa78d24_f4a16aaa","line":281,"range":{"start_line":281,"start_character":55,"end_line":281,"end_character":56},"updated":"2016-07-12 10:26:24.000000000","message":"A dot is missing.","commit_id":"43d35bb89e0497c20eac79f19b8e84fd2bf39f50"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"beca07ea17f83477cb9cc3ce58fc1654a7ce8f07","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            if (self.gluster_manager."},{"line_number":86,"context_line":"                    get_vol_option(\u0027features.quota-deem-statfs\u0027)) !\u003d \u0027off\u0027:"},{"line_number":87,"context_line":"                LOG.error(_LE(\"Could not set quota-deem-statfs off \""},{"line_number":88,"context_line":"                              \"for volume %\"), self.gluster_manager.volume)"},{"line_number":89,"context_line":"                raise"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        self._ensure_gluster_vol_mounted()"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_e8e8b8b5","line":88,"range":{"start_line":88,"start_character":41,"end_line":88,"end_character":44},"updated":"2016-07-15 09:52:06.000000000","message":"First, please, add a dot. Second, %s seems to be misspelled.","commit_id":"cd85dc1f1a1f13328e249e6cabc79c0786589e3f"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"326d894113c368bee0188eea0e9461b8feef65e3","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            if (self.gluster_manager."},{"line_number":86,"context_line":"                    get_vol_option(\u0027features.quota-deem-statfs\u0027)) !\u003d \u0027off\u0027:"},{"line_number":87,"context_line":"                LOG.error(_LE(\"Could not set quota-deem-statfs off \""},{"line_number":88,"context_line":"                              \"for volume %\"), self.gluster_manager.volume)"},{"line_number":89,"context_line":"                raise"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        self._ensure_gluster_vol_mounted()"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_dbc93fae","line":88,"range":{"start_line":88,"start_character":41,"end_line":88,"end_character":44},"in_reply_to":"1aa78d24_87c64214","updated":"2016-07-15 12:42:09.000000000","message":"Lack of a dot is not a bug per se, as it does not affect performance, but it affects logs readability a little. % instead of %s simply won\u0027t work.","commit_id":"cd85dc1f1a1f13328e249e6cabc79c0786589e3f"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"c30f80c6c8e32856ff91820db44a76e956d2b4c1","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            if (self.gluster_manager."},{"line_number":86,"context_line":"                    get_vol_option(\u0027features.quota-deem-statfs\u0027)) !\u003d \u0027off\u0027:"},{"line_number":87,"context_line":"                LOG.error(_LE(\"Could not set quota-deem-statfs off \""},{"line_number":88,"context_line":"                              \"for volume %\"), self.gluster_manager.volume)"},{"line_number":89,"context_line":"                raise"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        self._ensure_gluster_vol_mounted()"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_87c64214","line":88,"range":{"start_line":88,"start_character":41,"end_line":88,"end_character":44},"in_reply_to":"1aa78d24_e8e8b8b5","updated":"2016-07-15 10:34:31.000000000","message":"Yes, It is my mistake. \n\nBut I think it is not require.\nFor instance, I see some things like this from: https://github.com/openstack/manila/blob/master/manila/share/drivers/glusterfs/layout_directory.py#L186\n\nBut I think adding a dot is good for our code. Thanks again.","commit_id":"cd85dc1f1a1f13328e249e6cabc79c0786589e3f"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"beca07ea17f83477cb9cc3ce58fc1654a7ce8f07","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        \"\"\"Uses resize_share to extend a share.\"\"\""},{"line_number":224,"context_line":"        local_share_path \u003d self._get_local_share_path(share)"},{"line_number":225,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":226,"context_line":"        try:"},{"line_number":227,"context_line":"            stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":228,"context_line":"            if stderr:"},{"line_number":229,"context_line":"                raise exception.ProcessExecutionError(stderr\u003dstderr)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_c8997cd2","line":226,"updated":"2016-07-15 09:52:06.000000000","message":"Now it is looking much better, but I believe there is a room for improvement. In this try block you actually catch the very same exception you raise explicitly. But since you have already raised it there is no need to reraise! Just raise it outside of a try block! On the other hand any other exception will not be handled which makes this try block a little useless. So my suggestion is to either completely remove this try block or to add exception clauses for other possible exceptions.","commit_id":"cd85dc1f1a1f13328e249e6cabc79c0786589e3f"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"326d894113c368bee0188eea0e9461b8feef65e3","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        \"\"\"Uses resize_share to extend a share.\"\"\""},{"line_number":224,"context_line":"        local_share_path \u003d self._get_local_share_path(share)"},{"line_number":225,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":226,"context_line":"        try:"},{"line_number":227,"context_line":"            stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":228,"context_line":"            if stderr:"},{"line_number":229,"context_line":"                raise exception.ProcessExecutionError(stderr\u003dstderr)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_fbf23b9a","line":226,"in_reply_to":"1aa78d24_c7afaa7b","updated":"2016-07-15 12:42:09.000000000","message":"Ok, let\u0027s put it this way. You call self.driver_execute() and it fails with ProcessExecutionError. What happens? It gets reraised. If it fails with some other exception that other one gets raised because the only exception handled is ProcessExecutionError. Even if volume_size extraction fails for some reason it will not be handled simply because you don\u0027t have a clause for IndexError or for whatever else could go wrong on line 231.\n\nNow if self.driver_execute() succeeds and returns non-empty stderr you raise ProcessExecutionError, catch it and immediately reraise.\n\nWhich leaves us with a single handler for a single exception (namely ProcessExecutionError) which does nothing but reraise, right?\n\nI suggest to rewrite this piece like follows:\n\n  stdout, stderr \u003d self.driver._execute(*cmd)\n  if stderr:\n     raise exception.ProcessExecutionError(stderr\u003dstderr)\n  else:\n     volume_size \u003d int(stdout.split()[8][:-1])\n\nWhat will happen when self.driver._execute() fails with ProcessExecutionError? It will raise this very same exception, just like your code. What will happen when self.driver._execute() fails with some other exception? It will raise this unexpected exception, just like your code. What will happen if stderr is not empty? It will raise ProcessExecutionError, just like your code. What will happen when int(...) fails with some exception? It will get raised -- just like in your code! Am I still missing something?\n\nAnd one time more, there is no way int(stdout.split()[8][:-1]) could raise exception.ProcessExecutionError, unless some heavy builtins and default methods shadowing is taking place. If, however, it is taking place then it should be removed and never ever be introduced again.","commit_id":"cd85dc1f1a1f13328e249e6cabc79c0786589e3f"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"c30f80c6c8e32856ff91820db44a76e956d2b4c1","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        \"\"\"Uses resize_share to extend a share.\"\"\""},{"line_number":224,"context_line":"        local_share_path \u003d self._get_local_share_path(share)"},{"line_number":225,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":226,"context_line":"        try:"},{"line_number":227,"context_line":"            stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":228,"context_line":"            if stderr:"},{"line_number":229,"context_line":"                raise exception.ProcessExecutionError(stderr\u003dstderr)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_c7afaa7b","line":226,"in_reply_to":"1aa78d24_c8997cd2","updated":"2016-07-15 10:34:31.000000000","message":"Actually, in my opinion:\n\n- I used to \"try\" block with ProcessExecutionError because we may be faced with RuntimeError when \"drive._excute\" is called and some errors from \"int(stdout.split()[8][:-1])\" command. Both of them I think we can define as a ProcessExecutionError.\n\n- I must check stderr to raise a ProcessExecutionError because I see _execute implement on Popen and It return stderr if we have any problem with \"cmd\" variable. By this reason, If we only raise a ProcessExecutionError outside \"try\" block, It just raise ProcessExecutionError from \"int(stdout.split()[8][:-1])\" command, not from \"cmd\" variable.","commit_id":"cd85dc1f1a1f13328e249e6cabc79c0786589e3f"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"35b446b691422055bfca2d3d928c3a7d64ca2878","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        \"\"\"Uses resize_share to extend a share.\"\"\""},{"line_number":224,"context_line":"        local_share_path \u003d self._get_local_share_path(share)"},{"line_number":225,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":226,"context_line":"        try:"},{"line_number":227,"context_line":"            stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":228,"context_line":"            if stderr:"},{"line_number":229,"context_line":"                raise exception.ProcessExecutionError(stderr\u003dstderr)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fad55976_7648755c","line":226,"in_reply_to":"1aa78d24_fbf23b9a","updated":"2016-07-15 20:11:29.000000000","message":"Ok, I understood, you\u0027re right. Sorry, I have made some unnecessary things.\nThanks for your suggest.","commit_id":"cd85dc1f1a1f13328e249e6cabc79c0786589e3f"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"beca07ea17f83477cb9cc3ce58fc1654a7ce8f07","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        if new_size \u003e volume_size:"},{"line_number":236,"context_line":"            reason \u003d (_(\"New size for extending share must be \""},{"line_number":237,"context_line":"                        \"less than or equal volume size which contain\""},{"line_number":238,"context_line":"                        \"share (volume: %(vol)s, extended: %(new)s).\")"},{"line_number":239,"context_line":"                      % {\u0027vol\u0027: volume_size, \u0027new\u0027: new_size})"},{"line_number":240,"context_line":"            raise exception.ShareExtendingError("}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_48f8ecc4","line":237,"range":{"start_line":237,"start_character":38,"end_line":237,"end_character":44},"updated":"2016-07-15 09:52:06.000000000","message":"\"to\" is still missing.","commit_id":"cd85dc1f1a1f13328e249e6cabc79c0786589e3f"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"beca07ea17f83477cb9cc3ce58fc1654a7ce8f07","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        if new_size \u003e volume_size:"},{"line_number":236,"context_line":"            reason \u003d (_(\"New size for extending share must be \""},{"line_number":237,"context_line":"                        \"less than or equal volume size which contain\""},{"line_number":238,"context_line":"                        \"share (volume: %(vol)s, extended: %(new)s).\")"},{"line_number":239,"context_line":"                      % {\u0027vol\u0027: volume_size, \u0027new\u0027: new_size})"},{"line_number":240,"context_line":"            raise exception.ShareExtendingError("}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_48710c77","line":237,"range":{"start_line":237,"start_character":68,"end_line":237,"end_character":70},"updated":"2016-07-15 09:52:06.000000000","message":"A space is still missing. \"S\" in \"contains\" is still missing.","commit_id":"cd85dc1f1a1f13328e249e6cabc79c0786589e3f"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"beca07ea17f83477cb9cc3ce58fc1654a7ce8f07","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        \"\"\"Uses resize_share to shrink a share.\"\"\""},{"line_number":247,"context_line":"        local_share_path \u003d self._get_local_share_path(share)"},{"line_number":248,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":249,"context_line":"        try:"},{"line_number":250,"context_line":"            stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":251,"context_line":"            if stderr:"},{"line_number":252,"context_line":"                raise exception.ProcessExecutionError(stderr\u003dstderr)"},{"line_number":253,"context_line":"            else:"},{"line_number":254,"context_line":"                consumed \u003d int(stdout.split()[9][:-1])"},{"line_number":255,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":256,"context_line":"            raise"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"        if new_size \u003c consumed:"},{"line_number":259,"context_line":"            LOG.error(_LE(\"New size for shrinking share must be \""}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_288f602f","line":256,"range":{"start_line":249,"start_character":0,"end_line":256,"end_character":17},"updated":"2016-07-15 09:52:06.000000000","message":"The same concern as in extend_share().","commit_id":"cd85dc1f1a1f13328e249e6cabc79c0786589e3f"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"beca07ea17f83477cb9cc3ce58fc1654a7ce8f07","unresolved":false,"context_lines":[{"line_number":257,"context_line":""},{"line_number":258,"context_line":"        if new_size \u003c consumed:"},{"line_number":259,"context_line":"            LOG.error(_LE(\"New size for shrinking share must be \""},{"line_number":260,"context_line":"                          \"greater than or equal consumed space \""},{"line_number":261,"context_line":"                          \"(consumed: %(cons)s, shrinked: %(new)s).\"),"},{"line_number":262,"context_line":"                      {\u0027cons\u0027: consumed, \u0027new\u0027: new_size})"},{"line_number":263,"context_line":"            raise exception.ShareShrinkingPossibleDataLoss("}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_e8271861","line":260,"range":{"start_line":260,"start_character":43,"end_line":260,"end_character":49},"updated":"2016-07-15 09:52:06.000000000","message":"equal to","commit_id":"cd85dc1f1a1f13328e249e6cabc79c0786589e3f"},{"author":{"_account_id":9521,"name":"Csaba Henk","email":"chenk@redhat.com","username":"chenk"},"change_message_id":"d5f18fd167e2311f0ead937feb9b5f20339f23c7","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # enable quota options of a GlusteFS volume to allow"},{"line_number":79,"context_line":"        # creation of shares of specific size"},{"line_number":80,"context_line":"        args \u003d (\u0027volume\u0027, \u0027quota\u0027, self.gluster_manager.volume, \u0027enable\u0027)"},{"line_number":81,"context_line":"        try:"},{"line_number":82,"context_line":"            self.gluster_manager.gluster_call(*args)"},{"line_number":83,"context_line":"        except exception.GlusterfsException:"}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_8853fc38","side":"PARENT","line":80,"updated":"2016-07-25 12:26:18.000000000","message":"The sad news is that Glusterfs is a mess. Some versions have the \u0027enable\u0027 subcommand of \u0027quota\u0027, some don\u0027t. (This was a news to me too, I realized it when I wondered why you deleted quota enablement -- so I guess that\u0027s why.)\n\nI suggest you the workaround to keep the quota enablement command on a best effort base --  ignore whether succeeds or fails. You can do that by passing\n\n    error_policy\u003d(1,)\n\nto `gluster_call` (which means that exit value 1 will be tolerated).","commit_id":"66976ed508d19c3241e7e8a6e26491a5c42c8897"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"4f7e3b3ba126c88fae29439aaf37f4904e07d4fb","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # enable quota options of a GlusteFS volume to allow"},{"line_number":79,"context_line":"        # creation of shares of specific size"},{"line_number":80,"context_line":"        args \u003d (\u0027volume\u0027, \u0027quota\u0027, self.gluster_manager.volume, \u0027enable\u0027)"},{"line_number":81,"context_line":"        try:"},{"line_number":82,"context_line":"            self.gluster_manager.gluster_call(*args)"},{"line_number":83,"context_line":"        except exception.GlusterfsException:"}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_a104cd14","side":"PARENT","line":80,"in_reply_to":"dada55a8_2172b011","updated":"2016-07-27 07:41:28.000000000","message":"I see your email but I think you got it.\nI agree with you at that we should keep the quota enablement invocation.\nAnd you mean we can use error_policy\u003d(1,) when we call to enable quota.","commit_id":"66976ed508d19c3241e7e8a6e26491a5c42c8897"},{"author":{"_account_id":9521,"name":"Csaba Henk","email":"chenk@redhat.com","username":"chenk"},"change_message_id":"7c64d27aa68cf7578d78bcfd4bdd55ecdc84719a","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # enable quota options of a GlusteFS volume to allow"},{"line_number":79,"context_line":"        # creation of shares of specific size"},{"line_number":80,"context_line":"        args \u003d (\u0027volume\u0027, \u0027quota\u0027, self.gluster_manager.volume, \u0027enable\u0027)"},{"line_number":81,"context_line":"        try:"},{"line_number":82,"context_line":"            self.gluster_manager.gluster_call(*args)"},{"line_number":83,"context_line":"        except exception.GlusterfsException:"}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_2172b011","side":"PARENT","line":80,"in_reply_to":"dada55a8_8853fc38","updated":"2016-07-26 11:34:12.000000000","message":"Sorry, I go back on my opinion that \"Glusterfs is a mess\". Quota enablement should just work. I misunderstood my own misconfiguration when I concluded \"Some versions have the \u0027enable\u0027 subcommand of \u0027quota\u0027, some don\u0027t.\"\n\nSo disregard my advice above and keep the quota enablement invocation. In lack of that, you can see, gluster CI fails with these errors: http://logs.openstack.org/89/331389/14/check/gate-manila-tempest-dsvm-glusterfs/0273fa6/logs/screen-m-shr.txt.gz?level\u003dERROR.","commit_id":"66976ed508d19c3241e7e8a6e26491a5c42c8897"},{"author":{"_account_id":9521,"name":"Csaba Henk","email":"chenk@redhat.com","username":"chenk"},"change_message_id":"b2cf2d134feb6c95cc000623ae405b19c29c465f","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # enable quota options of a GlusteFS volume to allow"},{"line_number":79,"context_line":"        # creation of shares of specific size"},{"line_number":80,"context_line":"        args \u003d (\u0027volume\u0027, \u0027quota\u0027, self.gluster_manager.volume, \u0027enable\u0027)"},{"line_number":81,"context_line":"        try:"},{"line_number":82,"context_line":"            self.gluster_manager.gluster_call(*args)"},{"line_number":83,"context_line":"        except exception.GlusterfsException:"}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_d556b65a","side":"PARENT","line":80,"in_reply_to":"dada55a8_a104cd14","updated":"2016-07-27 11:39:46.000000000","message":"No. The error_policy\u003d(1,) was part of the bogus input I gave you in my first comment. Just do the unadorned gluster_call as it was before.","commit_id":"66976ed508d19c3241e7e8a6e26491a5c42c8897"},{"author":{"_account_id":9521,"name":"Csaba Henk","email":"chenk@redhat.com","username":"chenk"},"change_message_id":"d5f18fd167e2311f0ead937feb9b5f20339f23c7","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                    get_vol_option(\u0027features.quota\u0027)) !\u003d \u0027on\u0027:"},{"line_number":86,"context_line":"                LOG.error(_LE(\"Error in tuning GlusterFS volume to enable \""},{"line_number":87,"context_line":"                              \"creation of shares of specific size.\"))"},{"line_number":88,"context_line":"                raise"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        self._ensure_gluster_vol_mounted()"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_0ba8a6da","side":"PARENT","line":88,"updated":"2016-07-25 12:26:18.000000000","message":"Just replace this try/except block with\n\n    self.gluster_manager.set_vol_option(self.gluster_manager.volume, \u0027quota-deem-statfs\u0027, False)","commit_id":"66976ed508d19c3241e7e8a6e26491a5c42c8897"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"011c85cf901358a843be576e72c224d5cf078aff","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                    get_vol_option(\u0027features.quota\u0027)) !\u003d \u0027on\u0027:"},{"line_number":86,"context_line":"                LOG.error(_LE(\"Error in tuning GlusterFS volume to enable \""},{"line_number":87,"context_line":"                              \"creation of shares of specific size.\"))"},{"line_number":88,"context_line":"                raise"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        self._ensure_gluster_vol_mounted()"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"bacf61ea_e6cbbea3","side":"PARENT","line":88,"in_reply_to":"bacf61ea_d0a494ba","updated":"2016-07-29 05:59:11.000000000","message":"Ok, thanks.","commit_id":"66976ed508d19c3241e7e8a6e26491a5c42c8897"},{"author":{"_account_id":9521,"name":"Csaba Henk","email":"chenk@redhat.com","username":"chenk"},"change_message_id":"71664182cd3c9537a6065092088960780d295d0d","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                    get_vol_option(\u0027features.quota\u0027)) !\u003d \u0027on\u0027:"},{"line_number":86,"context_line":"                LOG.error(_LE(\"Error in tuning GlusterFS volume to enable \""},{"line_number":87,"context_line":"                              \"creation of shares of specific size.\"))"},{"line_number":88,"context_line":"                raise"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        self._ensure_gluster_vol_mounted()"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"bacf61ea_d0a494ba","side":"PARENT","line":88,"in_reply_to":"dada55a8_03a93424","updated":"2016-07-28 14:41:58.000000000","message":"Quota enablement, as you can see, happens via a dedicated operation and not just by just changing an option. This is because quota enablement has different semantics than volume option setting.\n\nThe example you refer to is a case of quota enablement, while your try/expect block we are discussing now is a case of vol opt setting. So they are apples and oranges, not comparable.\n\nTo go further into this: the semantic difference I refer to is that \"vol set\" is idempotent (calling it with same parameters multiple times has the same effect -- ie. the given option will be set to the given value and the command succeeds) while \"vol quota enable\" is not (calling it multiple times might have different effects -- ie. in the case when quota was originally disabled, at the first call, the effect is that quota shall be enabled and the command succeeds; at the second call, the command fails).\n\nSo a try/expect block that you stumble upon is the result of managing this behavior: all we want just to make sure quota is enabled. That\u0027s easier to see in the first attempt at doing said quota enablement: https://review.openstack.org/#/c/124278/2/manila/share/drivers/glusterfs.py, the hunk from line 134. However, what you see now in the code, is a refined implementation, where we don\u0027t do any forensics, basically ignore how the quota enablement action is going, rather we just check if eventually quota is enabled.","commit_id":"66976ed508d19c3241e7e8a6e26491a5c42c8897"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"4f7e3b3ba126c88fae29439aaf37f4904e07d4fb","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                    get_vol_option(\u0027features.quota\u0027)) !\u003d \u0027on\u0027:"},{"line_number":86,"context_line":"                LOG.error(_LE(\"Error in tuning GlusterFS volume to enable \""},{"line_number":87,"context_line":"                              \"creation of shares of specific size.\"))"},{"line_number":88,"context_line":"                raise"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        self._ensure_gluster_vol_mounted()"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_d4838101","side":"PARENT","line":88,"in_reply_to":"dada55a8_0ba8a6da","updated":"2016-07-27 07:41:28.000000000","message":"But if I want to check \"features.quota-deem-statfs\" have really set off, I think we should use gluster_call() in a try/except block.","commit_id":"66976ed508d19c3241e7e8a6e26491a5c42c8897"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"093e0b6d1e79f4848f80bc1abdbdc07761ce0520","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                    get_vol_option(\u0027features.quota\u0027)) !\u003d \u0027on\u0027:"},{"line_number":86,"context_line":"                LOG.error(_LE(\"Error in tuning GlusterFS volume to enable \""},{"line_number":87,"context_line":"                              \"creation of shares of specific size.\"))"},{"line_number":88,"context_line":"                raise"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        self._ensure_gluster_vol_mounted()"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_03a93424","side":"PARENT","line":88,"in_reply_to":"dada55a8_959d5e0c","updated":"2016-07-27 16:10:33.000000000","message":"Ok. But please tell me why did they need to check quota enablement like this:\n\nhttps://github.com/openstack/manila/blob/stable/mitaka/manila/share/drivers/glusterfs/layout_directory.py#L80\n\nset_vol_option() just call self.gluster_call() with ignore_failure, so I think they are doing the same way.","commit_id":"66976ed508d19c3241e7e8a6e26491a5c42c8897"},{"author":{"_account_id":9521,"name":"Csaba Henk","email":"chenk@redhat.com","username":"chenk"},"change_message_id":"b2cf2d134feb6c95cc000623ae405b19c29c465f","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                    get_vol_option(\u0027features.quota\u0027)) !\u003d \u0027on\u0027:"},{"line_number":86,"context_line":"                LOG.error(_LE(\"Error in tuning GlusterFS volume to enable \""},{"line_number":87,"context_line":"                              \"creation of shares of specific size.\"))"},{"line_number":88,"context_line":"                raise"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        self._ensure_gluster_vol_mounted()"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_959d5e0c","side":"PARENT","line":88,"in_reply_to":"dada55a8_d4838101","updated":"2016-07-27 11:39:46.000000000","message":"Please don\u0027t want to check if quota-deem-statfs is really off. If the gluster setting went through without error, then it means the setting took effect.","commit_id":"66976ed508d19c3241e7e8a6e26491a5c42c8897"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"a4c897a6cad0330bb4dfec493298e8787c504cea","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":228,"context_line":"        if stderr:"},{"line_number":229,"context_line":"            raise exception.ProcessExecutionError(stderr\u003dstderr)"},{"line_number":230,"context_line":"        else:"},{"line_number":231,"context_line":"            volume_size \u003d int(stdout.split()[8][:-1])"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_2e182684","line":229,"range":{"start_line":228,"start_character":8,"end_line":229,"end_character":64},"updated":"2016-07-25 06:41:51.000000000","message":"I am not really sure about it. stderr is also used for warnings which doesn\u0027t mean that the actual command failed. Checking the result code is sufficient IMO.","commit_id":"df0f735f1e9eddc228a0d0dfcc88c09aa9f4f2f2"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"4f7e3b3ba126c88fae29439aaf37f4904e07d4fb","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":228,"context_line":"        if stderr:"},{"line_number":229,"context_line":"            raise exception.ProcessExecutionError(stderr\u003dstderr)"},{"line_number":230,"context_line":"        else:"},{"line_number":231,"context_line":"            volume_size \u003d int(stdout.split()[8][:-1])"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_56765a06","line":229,"range":{"start_line":228,"start_character":8,"end_line":229,"end_character":64},"in_reply_to":"dada55a8_2e182684","updated":"2016-07-27 07:41:28.000000000","message":"T just think we don\u0027t need check stderr. Because we only interested in stdout and can we parse it.","commit_id":"df0f735f1e9eddc228a0d0dfcc88c09aa9f4f2f2"},{"author":{"_account_id":9521,"name":"Csaba Henk","email":"chenk@redhat.com","username":"chenk"},"change_message_id":"d5f18fd167e2311f0ead937feb9b5f20339f23c7","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        if stderr:"},{"line_number":229,"context_line":"            raise exception.ProcessExecutionError(stderr\u003dstderr)"},{"line_number":230,"context_line":"        else:"},{"line_number":231,"context_line":"            volume_size \u003d int(stdout.split()[8][:-1])"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        if new_size \u003e volume_size:"},{"line_number":234,"context_line":"            reason \u003d (_(\"New size for extending share must be \""}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_2bcacaa1","line":231,"updated":"2016-07-25 12:26:18.000000000","message":"I suggest to exctract this df boilerplate into an auxiliary method,\nsomething like\n\n   _get_df_data(share, index)\n\nand call it as appropriate in extend and shrink.","commit_id":"df0f735f1e9eddc228a0d0dfcc88c09aa9f4f2f2"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"a4c897a6cad0330bb4dfec493298e8787c504cea","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        if stderr:"},{"line_number":229,"context_line":"            raise exception.ProcessExecutionError(stderr\u003dstderr)"},{"line_number":230,"context_line":"        else:"},{"line_number":231,"context_line":"            volume_size \u003d int(stdout.split()[8][:-1])"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        if new_size \u003e volume_size:"},{"line_number":234,"context_line":"            reason \u003d (_(\"New size for extending share must be \""}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_09ec3c28","line":231,"range":{"start_line":231,"start_character":12,"end_line":231,"end_character":53},"updated":"2016-07-25 06:41:51.000000000","message":"I think it would be better to check stdout that it actually contains something before the spilt() and have a try block around the spilt. If \"df\" returns something unexpected we can log it and raise an error.","commit_id":"df0f735f1e9eddc228a0d0dfcc88c09aa9f4f2f2"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"011c85cf901358a843be576e72c224d5cf078aff","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        if stderr:"},{"line_number":229,"context_line":"            raise exception.ProcessExecutionError(stderr\u003dstderr)"},{"line_number":230,"context_line":"        else:"},{"line_number":231,"context_line":"            volume_size \u003d int(stdout.split()[8][:-1])"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        if new_size \u003e volume_size:"},{"line_number":234,"context_line":"            reason \u003d (_(\"New size for extending share must be \""}],"source_content_type":"text/x-python","patch_set":14,"id":"bacf61ea_a05feee3","line":231,"range":{"start_line":231,"start_character":12,"end_line":231,"end_character":53},"in_reply_to":"dada55a8_09ec3c28","updated":"2016-07-29 05:59:11.000000000","message":"I think it\u0027s really hard to determine what is unexpected and what is expected. If we face anyerror with stdout or split(), it will raise error by itself. And I think this is enough information about errors","commit_id":"df0f735f1e9eddc228a0d0dfcc88c09aa9f4f2f2"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"a4c897a6cad0330bb4dfec493298e8787c504cea","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":249,"context_line":"        if stderr:"},{"line_number":250,"context_line":"            raise exception.ProcessExecutionError(stderr\u003dstderr)"},{"line_number":251,"context_line":"        else:"},{"line_number":252,"context_line":"            consumed \u003d int(stdout.split()[9][:-1])"},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_890e6c30","line":250,"range":{"start_line":249,"start_character":0,"end_line":250,"end_character":64},"updated":"2016-07-25 06:41:51.000000000","message":"same question","commit_id":"df0f735f1e9eddc228a0d0dfcc88c09aa9f4f2f2"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"a4c897a6cad0330bb4dfec493298e8787c504cea","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        if stderr:"},{"line_number":250,"context_line":"            raise exception.ProcessExecutionError(stderr\u003dstderr)"},{"line_number":251,"context_line":"        else:"},{"line_number":252,"context_line":"            consumed \u003d int(stdout.split()[9][:-1])"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        if new_size \u003c consumed:"},{"line_number":255,"context_line":"            LOG.error(_LE(\"New size for shrinking share must be \""}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_a9dd3072","line":252,"updated":"2016-07-25 06:41:51.000000000","message":"same like L231","commit_id":"df0f735f1e9eddc228a0d0dfcc88c09aa9f4f2f2"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"34a07605220f483377c336e0a676212a57f74156","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                \u0027free_capacity_gb\u0027: (smpv.f_bavail * smpv.f_frsize) \u003e\u003e 30}"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _get_df_data(self, local_share_path, data\u003d\u0027size\u0027):"},{"line_number":143,"context_line":"        \"\"\"Get volume info via df unility. \"\"\""},{"line_number":144,"context_line":"        index \u003d 8"},{"line_number":145,"context_line":"        if data \u003d\u003d \u0027consumed\u0027:"},{"line_number":146,"context_line":"            index \u003d 9"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_b071a70e","line":143,"range":{"start_line":143,"start_character":34,"end_line":143,"end_character":41},"updated":"2016-08-05 12:02:06.000000000","message":"utility?","commit_id":"003ac779e89d8229eb8a0381cb56ff99fb52ca71"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"8516b38ed9e1aebd743e161ce9cac5a237da409b","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                \u0027free_capacity_gb\u0027: (smpv.f_bavail * smpv.f_frsize) \u003e\u003e 30}"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _get_df_data(self, local_share_path, data\u003d\u0027size\u0027):"},{"line_number":143,"context_line":"        \"\"\"Get volume info via df unility. \"\"\""},{"line_number":144,"context_line":"        index \u003d 8"},{"line_number":145,"context_line":"        if data \u003d\u003d \u0027consumed\u0027:"},{"line_number":146,"context_line":"            index \u003d 9"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_86f9cd82","line":143,"range":{"start_line":143,"start_character":34,"end_line":143,"end_character":41},"in_reply_to":"bacf61ea_b071a70e","updated":"2016-08-05 13:14:39.000000000","message":"Ops, sorry. Thank you for all your comments.","commit_id":"003ac779e89d8229eb8a0381cb56ff99fb52ca71"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"34a07605220f483377c336e0a676212a57f74156","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                      % {\u0027vol\u0027: volume_size, \u0027new\u0027: new_size})"},{"line_number":247,"context_line":"            raise exception.ShareExtendingError("},{"line_number":248,"context_line":"                reason\u003dreason, share_id\u003dshare[\u0027id\u0027])"},{"line_number":249,"context_line":"        else:"},{"line_number":250,"context_line":"            self._resize_share(share, new_size)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def shrink_share(self, share, new_size, share_server\u003dNone):"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_d0e25b9f","line":249,"range":{"start_line":249,"start_character":8,"end_line":249,"end_character":12},"updated":"2016-08-05 12:02:06.000000000","message":"Not needed","commit_id":"003ac779e89d8229eb8a0381cb56ff99fb52ca71"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"34a07605220f483377c336e0a676212a57f74156","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        if new_size \u003c consumed:"},{"line_number":258,"context_line":"            LOG.error(_LE(\"New size for shrinking share must be \""},{"line_number":259,"context_line":"                          \"greater than or equal to consumed space \""},{"line_number":260,"context_line":"                          \"(consumed: %(cons)s, shrinked: %(new)s).\"),"},{"line_number":261,"context_line":"                      {\u0027cons\u0027: consumed, \u0027new\u0027: new_size})"},{"line_number":262,"context_line":"            raise exception.ShareShrinkingPossibleDataLoss("},{"line_number":263,"context_line":"                share_id\u003dshare[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_b01a47c4","line":260,"range":{"start_line":260,"start_character":48,"end_line":260,"end_character":56},"updated":"2016-08-05 12:02:06.000000000","message":"shrunk","commit_id":"003ac779e89d8229eb8a0381cb56ff99fb52ca71"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"34a07605220f483377c336e0a676212a57f74156","unresolved":false,"context_lines":[{"line_number":261,"context_line":"                      {\u0027cons\u0027: consumed, \u0027new\u0027: new_size})"},{"line_number":262,"context_line":"            raise exception.ShareShrinkingPossibleDataLoss("},{"line_number":263,"context_line":"                share_id\u003dshare[\u0027id\u0027])"},{"line_number":264,"context_line":"        else:"},{"line_number":265,"context_line":"            self._resize_share(share, new_size)"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_30ead774","line":264,"range":{"start_line":264,"start_character":8,"end_line":264,"end_character":12},"updated":"2016-08-05 12:02:06.000000000","message":"Not needed","commit_id":"003ac779e89d8229eb8a0381cb56ff99fb52ca71"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"655bf75eaef95002aabd346ad2db40781d07e4b1","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                \u0027free_capacity_gb\u0027: (smpv.f_bavail * smpv.f_frsize) \u003e\u003e 30}"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _get_df_data(self, local_share_path, data\u003d\u0027size\u0027):"},{"line_number":143,"context_line":"        \"\"\"Get volume info via df unility. \"\"\""},{"line_number":144,"context_line":"        index \u003d 8"},{"line_number":145,"context_line":"        if data \u003d\u003d \u0027consumed\u0027:"},{"line_number":146,"context_line":"            index \u003d 9"}],"source_content_type":"text/x-python","patch_set":17,"id":"3ac371cc_e8d8ef1f","line":143,"range":{"start_line":143,"start_character":34,"end_line":143,"end_character":41},"updated":"2016-08-15 12:42:00.000000000","message":"utility","commit_id":"83efc1c5f21a7cf3710530a24f0c3780fe57e5f6"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"cfc431f3fa1b7adaf1c1d093c9ae19029262c66a","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                \u0027free_capacity_gb\u0027: (smpv.f_bavail * smpv.f_frsize) \u003e\u003e 30}"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _get_df_data(self, local_share_path, data\u003d\u0027size\u0027):"},{"line_number":143,"context_line":"        \"\"\"Get volume info via df unility. \"\"\""},{"line_number":144,"context_line":"        index \u003d 8"},{"line_number":145,"context_line":"        if data \u003d\u003d \u0027consumed\u0027:"},{"line_number":146,"context_line":"            index \u003d 9"}],"source_content_type":"text/x-python","patch_set":17,"id":"3ac371cc_b4111aaf","line":143,"range":{"start_line":143,"start_character":34,"end_line":143,"end_character":41},"in_reply_to":"3ac371cc_e8d8ef1f","updated":"2016-08-15 18:08:11.000000000","message":"Thanks. Done!","commit_id":"83efc1c5f21a7cf3710530a24f0c3780fe57e5f6"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"c3e768dab7c15f3ffb36410f1a18ea730a8b79bc","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        if data \u003d\u003d \u0027consumed\u0027:"},{"line_number":146,"context_line":"            index \u003d 9"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":149,"context_line":"        stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return int(stdout.split()[index][:-1])"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_54b2f794","line":148,"range":{"start_line":148,"start_character":14,"end_line":148,"end_character":45},"updated":"2016-10-08 07:18:07.000000000","message":"use tuple would be better.","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"c3e768dab7c15f3ffb36410f1a18ea730a8b79bc","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            index \u003d 9"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":149,"context_line":"        stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return int(stdout.split()[index][:-1])"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_d432870f","line":149,"updated":"2016-10-08 07:18:07.000000000","message":"Should we check the stderr output to see if execution success?","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":9521,"name":"Csaba Henk","email":"chenk@redhat.com","username":"chenk"},"change_message_id":"ff81928f00c496c9b132f54e6484fb6762f5c874","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":149,"context_line":"        stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return int(stdout.split()[index][:-1])"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _resize_share(self, share, new_size):"},{"line_number":154,"context_line":"        \"\"\"Reset a hard limit for share.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a8ec9b2_ac8b0b67","line":151,"updated":"2016-09-16 10:19:42.000000000","message":"This could be improved.\n\nFirst of all, let\u0027s use a portable invocation of df, which could be\n\n    df -Pk \u003cpath\u003e\n\n (see http://pubs.opengroup.org/onlinepubs/9699919799/utilities/df.html#tag_20_33_10 -- note that `df -P \u003cpath\u003e` is also expected to be portable, but GNU df is not conformant and behaves as specified for `-Pk`).\n\nThen, it can nicely be made into a dict and you don\u0027t have to invent ad-hoc indexes and keys:\n\n    dfkeys, dfvalues \u003d sdout.splitlines()\n    dfdict \u003d dict(zip(re.findall(\u0027[A-Z\\d]+[^A-Z\\d]*\\S(?\u003d\\s+|$)\u0027, dfkeys), dfvalues.split()))\n\nThen your *data* kwarg can be replaced with a standard arg called *key*, and you can just\n\n    return dfdict[key]\n\nConcerning usage,\n\n    _get_df_data(..., data\u003d\u0027size\u0027)\n\nbecomes\n\n    _get_df_data(..., \u00271024-blocks\u0027)\n\nand\n\n    _get_df_data(..., data\u003d\u0027consumed\u0027)\n\nbecomes\n\n    _get_df_data(..., \u0027Used\u0027)\n\n\n(and these keys are not ad-hoc, but taken straight out of POSIX:2008!)\n\nTo wrap it up, you might want to do numeric conversion here, than bother the callers with that. It\u0027s not feasible to do numeric conversion unconditionally, as some values are not numeric. We could have a keyword argument *numconv*, defaulting to None. Given an integer value for it, the resultant df entry is converted to int and shifted left as much as numconv. So tuning further the last part of the code:\n\n     dfentry \u003d dfdict[key]\n     return dfentry if numconv is None else int(dfentry) \u003e\u003e numconv\n\nAnd thus the invocations in {extend,shrink}_share would need to pass `numconv\u003d20` to convert the kilobyte units to gigabytes.","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"b7ab2b9f488a4a321121543501dbc6fb02bfa334","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":149,"context_line":"        stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return int(stdout.split()[index][:-1])"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _resize_share(self, share, new_size):"},{"line_number":154,"context_line":"        \"\"\"Reset a hard limit for share.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a8ec9b2_d770eda6","line":151,"in_reply_to":"7a8ec9b2_4c6db2cb","updated":"2016-09-21 15:56:59.000000000","message":"OK, I agree with you that we should raise an exception for \"other type\" such as String, Object... and work only for None and int.\n\nI re-proposed __get_df_data function with numconv variable  checking like this:\n\n-----------------\n\nif numconv is None:\n   return dfentry\nelif isinstance(numconv, int):\n   return (int(dfentry) \u003e\u003e numconv)\nelse:\n   raise TypeError(\"Unsupport {} type for numconv\" \n        .format(type(numconv).__name__))\n\n-------------------\n\nOf course, we can use InvalidInput in manila exception list.","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":9521,"name":"Csaba Henk","email":"chenk@redhat.com","username":"chenk"},"change_message_id":"ca8d474110963718884ca885993e14b64327ff55","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":149,"context_line":"        stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return int(stdout.split()[index][:-1])"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _resize_share(self, share, new_size):"},{"line_number":154,"context_line":"        \"\"\"Reset a hard limit for share.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a8ec9b2_4c6db2cb","line":151,"in_reply_to":"7a8ec9b2_87f18597","updated":"2016-09-19 19:19:51.000000000","message":"Well, if we go precise about the numconv parameter: the kind of informal spec I have in my head is as follows: if it\u0027s integer, then it applies that as a right shift to the decimal value of the entry; if None, then the entry is returned as is. For other types of numconv, behavior is undefined.\n\nHaving said that, both your and my proposed code satisfies this spec. So both are fine and it\u0027s subjective what actual behavior to choose for the \"other type\" case. My subjective concern is that if an other type is passed that\u0027s probably by mistake, so we\u0027d better be rigorous about it and fail (but don\u0027t want to go as far as to explicitely branch on type, just do things with it that work only for None and int). If your preference is to be permissive, that\u0027s OK too.","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"c6d682c814dd6b22fb7cc12c5e89a998d5574cb4","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":149,"context_line":"        stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return int(stdout.split()[index][:-1])"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _resize_share(self, share, new_size):"},{"line_number":154,"context_line":"        \"\"\"Reset a hard limit for share.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a8ec9b2_87f18597","line":151,"in_reply_to":"7a8ec9b2_ac8b0b67","updated":"2016-09-19 04:51:06.000000000","message":"Hi Csaba, I think we can check if numconv is integer then we will convert dfentry to integer, otherwise, we will return dfentry like bellow:\n\n----------\nif isinstance(numconv, int):\n    return (int(dfentry) \u003e\u003e numconv)\nreturn dfentry\n----------\n\nIt\u0027s Ok?","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"5e4799f6f25310a3db7c360ad7f95fbc7140fd44","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":149,"context_line":"        stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return int(stdout.split()[index][:-1])"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _resize_share(self, share, new_size):"},{"line_number":154,"context_line":"        \"\"\"Reset a hard limit for share.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a8ec9b2_031bbe81","line":151,"in_reply_to":"7a8ec9b2_ac8b0b67","updated":"2016-09-17 15:19:40.000000000","message":"Thanks. Good point! I will update Patch Set ASAP.","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"fb3507ea4f6eac56441a34baac13f6275802ab71","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":149,"context_line":"        stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return int(stdout.split()[index][:-1])"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _resize_share(self, share, new_size):"},{"line_number":154,"context_line":"        \"\"\"Reset a hard limit for share.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a8ec9b2_c7f0ed69","line":151,"in_reply_to":"7a8ec9b2_ac8b0b67","updated":"2016-09-19 05:03:20.000000000","message":"Then __get_df_data function will change as follows:\n\nhttp://paste.ubuntu.com/23201410/","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":9521,"name":"Csaba Henk","email":"chenk@redhat.com","username":"chenk"},"change_message_id":"ca8d474110963718884ca885993e14b64327ff55","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        cmd \u003d [\u0027df\u0027, \u0027-BG\u0027, local_share_path]"},{"line_number":149,"context_line":"        stdout, stderr \u003d self.driver._execute(*cmd)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return int(stdout.split()[index][:-1])"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _resize_share(self, share, new_size):"},{"line_number":154,"context_line":"        \"\"\"Reset a hard limit for share.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a8ec9b2_0ccf2ab4","line":151,"in_reply_to":"7a8ec9b2_c7f0ed69","updated":"2016-09-19 19:19:51.000000000","message":"Looks good!","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"}],"manila/tests/fake_share.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b1e70abac6158b82f65c35ad28af4a9542a6955c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    share \u003d {"},{"line_number":27,"context_line":"        \u0027id\u0027: \u0027fakeid\u0027,"},{"line_number":28,"context_line":"        \u0027name\u0027: \u0027fakename\u0027,"},{"line_number":29,"context_line":"        \u0027size\u0027: 2,"},{"line_number":30,"context_line":"        \u0027share_proto\u0027: \u0027fake_proto\u0027,"},{"line_number":31,"context_line":"        \u0027share_network_id\u0027: \u0027fake share network id\u0027,"},{"line_number":32,"context_line":"        \u0027share_server_id\u0027: \u0027fake share server id\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_c848a25e","line":29,"range":{"start_line":29,"start_character":16,"end_line":29,"end_character":18},"updated":"2016-06-22 00:26:05.000000000","message":"Why update this? Why not send it as a kwarg:\n\n\n\n   my_share \u003d fake_share(size\u003d2)","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"}],"manila/tests/share/drivers/glusterfs/test_layout_directory.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b1e70abac6158b82f65c35ad28af4a9542a6955c","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from manila.tests import fake_share"},{"line_number":29,"context_line":"from manila.tests import fake_utils"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"CONF \u003d cfg.CONF"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"fake_gluster_manager_attrs \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_e8347edf","line":31,"range":{"start_line":31,"start_character":0,"end_line":31,"end_character":4},"updated":"2016-06-22 00:26:05.000000000","message":"Please avoid mixing whitespace changes with code changes... Please revert this deleted line.","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":19741,"name":"Hieu LE","email":"hieulq2@viettel.com.vn","username":"hieulq"},"change_message_id":"f61b399379d549b1e9ad0708d7e2b52eecfbb5d0","unresolved":false,"context_lines":[{"line_number":403,"context_line":"            self._layout, \u0027_get_local_share_path\u0027,"},{"line_number":404,"context_line":"            mock.Mock(return_value\u003dfake_local_share_path))"},{"line_number":405,"context_line":"        self.mock_object(layout_directory.LOG, \u0027error\u0027)"},{"line_number":406,"context_line":"        self.mock_object("},{"line_number":407,"context_line":"            self._layout.driver, \u0027_execute\u0027)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        self.assertRaises("},{"line_number":410,"context_line":"            exception.ProcessExecutionError, self._layout.extend_share,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_b8a1ebab","line":407,"range":{"start_line":406,"start_character":0,"end_line":407,"end_character":44},"updated":"2016-07-05 07:40:06.000000000","message":"this is not necessary, we have mock the _execute method of _layout.driver as fake_utils.fake_execute. Please remove it and add assertEquals of fake_utils.fake_execute_get_logs","commit_id":"d78862f67030b1faeb3848b41f9998de33033964"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"9af73b93334bbd801d789cbd4d179390d3a257be","unresolved":false,"context_lines":[{"line_number":380,"context_line":""},{"line_number":381,"context_line":"    def test_extend_share(self):"},{"line_number":382,"context_line":"        def exec_runner(*ignore_args, **ignore_kw):"},{"line_number":383,"context_line":"            expected_out \u003d \\"},{"line_number":384,"context_line":"                str(\"\"\"Filesystem  1G-blocks  Used Available Use% Mounted on"},{"line_number":385,"context_line":"                127.0.0.1:/testvol/fakename 10G 2G 9G 12% /mnt/path\"\"\")"},{"line_number":386,"context_line":"            return expected_out, None"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        exec_cmd1 \u003d \u0027df -BG %s\u0027 % fake_local_share_path"}],"source_content_type":"text/x-python","patch_set":13,"id":"dada55a8_c6527c34","line":385,"range":{"start_line":383,"start_character":12,"end_line":385,"end_character":71},"updated":"2016-07-21 16:38:11.000000000","message":"http://docs.openstack.org/developer/hacking/#general\n\n\"\"\"\nIt is preferred to wrap long lines in parentheses and not a backslash for line continuation.\n\"\"\"\n\nAlso, why do you need \"str\" translation? If you need it, then it is better to use \"six\" module for making it py2/3 compatible.","commit_id":"dcf07bf71029780e22200e8feec258794fbf81c5"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"c3e768dab7c15f3ffb36410f1a18ea730a8b79bc","unresolved":false,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def test_get_df_data(self):"},{"line_number":270,"context_line":"        def exec_runner(*ignore_args, **ignore_kw):"},{"line_number":271,"context_line":"            expected_out \u003d \\"},{"line_number":272,"context_line":"                six.text_type(\"\"\"Filesystem  1G-blocks  Used Available Use% Mounted on"},{"line_number":273,"context_line":"                127.0.0.1:/testvol/fakename 10G 2G 9G 12% /mnt/path\"\"\")"},{"line_number":274,"context_line":"            return expected_out, None"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_e3cfca53","line":271,"range":{"start_line":271,"start_character":27,"end_line":271,"end_character":28},"updated":"2016-10-08 07:18:07.000000000","message":"it\u0027d better not use \\","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"c3e768dab7c15f3ffb36410f1a18ea730a8b79bc","unresolved":false,"context_lines":[{"line_number":289,"context_line":"            raise trouble"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        exec_cmd1 \u003d \u0027df -BG %s\u0027 % fake_local_share_path"},{"line_number":292,"context_line":"        expected_exec \u003d [exec_cmd1, ]"},{"line_number":293,"context_line":"        fake_utils.fake_execute_set_repliers([(expected_exec[0],"},{"line_number":294,"context_line":"                                               exec_runner)])"},{"line_number":295,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_a337824b","line":292,"range":{"start_line":292,"start_character":8,"end_line":292,"end_character":21},"updated":"2016-10-08 07:18:07.000000000","message":"this expected_exec definition is not necessary, cause the following code only use expected_exec[0], could use exec_cmd1 straight.","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"c3e768dab7c15f3ffb36410f1a18ea730a8b79bc","unresolved":false,"context_lines":[{"line_number":466,"context_line":""},{"line_number":467,"context_line":"    def test_extend_share(self):"},{"line_number":468,"context_line":"        def exec_runner(*ignore_args, **ignore_kw):"},{"line_number":469,"context_line":"            expected_out \u003d \\"},{"line_number":470,"context_line":"                six.text_type(\"\"\"Filesystem  1G-blocks  Used Available Use% Mounted on"},{"line_number":471,"context_line":"                127.0.0.1:/testvol/fakename 10G 2G 9G 12% /mnt/path\"\"\")"},{"line_number":472,"context_line":"            return expected_out, None"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_a30ea289","line":469,"range":{"start_line":469,"start_character":27,"end_line":469,"end_character":28},"updated":"2016-10-08 07:18:07.000000000","message":"ditto","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"c3e768dab7c15f3ffb36410f1a18ea730a8b79bc","unresolved":false,"context_lines":[{"line_number":491,"context_line":"            raise RuntimeError"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"        exec_cmd1 \u003d \u0027df -BG %s\u0027 % fake_local_share_path"},{"line_number":494,"context_line":"        expected_exec \u003d [exec_cmd1, ]"},{"line_number":495,"context_line":"        self.mock_object("},{"line_number":496,"context_line":"            self._layout, \u0027_get_local_share_path\u0027,"},{"line_number":497,"context_line":"            mock.Mock(return_value\u003dfake_local_share_path))"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_437cfeeb","line":494,"range":{"start_line":494,"start_character":8,"end_line":494,"end_character":21},"updated":"2016-10-08 07:18:07.000000000","message":"ditto","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"c3e768dab7c15f3ffb36410f1a18ea730a8b79bc","unresolved":false,"context_lines":[{"line_number":506,"context_line":""},{"line_number":507,"context_line":"    def test_extend_share_new_size_greate_than_volume_size(self):"},{"line_number":508,"context_line":"        def exec_runner(*ignore_args, **ignore_kw):"},{"line_number":509,"context_line":"            expected_out \u003d \\"},{"line_number":510,"context_line":"                six.text_type(\"\"\"Filesystem  1G-blocks  Used Available Use% Mounted on"},{"line_number":511,"context_line":"                127.0.0.1:/testvol/fakename 10G 2G 9G 12% /mnt/path\"\"\")"},{"line_number":512,"context_line":"            return expected_out, None"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_838286c6","line":509,"range":{"start_line":509,"start_character":27,"end_line":509,"end_character":28},"updated":"2016-10-08 07:18:07.000000000","message":"ditto","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"c3e768dab7c15f3ffb36410f1a18ea730a8b79bc","unresolved":false,"context_lines":[{"line_number":527,"context_line":""},{"line_number":528,"context_line":"    def test_extend_share_unable_resize(self):"},{"line_number":529,"context_line":"        def exec_runner(*ignore_args, **ignore_kw):"},{"line_number":530,"context_line":"            expected_out \u003d \\"},{"line_number":531,"context_line":"                six.text_type(\"\"\"Filesystem  1G-blocks  Used Available Use% Mounted on"},{"line_number":532,"context_line":"                127.0.0.1:/testvol/fakename 10G 2G 9G 12% /mnt/path\"\"\")"},{"line_number":533,"context_line":"            return expected_out, None"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_03775602","line":530,"range":{"start_line":530,"start_character":27,"end_line":530,"end_character":28},"updated":"2016-10-08 07:18:07.000000000","message":"ditto","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"c3e768dab7c15f3ffb36410f1a18ea730a8b79bc","unresolved":false,"context_lines":[{"line_number":552,"context_line":""},{"line_number":553,"context_line":"    def test_shrink_share(self):"},{"line_number":554,"context_line":"        def exec_runner(*ignore_args, **ignore_kw):"},{"line_number":555,"context_line":"            expected_out \u003d \\"},{"line_number":556,"context_line":"                six.text_type(\"\"\"Filesystem  1G-blocks  Used Available Use% Mounted on"},{"line_number":557,"context_line":"                127.0.0.1:/testvol/fakename 10G 1G 9G 10% /mnt/path\"\"\")"},{"line_number":558,"context_line":"            return expected_out, None"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_63665a52","line":555,"range":{"start_line":555,"start_character":27,"end_line":555,"end_character":28},"updated":"2016-10-08 07:18:07.000000000","message":"ditto","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"c3e768dab7c15f3ffb36410f1a18ea730a8b79bc","unresolved":false,"context_lines":[{"line_number":577,"context_line":"            raise RuntimeError"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"        exec_cmd1 \u003d \u0027df -BG %s\u0027 % fake_local_share_path"},{"line_number":580,"context_line":"        expected_exec \u003d [exec_cmd1, ]"},{"line_number":581,"context_line":"        self.mock_object("},{"line_number":582,"context_line":"            self._layout, \u0027_get_local_share_path\u0027,"},{"line_number":583,"context_line":"            mock.Mock(return_value\u003dfake_local_share_path))"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_034e76c0","line":580,"range":{"start_line":580,"start_character":8,"end_line":580,"end_character":21},"updated":"2016-10-08 07:18:07.000000000","message":"ditto","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"c3e768dab7c15f3ffb36410f1a18ea730a8b79bc","unresolved":false,"context_lines":[{"line_number":613,"context_line":""},{"line_number":614,"context_line":"    def test_shrink_share_unable_resize(self):"},{"line_number":615,"context_line":"        def exec_runner(*ignore_args, **ignore_kw):"},{"line_number":616,"context_line":"            expected_out \u003d \\"},{"line_number":617,"context_line":"                six.text_type(\"\"\"Filesystem  1G-blocks  Used Available Use% Mounted on"},{"line_number":618,"context_line":"                127.0.0.1:/testvol/fakename 10G 1G 9G 10% /mnt/path\"\"\")"},{"line_number":619,"context_line":"            return expected_out, None"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_63cd7a30","line":616,"range":{"start_line":616,"start_character":27,"end_line":616,"end_character":28},"updated":"2016-10-08 07:18:07.000000000","message":"ditto","commit_id":"a5886749b2d370f15eb243ed84355a9de25a8601"}],"releasenotes/notes/extend-and-shrink-share-in-glusterfs-driver-2bc3eae861e82e67.yaml":[{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"3acfad83551a357700db0a29e32492ab45fe57ec","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    Implement extend and shrink features for glusterfs"},{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - extend/shrink shares in glusterfs driver"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5a9d85d2_38cff2b1","line":3,"range":{"start_line":3,"start_character":53,"end_line":3,"end_character":54},"updated":"2016-06-20 11:47:51.000000000","message":"period here","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b1e70abac6158b82f65c35ad28af4a9542a6955c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    Implement extend and shrink features for glusterfs"},{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - extend/shrink shares in glusterfs driver"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"3aaa91ec_28ffa602","line":3,"range":{"start_line":3,"start_character":53,"end_line":3,"end_character":54},"in_reply_to":"5a9d85d2_0ed3cc39","updated":"2016-06-22 00:26:05.000000000","message":"you don\u0027t need this in the prelude..","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":19930,"name":"Dai Dang Van","email":"daidv@omzcloud.vn","username":"daidv"},"change_message_id":"9a9d9d33ebcc6f929cf7c8f509fccf9d83faddba","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    Implement extend and shrink features for glusterfs"},{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - extend/shrink shares in glusterfs driver"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5a9d85d2_0ed3cc39","line":3,"range":{"start_line":3,"start_character":53,"end_line":3,"end_character":54},"in_reply_to":"5a9d85d2_38cff2b1","updated":"2016-06-20 12:38:57.000000000","message":"OK. I will change in new patch.","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"3acfad83551a357700db0a29e32492ab45fe57ec","unresolved":false,"context_lines":[{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    Implement extend and shrink features for glusterfs"},{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - extend/shrink shares in glusterfs driver"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5a9d85d2_98c42693","line":5,"range":{"start_line":5,"start_character":43,"end_line":5,"end_character":44},"updated":"2016-06-20 11:47:51.000000000","message":"period here","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b1e70abac6158b82f65c35ad28af4a9542a6955c","unresolved":false,"context_lines":[{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    Implement extend and shrink features for glusterfs"},{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - extend/shrink shares in glusterfs driver"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"3aaa91ec_6809ae2c","line":5,"range":{"start_line":5,"start_character":43,"end_line":5,"end_character":44},"in_reply_to":"5a9d85d2_98c42693","updated":"2016-06-22 00:26:05.000000000","message":"\"Added support to extend and shrink shares created with the glusterfs native driver.\"","commit_id":"ecb1e5b2f6e0a7e6b1885d9ab5d2ad08c74cdcc4"}]}
