)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c6f86432eb788af67b74fedd32ce84e2610182fe","unresolved":true,"context_lines":[{"line_number":16,"context_line":"in order to prevent consideration of content which"},{"line_number":17,"context_line":"should not be leveraged."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Depends-On: https://review.opendev.org/c/openstack/ironic/+/783722"},{"line_number":20,"context_line":"Change-Id: If2d5c6f4815c9e42798a2d96d59015e1b1dbd457"},{"line_number":21,"context_line":"Story: 2008749"},{"line_number":22,"context_line":"Task: 42108"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"0c9068b3_4d334652","line":19,"updated":"2021-03-30 10:17:08.000000000","message":"The dependency must have stayed, I\u0027m not sure we can repair ironic without merging both now :(","commit_id":"d39d0cb329ed02defc863f059d9e084c15e7c9c3"}],"ironic_python_agent/utils.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a7c1ddb571c03dee8532692f86262731c8bd537e","unresolved":true,"context_lines":[{"line_number":114,"context_line":"    :returns: a string containing the filename of the virtual media device"},{"line_number":115,"context_line":"    \"\"\""},{"line_number":116,"context_line":"    sysfs_device_models \u003d glob.glob(\"/sys/class/block/*/device/model\")"},{"line_number":117,"context_line":"    vmedia_device_model \u003d \"virtual media\""},{"line_number":118,"context_line":"    for model_file in sysfs_device_models:"},{"line_number":119,"context_line":"        try:"},{"line_number":120,"context_line":"            with open(model_file) as model_file_fobj:"}],"source_content_type":"text/x-python","patch_set":1,"id":"8a6b9f66_ab1035d1","line":117,"updated":"2021-03-29 17:22:31.000000000","message":"This is probably enough without additional checks","commit_id":"0288407d72a7d48d74e71ef8be05ecd09d2c1ed4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3f202618bd70318d94b4b053b9d4d6ac2c48205e","unresolved":true,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # explicitly call the check as there is the legacy get device code"},{"line_number":177,"context_line":"    # which can be invoked."},{"line_number":178,"context_line":"    if not _check_vmedia_device(vmedia_device_file):"},{"line_number":179,"context_line":"        # If the device is not valid, return an empty dictionary."},{"line_number":180,"context_line":"        return {}"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"06a76d4a_4b39caae","line":178,"updated":"2021-03-29 17:10:50.000000000","message":"nit: move under the \u0027if\u0027 block","commit_id":"0288407d72a7d48d74e71ef8be05ecd09d2c1ed4"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"be2a9ce124592a6385d62d03cc0e4e746c1618fb","unresolved":true,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # explicitly call the check as there is the legacy get device code"},{"line_number":177,"context_line":"    # which can be invoked."},{"line_number":178,"context_line":"    if not _check_vmedia_device(vmedia_device_file):"},{"line_number":179,"context_line":"        # If the device is not valid, return an empty dictionary."},{"line_number":180,"context_line":"        return {}"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"6513e544_5f50e26b","line":178,"in_reply_to":"06a76d4a_4b39caae","updated":"2021-03-29 17:19:37.000000000","message":"That is incorrect. There are two paths. The first is if _find_vmedia_devices_by_labels fails. if it does fail, then _get_vmedia_device() gets invoked. So it should be a separate conditional check.","commit_id":"0288407d72a7d48d74e71ef8be05ecd09d2c1ed4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a7c1ddb571c03dee8532692f86262731c8bd537e","unresolved":true,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # explicitly call the check as there is the legacy get device code"},{"line_number":177,"context_line":"    # which can be invoked."},{"line_number":178,"context_line":"    if not _check_vmedia_device(vmedia_device_file):"},{"line_number":179,"context_line":"        # If the device is not valid, return an empty dictionary."},{"line_number":180,"context_line":"        return {}"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"c41e4973_df3665b5","line":178,"in_reply_to":"6513e544_5f50e26b","updated":"2021-03-29 17:22:31.000000000","message":"On the other code path you\u0027ve already checked the device correctness. This check is only necessary `if not vmedia_device_file`. And IIRC  _get_vmedia_device() explicitly relies on some virtual media properties.","commit_id":"0288407d72a7d48d74e71ef8be05ecd09d2c1ed4"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"3d7abc88278b012ace12ba8094894cdafcb42ce3","unresolved":true,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # explicitly call the check as there is the legacy get device code"},{"line_number":177,"context_line":"    # which can be invoked."},{"line_number":178,"context_line":"    if not _check_vmedia_device(vmedia_device_file):"},{"line_number":179,"context_line":"        # If the device is not valid, return an empty dictionary."},{"line_number":180,"context_line":"        return {}"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"e5283c6d_b2f0dbcf","line":178,"in_reply_to":"c41e4973_df3665b5","updated":"2021-03-29 18:13:53.000000000","message":"Ahh, yes. it just looks for \"virtual media\" in device model strings, but still good to check. Changing.","commit_id":"0288407d72a7d48d74e71ef8be05ecd09d2c1ed4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3f202618bd70318d94b4b053b9d4d6ac2c48205e","unresolved":true,"context_lines":[{"line_number":238,"context_line":"    \"\"\""},{"line_number":239,"context_line":"    try:"},{"line_number":240,"context_line":"        output, _e \u003d execute(\u0027lsblk\u0027, \u0027-n\u0027, \u0027-s\u0027, \u0027-P\u0027, \u0027-b\u0027,"},{"line_number":241,"context_line":"                             \u0027-oKNAME,TRAN,TYPE,SIZE\u0027,"},{"line_number":242,"context_line":"                             vmedia_device_file)"},{"line_number":243,"context_line":"    except processutils.ProcessExecutionError as e:"},{"line_number":244,"context_line":"        _early_log(\u0027Failed to execute lsblk. lsblk is required for \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"016fccad_aa45de3f","line":241,"updated":"2021-03-29 17:10:50.000000000","message":"nit: use get_device_information (or something like that) from disk_utils","commit_id":"0288407d72a7d48d74e71ef8be05ecd09d2c1ed4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3f202618bd70318d94b4b053b9d4d6ac2c48205e","unresolved":true,"context_lines":[{"line_number":316,"context_line":"    if not vmedia_device_file:"},{"line_number":317,"context_line":"        _early_log(\u0027No virtual media device detected\u0027)"},{"line_number":318,"context_line":"        return"},{"line_number":319,"context_line":"    if not _booted_from_vmedia():"},{"line_number":320,"context_line":"        _early_log(\u0027Cannot use configuration from virtual media as the \u0027"},{"line_number":321,"context_line":"                   \u0027agent was not booted from virtual media.\u0027)"},{"line_number":322,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":1,"id":"d64cf7c8_ccf0020c","line":319,"updated":"2021-03-29 17:10:50.000000000","message":"Ironic only sets boot_method when a floppy device is used: https://opendev.org/openstack/ironic/src/branch/master/ironic/drivers/modules/redfish/boot.py#L496-L499.\n\nWe either need to fix ironic before this change, or drop this check.","commit_id":"0288407d72a7d48d74e71ef8be05ecd09d2c1ed4"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"3d7abc88278b012ace12ba8094894cdafcb42ce3","unresolved":true,"context_lines":[{"line_number":316,"context_line":"    if not vmedia_device_file:"},{"line_number":317,"context_line":"        _early_log(\u0027No virtual media device detected\u0027)"},{"line_number":318,"context_line":"        return"},{"line_number":319,"context_line":"    if not _booted_from_vmedia():"},{"line_number":320,"context_line":"        _early_log(\u0027Cannot use configuration from virtual media as the \u0027"},{"line_number":321,"context_line":"                   \u0027agent was not booted from virtual media.\u0027)"},{"line_number":322,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":1,"id":"86323a2e_4a737cd9","line":319,"in_reply_to":"96c1186b_dcd2c093","updated":"2021-03-29 18:13:53.000000000","message":"Posted: https:review.opendev.org/c/openstack/ironic/+/783722/","commit_id":"0288407d72a7d48d74e71ef8be05ecd09d2c1ed4"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"be2a9ce124592a6385d62d03cc0e4e746c1618fb","unresolved":true,"context_lines":[{"line_number":316,"context_line":"    if not vmedia_device_file:"},{"line_number":317,"context_line":"        _early_log(\u0027No virtual media device detected\u0027)"},{"line_number":318,"context_line":"        return"},{"line_number":319,"context_line":"    if not _booted_from_vmedia():"},{"line_number":320,"context_line":"        _early_log(\u0027Cannot use configuration from virtual media as the \u0027"},{"line_number":321,"context_line":"                   \u0027agent was not booted from virtual media.\u0027)"},{"line_number":322,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":1,"id":"96c1186b_dcd2c093","line":319,"in_reply_to":"d64cf7c8_ccf0020c","updated":"2021-03-29 17:19:37.000000000","message":"Patching ironic now. Looks like a simple change since it should have always been mandatory.","commit_id":"0288407d72a7d48d74e71ef8be05ecd09d2c1ed4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3f202618bd70318d94b4b053b9d4d6ac2c48205e","unresolved":true,"context_lines":[{"line_number":322,"context_line":"        return"},{"line_number":323,"context_line":"    # Evaluate the device and determine if it looks/seems"},{"line_number":324,"context_line":"    # like virtual media, otherwise do not proceed."},{"line_number":325,"context_line":"    if not _check_vmedia_device(vmedia_device_file):"},{"line_number":326,"context_line":"        _early_log(\u0027Virtual media device does not appear to be valid.\u0027)"},{"line_number":327,"context_line":"        return"},{"line_number":328,"context_line":"    # Determine the device"}],"source_content_type":"text/x-python","patch_set":1,"id":"eec1ff25_3dc79e1f","line":325,"updated":"2021-03-29 17:10:50.000000000","message":"Redundant, already in _find_vmedia_device_by_labels","commit_id":"0288407d72a7d48d74e71ef8be05ecd09d2c1ed4"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"3d7abc88278b012ace12ba8094894cdafcb42ce3","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        return"},{"line_number":323,"context_line":"    # Evaluate the device and determine if it looks/seems"},{"line_number":324,"context_line":"    # like virtual media, otherwise do not proceed."},{"line_number":325,"context_line":"    if not _check_vmedia_device(vmedia_device_file):"},{"line_number":326,"context_line":"        _early_log(\u0027Virtual media device does not appear to be valid.\u0027)"},{"line_number":327,"context_line":"        return"},{"line_number":328,"context_line":"    # Determine the device"}],"source_content_type":"text/x-python","patch_set":1,"id":"4adfa06a_7d6ee97c","line":325,"in_reply_to":"4a4e4fc6_534b7c51","updated":"2021-03-29 18:13:53.000000000","message":"Done","commit_id":"0288407d72a7d48d74e71ef8be05ecd09d2c1ed4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a7c1ddb571c03dee8532692f86262731c8bd537e","unresolved":true,"context_lines":[{"line_number":322,"context_line":"        return"},{"line_number":323,"context_line":"    # Evaluate the device and determine if it looks/seems"},{"line_number":324,"context_line":"    # like virtual media, otherwise do not proceed."},{"line_number":325,"context_line":"    if not _check_vmedia_device(vmedia_device_file):"},{"line_number":326,"context_line":"        _early_log(\u0027Virtual media device does not appear to be valid.\u0027)"},{"line_number":327,"context_line":"        return"},{"line_number":328,"context_line":"    # Determine the device"}],"source_content_type":"text/x-python","patch_set":1,"id":"4a4e4fc6_534b7c51","line":325,"in_reply_to":"831a4d62_62287a7e","updated":"2021-03-29 17:22:31.000000000","message":"I\u0027d rather prefer we maintain the contract of find_vmedia_device.","commit_id":"0288407d72a7d48d74e71ef8be05ecd09d2c1ed4"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"be2a9ce124592a6385d62d03cc0e4e746c1618fb","unresolved":true,"context_lines":[{"line_number":322,"context_line":"        return"},{"line_number":323,"context_line":"    # Evaluate the device and determine if it looks/seems"},{"line_number":324,"context_line":"    # like virtual media, otherwise do not proceed."},{"line_number":325,"context_line":"    if not _check_vmedia_device(vmedia_device_file):"},{"line_number":326,"context_line":"        _early_log(\u0027Virtual media device does not appear to be valid.\u0027)"},{"line_number":327,"context_line":"        return"},{"line_number":328,"context_line":"    # Determine the device"}],"source_content_type":"text/x-python","patch_set":1,"id":"831a4d62_62287a7e","line":325,"in_reply_to":"eec1ff25_3dc79e1f","updated":"2021-03-29 17:19:37.000000000","message":"Should we not guard it regardless incase the code is ever changed again?","commit_id":"0288407d72a7d48d74e71ef8be05ecd09d2c1ed4"},{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"a511362be5b9624c28b65be3ab8d52158a9f794b","unresolved":true,"context_lines":[{"line_number":248,"context_line":"                _early_log(\u0027Excluding device %s from virtual media\u0027"},{"line_number":249,"context_line":"                           \u0027consideration as it is a partition.\u0027,"},{"line_number":250,"context_line":"                           device[\u0027KNAME\u0027])"},{"line_number":251,"context_line":"                return False"},{"line_number":252,"context_line":"            if device[\u0027TYPE\u0027] \u003d\u003d \u0027rom\u0027:"},{"line_number":253,"context_line":"                # Media is a something like /dev/sr0, a Read only media type."},{"line_number":254,"context_line":"                # The kernel decides this by consulting the underlying type"}],"source_content_type":"text/x-python","patch_set":2,"id":"131c6ec0_0b215272","line":251,"updated":"2021-03-29 20:16:27.000000000","message":"Should this be a \u0027continue\u0027 so the other devices can be iterated?","commit_id":"d39d0cb329ed02defc863f059d9e084c15e7c9c3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"841356e8e83d2c6ea103040c5b7965b2b0f58b22","unresolved":true,"context_lines":[{"line_number":248,"context_line":"                _early_log(\u0027Excluding device %s from virtual media\u0027"},{"line_number":249,"context_line":"                           \u0027consideration as it is a partition.\u0027,"},{"line_number":250,"context_line":"                           device[\u0027KNAME\u0027])"},{"line_number":251,"context_line":"                return False"},{"line_number":252,"context_line":"            if device[\u0027TYPE\u0027] \u003d\u003d \u0027rom\u0027:"},{"line_number":253,"context_line":"                # Media is a something like /dev/sr0, a Read only media type."},{"line_number":254,"context_line":"                # The kernel decides this by consulting the underlying type"}],"source_content_type":"text/x-python","patch_set":2,"id":"0b51f4b3_c8866509","line":251,"in_reply_to":"131c6ec0_0b215272","updated":"2021-03-29 20:21:32.000000000","message":"I thought through the cases and couldn\u0027t see a way this could be a case in any existing deployment, so it seems suspect enough to me that we just need to say \"nope, can\u0027t do it\".","commit_id":"d39d0cb329ed02defc863f059d9e084c15e7c9c3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9b6419a659a544d78293b37866a8053ad30dabfd","unresolved":true,"context_lines":[{"line_number":148,"context_line":"        if _check_vmedia_device(candidate):"},{"line_number":149,"context_line":"            return candidate"},{"line_number":150,"context_line":"        else:"},{"line_number":151,"context_line":"            _early_log(\u0027Found possible vmedia candidate %s, however \u0027"},{"line_number":152,"context_line":"                       \u0027the device failed vmedia validity checking.\u0027,"},{"line_number":153,"context_line":"                       candidate)"},{"line_number":154,"context_line":"    _early_log(\u0027Did not identify any virtual media candidates devices.\u0027)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"eba75443_48d1049e","line":153,"range":{"start_line":151,"start_character":0,"end_line":153,"end_character":33},"updated":"2021-05-04 14:33:42.000000000","message":"fun factoid, our CI when systemd gets used, is basically useless in troubleshooting with _early_log.","commit_id":"8dd6589e66d03e45e1d510601da9531a30842cff"}]}
