)]}'
{"os_brick/initiator/windows/rbd.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"167dc1b0dfc4b8f2eeaa162ac06649e8b9402aae","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# All Rights Reserved."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_f115514a","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":22},"updated":"2020-05-20 15:00:23.000000000","message":"Remove this line -- it\u0027s for a copyright notice, not the license header.","commit_id":"62b452ab2091521de262d362bb9a53bbaf6144e7"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"a55a2dc0a6506eaa2bcdec31c8bfe6361909ca23","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# All Rights Reserved."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_0d8dc130","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":22},"in_reply_to":"ff570b3c_f115514a","updated":"2020-05-28 11:48:34.000000000","message":"Fixed it, thanks. This code is based on the Linux RBD connector so I used the kept the same header.","commit_id":"62b452ab2091521de262d362bb9a53bbaf6144e7"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"525aaa8eedf2852d3daf785a6b8d0facf9266157","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            for attempt in range(self.device_scan_attempts):"},{"line_number":157,"context_line":"                rbd_dev_path \u003d self.get_device_name("},{"line_number":158,"context_line":"                    connection_properties,"},{"line_number":159,"context_line":"                    expect\u003d(attempt \u003d\u003d (self.device_scan_attempts-1)))"},{"line_number":160,"context_line":"                if rbd_dev_path:"},{"line_number":161,"context_line":"                    break"},{"line_number":162,"context_line":"                time.sleep(self.device_scan_interval)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_d259a95a","line":159,"updated":"2020-04-08 13:15:58.000000000","message":"pep8: E226 missing whitespace around arithmetic operator","commit_id":"62b452ab2091521de262d362bb9a53bbaf6144e7"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"525aaa8eedf2852d3daf785a6b8d0facf9266157","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        rbd_dev_path \u003d self.get_device_name(connection_properties)"},{"line_number":170,"context_line":"        dev_num \u003d self._diskutils.get_device_number_from_device_name("},{"line_number":171,"context_line":"            rbd_dev_path)"},{"line_number":172,"context_line":"        # TODO: remove this once wnbd honors the SAN policy setting."},{"line_number":173,"context_line":"        self._diskutils.set_disk_offline(dev_num)"},{"line_number":174,"context_line":"        return {\u0027path\u0027: rbd_dev_path,"},{"line_number":175,"context_line":"                \u0027type\u0027: \u0027block\u0027}"}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_b254e522","line":172,"updated":"2020-04-08 13:15:58.000000000","message":"pep8: H101: Use TODO(NAME)","commit_id":"62b452ab2091521de262d362bb9a53bbaf6144e7"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"525aaa8eedf2852d3daf785a6b8d0facf9266157","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        \"\"\""},{"line_number":188,"context_line":"        self._ensure_rbd_available()"},{"line_number":189,"context_line":"        pool, volume \u003d connection_properties[\u0027name\u0027].split(\u0027/\u0027)"},{"line_number":190,"context_line":"        # TODO: include the pool name once rbd-nbd allows it."},{"line_number":191,"context_line":"        # at the moment it\u0027s inconsistent."},{"line_number":192,"context_line":"        cmd \u003d [\u0027rbd-nbd\u0027, \u0027unmap\u0027, volume]"},{"line_number":193,"context_line":"        cmd +\u003d self._get_rbd_args(connection_properties)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_1231510c","line":190,"updated":"2020-04-08 13:15:58.000000000","message":"pep8: H101: Use TODO(NAME)","commit_id":"62b452ab2091521de262d362bb9a53bbaf6144e7"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"525aaa8eedf2852d3daf785a6b8d0facf9266157","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        try:"},{"line_number":195,"context_line":"            self._execute(*cmd)"},{"line_number":196,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":197,"context_line":"            # TODO: check return code once rbd-nbd returns something"},{"line_number":198,"context_line":"            # other than \"1\"."},{"line_number":199,"context_line":"            if not self.get_device_name(connection_properties,"},{"line_number":200,"context_line":"                                        expect\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_f2330d12","line":197,"updated":"2020-04-08 13:15:58.000000000","message":"pep8: H101: Use TODO(NAME)","commit_id":"62b452ab2091521de262d362bb9a53bbaf6144e7"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"710fd4c01aef55cba12b6309eb3990cde1c43775","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import ctypes"},{"line_number":17,"context_line":"import errno"},{"line_number":18,"context_line":"import json"},{"line_number":19,"context_line":"import os"},{"line_number":20,"context_line":"import time"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from oslo_concurrency import processutils"}],"source_content_type":"text/x-python","patch_set":4,"id":"fffc6b78_7b8e1a2f","line":19,"updated":"2020-11-20 13:51:31.000000000","message":"pep8: F401 \u0027os\u0027 imported but unused","commit_id":"9892c720fe0f15eafb9fff4b5b1dcfcfb3405845"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"710fd4c01aef55cba12b6309eb3990cde1c43775","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        always do a local mount. Besides, Hyper-V cannot use librbd, so"},{"line_number":41,"context_line":"        we\u0027ll need to do a local mount anyway."},{"line_number":42,"context_line":"      * The device names aren\u0027t handled in the same way. On Windows,"},{"line_number":43,"context_line":"        disk names such as \"\\\\.\\PhysicalDrive1\" are provided by the OS and"},{"line_number":44,"context_line":"        cannot be explicitly requsted."},{"line_number":45,"context_line":"    \"\"\""},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fffc6b78_db83c603","line":43,"updated":"2020-11-20 13:51:31.000000000","message":"pep8: W605 invalid escape sequence \u0027\\P\u0027","commit_id":"9892c720fe0f15eafb9fff4b5b1dcfcfb3405845"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"710fd4c01aef55cba12b6309eb3990cde1c43775","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                try:"},{"line_number":138,"context_line":"                    # Under high load, it can take a second before the disk"},{"line_number":139,"context_line":"                    # becomes accessible."},{"line_number":140,"context_line":"                    with open(rbd_dev_path, \u0027rb\u0027) as disk:"},{"line_number":141,"context_line":"                        pass"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"                    return rbd_dev_path"}],"source_content_type":"text/x-python","patch_set":4,"id":"fffc6b78_bb88821f","line":140,"updated":"2020-11-20 13:51:31.000000000","message":"pep8: F841 local variable \u0027disk\u0027 is assigned to but never used","commit_id":"9892c720fe0f15eafb9fff4b5b1dcfcfb3405845"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"c9347b349c71d19d867d886ad4460f22a5c0ee10","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":58,"context_line":"            self._rbd_available \u003d False"},{"line_number":59,"context_line":"            LOG.warning(\"rbd.exe is not available.\")"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _ensure_rbd_available(self):"},{"line_number":62,"context_line":"        if not self._rbd_available:"},{"line_number":63,"context_line":"            msg \u003d _(\"rbd.exe is not available.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"cd428700_58c66262","line":60,"updated":"2020-12-02 15:20:55.000000000","message":"implementing get_connector_properties() could be a mechanism to tell the ceph\nvolume driver that ceph isn\u0027t supported on the host if \n1) rbd.exe isn\u0027t available due to \n2) ceph pacific is the min required version.\n\nYou would then have to update the volume driver to look\nfor the specific setting/value returned to check for\ncompatibility and then have the ceph driver log a specific\nexception saying that attachment isn\u0027t possible on this host due to\nceph not being supported on the host, or rbd.exe not existing.","commit_id":"0da347250700d78f72e190f835295cf72aace48d"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"7eefee013d6a697b6a9fb3f8e2dc7fa4b3f1bc70","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":58,"context_line":"            self._rbd_available \u003d False"},{"line_number":59,"context_line":"            LOG.warning(\"rbd.exe is not available.\")"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _ensure_rbd_available(self):"},{"line_number":62,"context_line":"        if not self._rbd_available:"},{"line_number":63,"context_line":"            msg \u003d _(\"rbd.exe is not available.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"6c5d88d2_0eea2d1b","line":60,"in_reply_to":"1c9a102f_f30abd43","updated":"2020-12-03 10:17:31.000000000","message":"I\u0027ve updated the patch to include the rbd version in the connector properties dict. It\u0027s part of a mixin class so that we avoid duplicating code. The Linux rbd connector was also updated to use it.","commit_id":"0da347250700d78f72e190f835295cf72aace48d"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"6f31b07d09a27e6551e64b354010a92b0ef2c230","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":58,"context_line":"            self._rbd_available \u003d False"},{"line_number":59,"context_line":"            LOG.warning(\"rbd.exe is not available.\")"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _ensure_rbd_available(self):"},{"line_number":62,"context_line":"        if not self._rbd_available:"},{"line_number":63,"context_line":"            msg \u003d _(\"rbd.exe is not available.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"1c9a102f_f30abd43","line":60,"in_reply_to":"cd428700_58c66262","updated":"2020-12-03 07:19:25.000000000","message":"Makes sense. Just for the record, Ceph \u003c 16 (Pacific) won\u0027t even compile for Windows.\n\nWe can include the Ceph version in the get_connector_properties dict. I can add it to the Linux connector as well. What\u0027s nice is that we don\u0027t have to wait for the Cinder change since this new version field will be optional in order to maintain backwards compatibility.","commit_id":"0da347250700d78f72e190f835295cf72aace48d"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"c9347b349c71d19d867d886ad4460f22a5c0ee10","unresolved":true,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _wait_for_volume(self, connection_properties):"},{"line_number":131,"context_line":"        \"\"\"Wait for the specified volume to become accessible.\"\"\""},{"line_number":132,"context_line":"        for attempt in range(self.device_scan_attempts):"},{"line_number":133,"context_line":"            rbd_dev_path \u003d self.get_device_name("},{"line_number":134,"context_line":"                connection_properties, expect\u003dFalse)"},{"line_number":135,"context_line":"            if rbd_dev_path:"}],"source_content_type":"text/x-python","patch_set":6,"id":"b4b46c24_2e1edcde","line":132,"updated":"2020-12-02 15:20:55.000000000","message":"You probably want to use loopingcall here to avoid using time.sleep, which has caused problems in the past.\n\nhttps://github.com/openstack/os-brick/blob/master/os_brick/initiator/connectors/fibre_channel.py#L222-L248","commit_id":"0da347250700d78f72e190f835295cf72aace48d"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"7eefee013d6a697b6a9fb3f8e2dc7fa4b3f1bc70","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _wait_for_volume(self, connection_properties):"},{"line_number":131,"context_line":"        \"\"\"Wait for the specified volume to become accessible.\"\"\""},{"line_number":132,"context_line":"        for attempt in range(self.device_scan_attempts):"},{"line_number":133,"context_line":"            rbd_dev_path \u003d self.get_device_name("},{"line_number":134,"context_line":"                connection_properties, expect\u003dFalse)"},{"line_number":135,"context_line":"            if rbd_dev_path:"}],"source_content_type":"text/x-python","patch_set":6,"id":"021c81a7_31e97219","line":132,"in_reply_to":"3febae08_baf371b3","updated":"2020-12-03 10:17:31.000000000","message":"I\u0027ve replaced time.sleep with the loopingcall approach.","commit_id":"0da347250700d78f72e190f835295cf72aace48d"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"6f31b07d09a27e6551e64b354010a92b0ef2c230","unresolved":true,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _wait_for_volume(self, connection_properties):"},{"line_number":131,"context_line":"        \"\"\"Wait for the specified volume to become accessible.\"\"\""},{"line_number":132,"context_line":"        for attempt in range(self.device_scan_attempts):"},{"line_number":133,"context_line":"            rbd_dev_path \u003d self.get_device_name("},{"line_number":134,"context_line":"                connection_properties, expect\u003dFalse)"},{"line_number":135,"context_line":"            if rbd_dev_path:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3febae08_baf371b3","line":132,"in_reply_to":"b4b46c24_2e1edcde","updated":"2020-12-03 07:19:25.000000000","message":"Thanks for the suggestion. I guess most time.sleep issues are related to unit tests using the unstubbed function.","commit_id":"0da347250700d78f72e190f835295cf72aace48d"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"f36ce4e140ace95926c1d730e1ade8b6e0ef3d79","unresolved":true,"context_lines":[{"line_number":59,"context_line":"            self._rbd_available \u003d False"},{"line_number":60,"context_line":"            LOG.warning(\"rbd.exe is not available.\")"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _ensure_rbd_available(self):"},{"line_number":63,"context_line":"        if not self._rbd_available:"},{"line_number":64,"context_line":"            msg \u003d _(\"rbd.exe is not available.\")"},{"line_number":65,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"c092e3d7_b510e6e6","line":62,"range":{"start_line":62,"start_character":8,"end_line":62,"end_character":29},"updated":"2020-12-04 15:01:36.000000000","message":"Why not to call it in __init__ just once instead of calling it almost in the each method","commit_id":"57214b035804da636cb5c3f9ad40cfba2967e232"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"6cae85bdc509f96afba2a612527c12f1b44debfd","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            self._rbd_available \u003d False"},{"line_number":60,"context_line":"            LOG.warning(\"rbd.exe is not available.\")"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _ensure_rbd_available(self):"},{"line_number":63,"context_line":"        if not self._rbd_available:"},{"line_number":64,"context_line":"            msg \u003d _(\"rbd.exe is not available.\")"},{"line_number":65,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"d2716bbd_f1858c53","line":62,"range":{"start_line":62,"start_character":8,"end_line":62,"end_character":29},"in_reply_to":"4635727f_98c1c45b","updated":"2020-12-07 10:31:19.000000000","message":"Done","commit_id":"57214b035804da636cb5c3f9ad40cfba2967e232"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"a2860db22b233ec41d810556b237a11e1902dbb9","unresolved":true,"context_lines":[{"line_number":59,"context_line":"            self._rbd_available \u003d False"},{"line_number":60,"context_line":"            LOG.warning(\"rbd.exe is not available.\")"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _ensure_rbd_available(self):"},{"line_number":63,"context_line":"        if not self._rbd_available:"},{"line_number":64,"context_line":"            msg \u003d _(\"rbd.exe is not available.\")"},{"line_number":65,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"4635727f_98c1c45b","line":62,"range":{"start_line":62,"start_character":8,"end_line":62,"end_character":29},"in_reply_to":"47738380_d8e5f9aa","updated":"2020-12-04 15:28:32.000000000","message":"Actually nevermind, those Hyper-V Nova volume drivers will instantiate the os-brick connectors only when actually being used, so there\u0027s no reason why we can\u0027t throw an exception in __init__ if rbd isn\u0027t available.\n\nhttps://github.com/openstack/nova/blob/22.0.0/nova/virt/hyperv/volumeops.py#L204-L228\n\nThanks a lot for bringing this up!","commit_id":"57214b035804da636cb5c3f9ad40cfba2967e232"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"28e2a2b43d54fb0d82c96984f537bda0f990eb43","unresolved":true,"context_lines":[{"line_number":59,"context_line":"            self._rbd_available \u003d False"},{"line_number":60,"context_line":"            LOG.warning(\"rbd.exe is not available.\")"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _ensure_rbd_available(self):"},{"line_number":63,"context_line":"        if not self._rbd_available:"},{"line_number":64,"context_line":"            msg \u003d _(\"rbd.exe is not available.\")"},{"line_number":65,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"47738380_d8e5f9aa","line":62,"range":{"start_line":62,"start_character":8,"end_line":62,"end_character":29},"in_reply_to":"c092e3d7_b510e6e6","updated":"2020-12-04 15:24:00.000000000","message":"I wanted to allow initializing the RBD connector even if it\u0027s unsupported, failing only when certain operations are requested. The reason is that the Nova Hyper-V driver is re-using the connectors, initializing them just once: https://github.com/openstack/nova/blob/22.0.0/nova/virt/hyperv/volumeops.py#L47-L49\n\nWe did that mostly because some of the Windows connectors are using various WMI operations during the initialization steps (e.g. validating iSCSI connectors), which can be rather time consuming, especially when attaching multiple volumes at once.\n\nIt\u0027s true that having to call \"_ensure_rbd_available\" all the time is rather inconvenient so I guess we may reconsider this approach and update the Hyper-V Nova driver to avoid caching os-brick connectors.","commit_id":"57214b035804da636cb5c3f9ad40cfba2967e232"}],"os_brick/tests/windows/test_rbd.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"710fd4c01aef55cba12b6309eb3990cde1c43775","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    @ddt.data(True, False)"},{"line_number":136,"context_line":"    @mock.patch.object(rbd.WindowsRBDConnector, \u0027_ensure_rbd_available\u0027)"},{"line_number":137,"context_line":"    @mock.patch.object(rbd.WindowsRBDConnector, \u0027get_device_name\u0027)"},{"line_number":138,"context_line":"    def test_disconnect_volume(self, force, mock_get_dev_name, mock_ensure_rbd):"},{"line_number":139,"context_line":"        mock_get_dev_name.return_value \u003d self._fake_dev_name"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        self._conn.disconnect_volume(self._conn_props, force\u003dforce)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fffc6b78_9b893e28","line":138,"updated":"2020-11-20 13:51:31.000000000","message":"pep8: E501 line too long (80 \u003e 79 characters)","commit_id":"9892c720fe0f15eafb9fff4b5b1dcfcfb3405845"}]}
