)]}'
{"os_brick/encryptors/luks.py":[{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"993714050a56d87dfa76aa13aea988154c734cff","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        passphrase \u003d self._get_passphrase(key)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        try:"},{"line_number":150,"context_line":"            if not is_luks(self._root_helper,"},{"line_number":151,"context_line":"                           self.dev_path,"},{"line_number":152,"context_line":"                           execute\u003dself._execute):"},{"line_number":153,"context_line":"                # the device has never been formatted; format it and try again"},{"line_number":154,"context_line":"                LOG.info(\"%s is not a valid LUKS device;\""},{"line_number":155,"context_line":"                         \" formatting device for first use\","},{"line_number":156,"context_line":"                         self.dev_path)"},{"line_number":157,"context_line":"                self._format_volume(passphrase, **kwargs)"},{"line_number":158,"context_line":"            self._open_volume(passphrase, **kwargs)"},{"line_number":159,"context_line":"        except putils.ProcessExecutionError as e:"},{"line_number":160,"context_line":"            if e.exit_code \u003d\u003d 1:"},{"line_number":161,"context_line":"                LOG.warning(\"stderr : %s\", e.stderr)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa0c359_e8ef18ae","line":158,"range":{"start_line":150,"start_character":1,"end_line":158,"end_character":51},"updated":"2018-02-05 11:37:43.000000000","message":"just one question here: if open_volume fails and the we check is_luks , and directly at start if we do is_luks, Log message prints the same right? how does it fix the problem?","commit_id":"0fe93b3d66c567d00633ad9570a57efe9b549c22"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"993714050a56d87dfa76aa13aea988154c734cff","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                self._format_volume(passphrase, **kwargs)"},{"line_number":158,"context_line":"            self._open_volume(passphrase, **kwargs)"},{"line_number":159,"context_line":"        except putils.ProcessExecutionError as e:"},{"line_number":160,"context_line":"            if e.exit_code \u003d\u003d 1:"},{"line_number":161,"context_line":"                LOG.warning(\"stderr : %s\", e.stderr)"},{"line_number":162,"context_line":"                self._open_volume(passphrase, **kwargs)"},{"line_number":163,"context_line":"            elif e.exit_code \u003d\u003d 2:"},{"line_number":164,"context_line":"                # NOTE(lyarwood): Workaround bug#1633518 by replacing any"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa0c359_88bbf4e3","line":161,"range":{"start_line":160,"start_character":1,"end_line":161,"end_character":52},"updated":"2018-02-05 11:37:43.000000000","message":"even if exit code 1, you want to open the volume and proceed? or raise exception","commit_id":"0fe93b3d66c567d00633ad9570a57efe9b549c22"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c8d62eb95cf19ce5336877cbec541c9cd0918b75","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        # if the device is a LUKS partition and non-zero if not"},{"line_number":33,"context_line":"        if execute is None:"},{"line_number":34,"context_line":"            execute \u003d priv_rootwrap.execute"},{"line_number":35,"context_line":"        execute(\u0027cryptsetup\u0027, \u0027isLuks\u0027, \u0027--verbose\u0027, device,"},{"line_number":36,"context_line":"                run_as_root\u003dTrue, root_helper\u003droot_helper,"},{"line_number":37,"context_line":"                check_exit_code\u003dTrue)"},{"line_number":38,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_2df7cb61","side":"PARENT","line":35,"range":{"start_line":35,"start_character":40,"end_line":35,"end_character":51},"updated":"2018-02-09 12:16:48.000000000","message":"While --verbose isn\u0027t required for this command I\u0027d rather leave it in and focus on the rework of the attach_volume logic below.","commit_id":"47f74d42f7f9e90be6ac966b445d8724812d1ad3"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c8d62eb95cf19ce5336877cbec541c9cd0918b75","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        passphrase \u003d self._get_passphrase(key)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        try:"},{"line_number":150,"context_line":"            if not is_luks(self._root_helper,"},{"line_number":151,"context_line":"                           self.dev_path,"},{"line_number":152,"context_line":"                           execute\u003dself._execute):"},{"line_number":153,"context_line":"                # the device has never been formatted; format it and try again"},{"line_number":154,"context_line":"                LOG.info(\"%s is not a valid LUKS device;\""},{"line_number":155,"context_line":"                         \" formatting device for first use\","}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_add99bf3","line":152,"range":{"start_line":150,"start_character":0,"end_line":152,"end_character":50},"updated":"2018-02-09 12:16:48.000000000","message":"supernit - this should fit on 2 lines instead of 3?","commit_id":"23e59cebe5b940e4bb533f815bc30b2a35744f05"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c8d62eb95cf19ce5336877cbec541c9cd0918b75","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                LOG.info(\"%s is not a valid LUKS device;\""},{"line_number":155,"context_line":"                         \" formatting device for first use\","},{"line_number":156,"context_line":"                         self.dev_path)"},{"line_number":157,"context_line":"                self._format_volume(passphrase, **kwargs)"},{"line_number":158,"context_line":"            self._open_volume(passphrase, **kwargs)"},{"line_number":159,"context_line":"        except putils.ProcessExecutionError as e:"},{"line_number":160,"context_line":"            if e.exit_code \u003d\u003d 2:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_8ddcdfe4","line":157,"range":{"start_line":157,"start_character":16,"end_line":157,"end_character":57},"updated":"2018-02-09 12:16:48.000000000","message":"OT - I\u0027d still like os-brick to remove this and for c-vol to actually provide pre-formatted LUKS volumes.","commit_id":"23e59cebe5b940e4bb533f815bc30b2a35744f05"}],"os_brick/tests/encryptors/test_luks.py":[{"author":{"_account_id":19457,"name":"aditi sharma","email":"adi.sky17@gmail.com","username":"aditi"},"change_message_id":"39fce054e69e1a0c960e76ce95280d9e91d80540","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        ], any_order\u003dFalse)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    @mock.patch(\u0027os_brick.executor.Executor._execute\u0027)"},{"line_number":141,"context_line":"    def test_attach_volume_fail(self, mock_execute):"},{"line_number":142,"context_line":"        fake_key \u003d \u0027ea6c2e1b8f7f4f84ae3560116d659ba2\u0027"},{"line_number":143,"context_line":"        self.encryptor._get_key \u003d mock.MagicMock()"},{"line_number":144,"context_line":"        self.encryptor._get_key.return_value \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"5f93b717_3e41e1a9","side":"PARENT","line":141,"updated":"2018-02-02 06:54:01.000000000","message":"please do not remove any test case","commit_id":"47f74d42f7f9e90be6ac966b445d8724812d1ad3"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"993714050a56d87dfa76aa13aea988154c734cff","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            test_cryptsetup.fake__get_key(None, fake_key))"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        mock_execute.side_effect \u003d ["},{"line_number":141,"context_line":"            mock.DEFAULT,  # isLuks"},{"line_number":142,"context_line":"            putils.ProcessExecutionError(exit_code\u003d3),  # luksOpen"},{"line_number":143,"context_line":"        ]"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        self.assertRaises(putils.ProcessExecutionError,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa0c359_48e64ceb","line":142,"range":{"start_line":141,"start_character":3,"end_line":142,"end_character":66},"updated":"2018-02-05 11:37:43.000000000","message":"i think this case should be same, if isLuks passes , and LuksOpen fails with exit code 1, attach volume should fail?","commit_id":"0fe93b3d66c567d00633ad9570a57efe9b549c22"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c8d62eb95cf19ce5336877cbec541c9cd0918b75","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.encryptor._get_key \u003d mock.MagicMock()"},{"line_number":105,"context_line":"        self.encryptor._get_key.return_value \u003d ("},{"line_number":106,"context_line":"            test_cryptsetup.fake__get_key(None, fake_key))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        mock_execute.side_effect \u003d ["},{"line_number":109,"context_line":"            putils.ProcessExecutionError(exit_code\u003d1),  # luksOpen"},{"line_number":110,"context_line":"            putils.ProcessExecutionError(exit_code\u003d1),  # isLuks"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_edec8390","side":"PARENT","line":107,"updated":"2018-02-09 12:16:48.000000000","message":"nit - don\u0027t remove whitespace.","commit_id":"47f74d42f7f9e90be6ac966b445d8724812d1ad3"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c8d62eb95cf19ce5336877cbec541c9cd0918b75","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        ]"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        self.encryptor.attach_volume(None)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        mock_execute.assert_has_calls(["},{"line_number":119,"context_line":"            mock.call(\u0027cryptsetup\u0027, \u0027luksOpen\u0027, \u0027--key-file\u003d-\u0027, self.dev_path,"},{"line_number":120,"context_line":"                      self.dev_name, process_input\u003dfake_key,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_8d05bf48","side":"PARENT","line":117,"updated":"2018-02-09 12:16:48.000000000","message":"nit - don\u0027t remove whitespace.","commit_id":"47f74d42f7f9e90be6ac966b445d8724812d1ad3"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c8d62eb95cf19ce5336877cbec541c9cd0918b75","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        self.assertRaises(putils.ProcessExecutionError,"},{"line_number":153,"context_line":"                          self.encryptor.attach_volume, None)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        mock_execute.assert_has_calls(["},{"line_number":156,"context_line":"            mock.call(\u0027cryptsetup\u0027, \u0027luksOpen\u0027, \u0027--key-file\u003d-\u0027, self.dev_path,"},{"line_number":157,"context_line":"                      self.dev_name, process_input\u003dfake_key,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_4dfb3746","side":"PARENT","line":154,"updated":"2018-02-09 12:16:48.000000000","message":"nit - don\u0027t remove whitespace.","commit_id":"47f74d42f7f9e90be6ac966b445d8724812d1ad3"}]}
