)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"be71327f38cdbc69c57d7dc5c51f48c561cab276","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Will Szumski \u003cwill@stackhpc.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-04-24 14:50:40 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Do not abort ata secure erase if security is in enabled state"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"At least in the case of INTEL SSDSC2BX016T4R drives, a \u0027hdparm"},{"line_number":10,"context_line":"--security-unlock\u0027 command does not remove the enabled line of the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9f6a8fd7_947fbe64","line":7,"updated":"2018-04-25 08:47:01.000000000","message":"Thanks for adding information about the security states here. It transformed the code from magic to something I can reason about (after reading http://www.admin-magazine.com/Archive/2014/19/Using-the-ATA-security-features-of-modern-hard-disks-and-SSDs).\n\nWould it make sense to add comments about the possible security states to various points in the function?\n\nI guess ideally the code would be designed as a state machine around the security state. That\u0027s a little out of scope here though.","commit_id":"eac915973696c20c0907cbf1d4ba338b0f3632c8"}],"ironic_python_agent/hardware.py":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"be71327f38cdbc69c57d7dc5c51f48c561cab276","unresolved":false,"context_lines":[{"line_number":888,"context_line":""},{"line_number":889,"context_line":"        return security_lines"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    def _ata_erase(self, block_device):"},{"line_number":892,"context_line":"        security_lines \u003d self._get_ata_security_lines(block_device)"},{"line_number":893,"context_line":""},{"line_number":894,"context_line":"        # If secure erase isn\u0027t supported return False so erase_block_device"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_34dfd269","line":891,"updated":"2018-04-25 08:47:01.000000000","message":"Is there a reputable \u0026 simple source of information about security states we could link to here for context?","commit_id":"eac915973696c20c0907cbf1d4ba338b0f3632c8"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"be71327f38cdbc69c57d7dc5c51f48c561cab276","unresolved":false,"context_lines":[{"line_number":897,"context_line":"        # secure erase presumably expect this to work)."},{"line_number":898,"context_line":"        if \u0027supported\u0027 not in security_lines:"},{"line_number":899,"context_line":"            return False"},{"line_number":900,"context_line":""},{"line_number":901,"context_line":"        if \u0027enabled\u0027 in security_lines:"},{"line_number":902,"context_line":"            # Attempt to unlock the drive in the event it has already been"},{"line_number":903,"context_line":"            # locked by a previous failed attempt."}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_3424b25d","line":900,"updated":"2018-04-25 08:47:01.000000000","message":"At this point, we could be SEC1,2,4,5,6","commit_id":"eac915973696c20c0907cbf1d4ba338b0f3632c8"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"be71327f38cdbc69c57d7dc5c51f48c561cab276","unresolved":false,"context_lines":[{"line_number":898,"context_line":"        if \u0027supported\u0027 not in security_lines:"},{"line_number":899,"context_line":"            return False"},{"line_number":900,"context_line":""},{"line_number":901,"context_line":"        if \u0027enabled\u0027 in security_lines:"},{"line_number":902,"context_line":"            # Attempt to unlock the drive in the event it has already been"},{"line_number":903,"context_line":"            # locked by a previous failed attempt."},{"line_number":904,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_74ca2aa1","line":901,"updated":"2018-04-25 08:47:01.000000000","message":"Implies SEC4, 5 or 6. Of these, 4 and 5 should allow an unlock, to transition to SEC5.","commit_id":"eac915973696c20c0907cbf1d4ba338b0f3632c8"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"be71327f38cdbc69c57d7dc5c51f48c561cab276","unresolved":false,"context_lines":[{"line_number":912,"context_line":"                                                   {\u0027name\u0027: block_device.name,"},{"line_number":913,"context_line":"                                                    \u0027err\u0027: e})"},{"line_number":914,"context_line":""},{"line_number":915,"context_line":"        if \u0027not locked\u0027 not in security_lines:"},{"line_number":916,"context_line":"            raise errors.BlockDeviceEraseError("},{"line_number":917,"context_line":"                (\u0027Block device {} already has a security password set\u0027"},{"line_number":918,"context_line":"                 ).format(block_device.name))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_b46202ad","line":915,"updated":"2018-04-25 08:47:01.000000000","message":"In SEC4.","commit_id":"eac915973696c20c0907cbf1d4ba338b0f3632c8"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"be71327f38cdbc69c57d7dc5c51f48c561cab276","unresolved":false,"context_lines":[{"line_number":917,"context_line":"                (\u0027Block device {} already has a security password set\u0027"},{"line_number":918,"context_line":"                 ).format(block_device.name))"},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"        if \u0027not frozen\u0027 not in security_lines:"},{"line_number":921,"context_line":"            raise errors.BlockDeviceEraseError("},{"line_number":922,"context_line":"                (\u0027Block device {} is frozen and cannot be erased\u0027"},{"line_number":923,"context_line":"                 ).format(block_device.name))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_7458eaf8","line":920,"updated":"2018-04-25 08:47:01.000000000","message":"In SEC6","commit_id":"eac915973696c20c0907cbf1d4ba338b0f3632c8"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"be71327f38cdbc69c57d7dc5c51f48c561cab276","unresolved":false,"context_lines":[{"line_number":921,"context_line":"            raise errors.BlockDeviceEraseError("},{"line_number":922,"context_line":"                (\u0027Block device {} is frozen and cannot be erased\u0027"},{"line_number":923,"context_line":"                 ).format(block_device.name))"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"        if \u0027not enabled\u0027 in security_lines:"},{"line_number":926,"context_line":"            try:"},{"line_number":927,"context_line":"                utils.execute(\u0027hdparm\u0027, \u0027--user-master\u0027, \u0027u\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_74db0a4e","line":924,"updated":"2018-04-25 08:47:01.000000000","message":"At this point, we could be in SEC1,2,5","commit_id":"eac915973696c20c0907cbf1d4ba338b0f3632c8"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"be71327f38cdbc69c57d7dc5c51f48c561cab276","unresolved":false,"context_lines":[{"line_number":922,"context_line":"                (\u0027Block device {} is frozen and cannot be erased\u0027"},{"line_number":923,"context_line":"                 ).format(block_device.name))"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"        if \u0027not enabled\u0027 in security_lines:"},{"line_number":926,"context_line":"            try:"},{"line_number":927,"context_line":"                utils.execute(\u0027hdparm\u0027, \u0027--user-master\u0027, \u0027u\u0027,"},{"line_number":928,"context_line":"                              \u0027--security-set-pass\u0027, \u0027NULL\u0027, block_device.name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_94101e02","line":925,"updated":"2018-04-25 08:47:01.000000000","message":"SEC1 or 2. Try to transition to SEC5 by disabling user password.","commit_id":"eac915973696c20c0907cbf1d4ba338b0f3632c8"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"be71327f38cdbc69c57d7dc5c51f48c561cab276","unresolved":false,"context_lines":[{"line_number":948,"context_line":""},{"line_number":949,"context_line":"        # Verify that security is now \u0027not enabled\u0027"},{"line_number":950,"context_line":"        security_lines \u003d self._get_ata_security_lines(block_device)"},{"line_number":951,"context_line":"        if \u0027not enabled\u0027 not in security_lines:"},{"line_number":952,"context_line":"            raise errors.BlockDeviceEraseError("},{"line_number":953,"context_line":"                (\u0027An unknown error occurred erasing block device {}\u0027"},{"line_number":954,"context_line":"                 ).format(block_device.name))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_54c92656","line":951,"updated":"2018-04-25 08:47:01.000000000","message":"Not SEC1 - fail","commit_id":"eac915973696c20c0907cbf1d4ba338b0f3632c8"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"be71327f38cdbc69c57d7dc5c51f48c561cab276","unresolved":false,"context_lines":[{"line_number":953,"context_line":"                (\u0027An unknown error occurred erasing block device {}\u0027"},{"line_number":954,"context_line":"                 ).format(block_device.name))"},{"line_number":955,"context_line":""},{"line_number":956,"context_line":"        return True"},{"line_number":957,"context_line":""},{"line_number":958,"context_line":"    def get_bmc_address(self):"},{"line_number":959,"context_line":"        \"\"\"Attempt to detect BMC IP address"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_74822a02","line":956,"updated":"2018-04-25 08:47:01.000000000","message":"SEC1","commit_id":"eac915973696c20c0907cbf1d4ba338b0f3632c8"}],"ironic_python_agent/tests/unit/test_hardware.py":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"6a79c9cbc243d3aea2532cd3bce3b075f916aafc","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"        mocked_execute.side_effect \u003d ["},{"line_number":1441,"context_line":"            (hdparm_output, \u0027\u0027),"},{"line_number":1442,"context_line":"            processutils.ProcessExecutionError(),  # --security-unlock failure"},{"line_number":1443,"context_line":"            (hdparm_output, \u0027\u0027)"},{"line_number":1444,"context_line":"        ]"},{"line_number":1445,"context_line":""},{"line_number":1446,"context_line":"        block_device \u003d hardware.BlockDevice(\u0027/dev/sda\u0027, \u0027big\u0027, 1073741824,"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_957fba64","line":1443,"updated":"2018-04-03 15:32:00.000000000","message":"This line is not required.","commit_id":"01700fd75d592c7dddadf9452832827768ca7c23"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"2e7ee055d15d3657b0a59a779e9546bb773018db","unresolved":false,"context_lines":[{"line_number":1439,"context_line":""},{"line_number":1440,"context_line":"        mocked_execute.side_effect \u003d ["},{"line_number":1441,"context_line":"            (hdparm_output, \u0027\u0027),"},{"line_number":1442,"context_line":"            processutils.ProcessExecutionError(),  # --security-unlock failure"},{"line_number":1443,"context_line":"        ]"},{"line_number":1444,"context_line":""},{"line_number":1445,"context_line":"        block_device \u003d hardware.BlockDevice(\u0027/dev/sda\u0027, \u0027big\u0027, 1073741824,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_e6368e03","line":1442,"updated":"2018-04-03 17:20:25.000000000","message":"Thanks!","commit_id":"4f080c61a5b1df5255102f6b2366e9171e09955c"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"5e769a4a8bfb206a828b253d1040a661a8f95a2b","unresolved":false,"context_lines":[{"line_number":1507,"context_line":"                      \u0027/dev/sda\u0027),"},{"line_number":1508,"context_line":"            mock.call(\u0027hdparm\u0027, \u0027--user-master\u0027, \u0027u\u0027, \u0027--security-erase\u0027,"},{"line_number":1509,"context_line":"                      \u0027NULL\u0027, \u0027/dev/sda\u0027),"},{"line_number":1510,"context_line":"        ]"},{"line_number":1511,"context_line":""},{"line_number":1512,"context_line":"        all_calls \u003d mocked_execute.mock_calls"},{"line_number":1513,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_d5e212d5","line":1510,"updated":"2018-04-03 15:51:49.000000000","message":"We could make this a little more clear by mocking out the call to _get_ata_security_lines(), and setting the side effect for that appropriately. I guess we\u0027d need to do that for all relevant tests here for consistency though, which could end up as quite a large change.","commit_id":"4f080c61a5b1df5255102f6b2366e9171e09955c"}]}
