)]}'
{"ironic_python_agent/hardware.py":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"44efc4a054f3a5ffdf42803a5deb8438b1532851","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        #   lvm, part, rom, loop"},{"line_number":299,"context_line":"        if devtype !\u003d block_type:"},{"line_number":300,"context_line":"            if (not ignore_raid and devtype and"},{"line_number":301,"context_line":"                    ((block_type in [\u0027disk\u0027, \u0027raid\u0027] and \u0027raid\u0027 in devtype) or"},{"line_number":302,"context_line":"                     (block_type \u003d\u003d \u0027part\u0027 and devtype \u003d\u003d \u0027md\u0027))):"},{"line_number":303,"context_line":"                LOG.debug("},{"line_number":304,"context_line":"                    \"TYPE detected to contain \u0027raid\u0027 or \u0027md\u0027, signifying a \""}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_e4ad6884","line":301,"updated":"2019-08-15 10:58:56.000000000","message":"I\u0027m wondering if actually doing string evaluation in the list is really the best thing which makes me think Arne\u0027s fix is the direction we want to go.","commit_id":"d5010d1d115b051b0ce6c56a8439b2a8df9ae668"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"96aa0cbcd2dbee1d7a16bf79c261d34fc7653374","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        # Other possible type values, which we skip recording:"},{"line_number":298,"context_line":"        #   lvm, part, rom, loop"},{"line_number":299,"context_line":"        if devtype !\u003d block_type:"},{"line_number":300,"context_line":"            if (not ignore_raid and devtype and"},{"line_number":301,"context_line":"                    ((block_type in [\u0027disk\u0027, \u0027raid\u0027] and \u0027raid\u0027 in devtype) or"},{"line_number":302,"context_line":"                     (block_type \u003d\u003d \u0027part\u0027 and devtype \u003d\u003d \u0027md\u0027))):"},{"line_number":303,"context_line":"                LOG.debug("},{"line_number":304,"context_line":"                    \"TYPE detected to contain \u0027raid\u0027 or \u0027md\u0027, signifying a \""},{"line_number":305,"context_line":"                    \"RAID volume. Found: {!r}\".format(line))"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_84703442","line":302,"range":{"start_line":300,"start_character":1,"end_line":302,"end_character":66},"updated":"2019-08-15 10:58:02.000000000","message":"This is very close to a solution I was looking for but didn\u0027t see, hence my patch in https://review.opendev.org/#/c/675857.\n\nWhile your proposal is clearly more elegant than mine, there is a special case which this if statement does not cover I think: empty md devices after a disk failure in a RAID-0. In such a scenario (which we ran into in production), the IPA will detect an md device, but mark the remaining drive as spare (and the device as empty with type  \u0027md\u0027). Since we ask for block_type \u0027raid\u0027 in delete_configuration, the healthy disk will not be cleaned and cause problems upon create_configuration.\n\nMaybe a\n\n\"or (devtype\u003d\u0027md\u0027 and 0 \u003d\u003d device.get(\u0027SIZE\u0027))\"\n\nwould fix this?","commit_id":"d5010d1d115b051b0ce6c56a8439b2a8df9ae668"}]}
