)]}'
{"ironic_python_agent/hardware.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"839e0c66cb91d465c2a8c52698a36851e934e6db","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    lines \u003d out.splitlines()"},{"line_number":155,"context_line":"    # the first line contains the md device itself"},{"line_number":156,"context_line":"    for line in lines[1:]:"},{"line_number":157,"context_line":"        match \u003d re.search(r\u0027UUID : ([a-f0-9:]+)\u0027, line)"},{"line_number":158,"context_line":"        if match:"},{"line_number":159,"context_line":"            LOG.info(\"Found md UUID \" + match.group(1))"},{"line_number":160,"context_line":"            return match.group(1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_1d970148","line":157,"updated":"2020-09-29 14:21:01.000000000","message":"nit: is it always the same whitespace? or do we need something like \\s+ before and after : ?\n\nalso maybe explicitly look for \"Array UUID\"?","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"eedc70722fd8ea1394ebeef44f0dc42508639430","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    lines \u003d out.splitlines()"},{"line_number":155,"context_line":"    # the first line contains the md device itself"},{"line_number":156,"context_line":"    for line in lines[1:]:"},{"line_number":157,"context_line":"        match \u003d re.search(r\u0027UUID : ([a-f0-9:]+)\u0027, line)"},{"line_number":158,"context_line":"        if match:"},{"line_number":159,"context_line":"            LOG.info(\"Found md UUID \" + match.group(1))"},{"line_number":160,"context_line":"            return match.group(1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_38465352","line":157,"in_reply_to":"9f560f44_1d970148","updated":"2020-09-29 15:10:54.000000000","message":"Should be ok for the whitespaces:\nhttps://github.com/neilbrown/mdadm/blob/master/super1.c#L342\n\nAs for extending the regex:\n\u0027mdadm --detail\u0027 only has \u0027UUID\u0027, only \u0027mdadm --examine\u0027 has \u0027Array UUID\u0027.","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"839e0c66cb91d465c2a8c52698a36851e934e6db","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    for line in lines[1:]:"},{"line_number":157,"context_line":"        match \u003d re.search(r\u0027UUID : ([a-f0-9:]+)\u0027, line)"},{"line_number":158,"context_line":"        if match:"},{"line_number":159,"context_line":"            LOG.info(\"Found md UUID \" + match.group(1))"},{"line_number":160,"context_line":"            return match.group(1)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_7d855d0a","line":159,"updated":"2020-09-29 14:21:01.000000000","message":"s/info/debug/ + extend with more context or remove completely","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"eedc70722fd8ea1394ebeef44f0dc42508639430","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    for line in lines[1:]:"},{"line_number":157,"context_line":"        match \u003d re.search(r\u0027UUID : ([a-f0-9:]+)\u0027, line)"},{"line_number":158,"context_line":"        if match:"},{"line_number":159,"context_line":"            LOG.info(\"Found md UUID \" + match.group(1))"},{"line_number":160,"context_line":"            return match.group(1)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_3872d313","line":159,"in_reply_to":"9f560f44_7d855d0a","updated":"2020-09-29 15:10:54.000000000","message":"Done","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"839e0c66cb91d465c2a8c52698a36851e934e6db","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    md_uuid \u003d _get_md_uuid(raid_device)"},{"line_number":176,"context_line":"    if not md_uuid:"},{"line_number":177,"context_line":"        return []"},{"line_number":178,"context_line":"    LOG.info(\u0027%s has UUID %s\u0027, raid_device, md_uuid)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    component_devices \u003d []"},{"line_number":181,"context_line":"    block_devices \u003d list_all_block_devices()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_5d8a191a","line":178,"updated":"2020-09-29 14:21:01.000000000","message":"s/info/debug/","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"eedc70722fd8ea1394ebeef44f0dc42508639430","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    md_uuid \u003d _get_md_uuid(raid_device)"},{"line_number":176,"context_line":"    if not md_uuid:"},{"line_number":177,"context_line":"        return []"},{"line_number":178,"context_line":"    LOG.info(\u0027%s has UUID %s\u0027, raid_device, md_uuid)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    component_devices \u003d []"},{"line_number":181,"context_line":"    block_devices \u003d list_all_block_devices()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_58f06767","line":178,"in_reply_to":"9f560f44_5d8a191a","updated":"2020-09-29 15:10:54.000000000","message":"Done","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"37618c9c4bbeaaa0de4bbf872f2b6e79ee123626","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    component_devices \u003d []"},{"line_number":181,"context_line":"    block_devices \u003d list_all_block_devices()"},{"line_number":182,"context_line":"    block_devices.extend(list_all_block_devices(block_type\u003d\u0027part\u0027,"},{"line_number":183,"context_line":"                                                ignore_raid\u003dTrue))"},{"line_number":184,"context_line":"    for bdev in block_devices:"},{"line_number":185,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_061d04be","line":182,"updated":"2020-09-28 17:55:12.000000000","message":"One note worth considering, raid devices don\u0027t have to only be in partitions... but if memory serves it is a lot harder to get the kernel to recognize whole devices.","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"d267ae402b8c7eec821f9a3558fd69496ec150ba","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    component_devices \u003d []"},{"line_number":181,"context_line":"    block_devices \u003d list_all_block_devices()"},{"line_number":182,"context_line":"    block_devices.extend(list_all_block_devices(block_type\u003d\u0027part\u0027,"},{"line_number":183,"context_line":"                                                ignore_raid\u003dTrue))"},{"line_number":184,"context_line":"    for bdev in block_devices:"},{"line_number":185,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_26be4864","line":182,"in_reply_to":"9f560f44_061d04be","updated":"2020-09-28 18:02:11.000000000","message":"Right, but the proposed code does consider both, no?","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"416c0d802302ba83a0ae0958eb15c28ca6be7da4","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    component_devices \u003d []"},{"line_number":181,"context_line":"    block_devices \u003d list_all_block_devices()"},{"line_number":182,"context_line":"    block_devices.extend(list_all_block_devices(block_type\u003d\u0027part\u0027,"},{"line_number":183,"context_line":"                                                ignore_raid\u003dTrue))"},{"line_number":184,"context_line":"    for bdev in block_devices:"},{"line_number":185,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_dd42a90d","line":182,"in_reply_to":"9f560f44_26be4864","updated":"2020-09-29 14:13:15.000000000","message":"oh, right! I didn\u0027t see the extend!","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"839e0c66cb91d465c2a8c52698a36851e934e6db","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":189,"context_line":"            if \"No md superblock detected\" in str(e):"},{"line_number":190,"context_line":"                # actually not a component device"},{"line_number":191,"context_line":"                LOG.info(\u0027Not a component device %s\u0027, bdev.name)"},{"line_number":192,"context_line":"                continue"},{"line_number":193,"context_line":"            else:"},{"line_number":194,"context_line":"                msg \u003d \"Failed to examine device {}: {}\".format("}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_bd7ff515","line":191,"updated":"2020-09-29 14:21:01.000000000","message":"s/info/debug/","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"eedc70722fd8ea1394ebeef44f0dc42508639430","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":189,"context_line":"            if \"No md superblock detected\" in str(e):"},{"line_number":190,"context_line":"                # actually not a component device"},{"line_number":191,"context_line":"                LOG.info(\u0027Not a component device %s\u0027, bdev.name)"},{"line_number":192,"context_line":"                continue"},{"line_number":193,"context_line":"            else:"},{"line_number":194,"context_line":"                msg \u003d \"Failed to examine device {}: {}\".format("}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_98eaff71","line":191,"in_reply_to":"9f560f44_bd7ff515","updated":"2020-09-29 15:10:54.000000000","message":"Done","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"839e0c66cb91d465c2a8c52698a36851e934e6db","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            else:"},{"line_number":194,"context_line":"                msg \u003d \"Failed to examine device {}: {}\".format("},{"line_number":195,"context_line":"                    bdev.name, e)"},{"line_number":196,"context_line":"                LOG.warning(msg)"},{"line_number":197,"context_line":"                continue"},{"line_number":198,"context_line":"        lines \u003d out.splitlines()"},{"line_number":199,"context_line":"        for line in lines:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_9d84b10d","line":196,"updated":"2020-09-29 14:21:01.000000000","message":"nit: don\u0027t use format with logging, but rather\n\n LOG.warning(\"Failed to.. %s: %s\u0027, bdev.name, e)","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"eedc70722fd8ea1394ebeef44f0dc42508639430","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            else:"},{"line_number":194,"context_line":"                msg \u003d \"Failed to examine device {}: {}\".format("},{"line_number":195,"context_line":"                    bdev.name, e)"},{"line_number":196,"context_line":"                LOG.warning(msg)"},{"line_number":197,"context_line":"                continue"},{"line_number":198,"context_line":"        lines \u003d out.splitlines()"},{"line_number":199,"context_line":"        for line in lines:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_f8fe9b37","line":196,"in_reply_to":"9f560f44_9d84b10d","updated":"2020-09-29 15:10:54.000000000","message":"Done","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"839e0c66cb91d465c2a8c52698a36851e934e6db","unresolved":false,"context_lines":[{"line_number":197,"context_line":"                continue"},{"line_number":198,"context_line":"        lines \u003d out.splitlines()"},{"line_number":199,"context_line":"        for line in lines:"},{"line_number":200,"context_line":"            if re.search(rf\"{md_uuid}\", line):"},{"line_number":201,"context_line":"                component_devices.append(bdev.name)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    LOG.info(\u0027Found component devices for %s:\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_fd784d2d","line":200,"updated":"2020-09-29 14:21:01.000000000","message":"as much as I like the 1st usage of formatted strings, isn\u0027t it just\n\n if md_uuid in line:\n\n?","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"eedc70722fd8ea1394ebeef44f0dc42508639430","unresolved":false,"context_lines":[{"line_number":197,"context_line":"                continue"},{"line_number":198,"context_line":"        lines \u003d out.splitlines()"},{"line_number":199,"context_line":"        for line in lines:"},{"line_number":200,"context_line":"            if re.search(rf\"{md_uuid}\", line):"},{"line_number":201,"context_line":"                component_devices.append(bdev.name)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    LOG.info(\u0027Found component devices for %s:\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_38f9334e","line":200,"in_reply_to":"9f560f44_fd784d2d","updated":"2020-09-29 15:10:54.000000000","message":"Yes, at this point was too much into regex\u0027s, it seems :)\nFixed.","commit_id":"e2beaf31527ca3c218312f9e8d817f30dcba2832"}]}
