)]}'
{"ironic_python_agent/errors.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    message \u003d \u0027Software RAID caused unknown error\u0027"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def __init__(self, details):"},{"line_number":213,"context_line":"        super(SoftwareRAIDError, self).__init__(details)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"class VirtualMediaBootError(RESTError):"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_b90abd87","line":213,"updated":"2019-06-03 07:47:44.000000000","message":"nit: redundant method","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    message \u003d \u0027Software RAID caused unknown error\u0027"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def __init__(self, details):"},{"line_number":213,"context_line":"        super(SoftwareRAIDError, self).__init__(details)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"class VirtualMediaBootError(RESTError):"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_054825ca","line":213,"in_reply_to":"9fb8cfa7_b90abd87","updated":"2019-06-04 11:03:27.000000000","message":"Monkey see, monkey do :) Does this also apply to the surrounding methods?","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    message \u003d \u0027Software RAID caused unknown error\u0027"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def __init__(self, details):"},{"line_number":213,"context_line":"        super(SoftwareRAIDError, self).__init__(details)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"class VirtualMediaBootError(RESTError):"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_08a108aa","line":213,"updated":"2019-06-05 06:17:15.000000000","message":"Yeah, I don\u0027t know why we created useless __init__ for all classes..","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"}],"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":"5e41556c3291cffb6e14f91dd52873b424ac4013","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"        for logical_disk in logical_disks:"},{"line_number":1200,"context_line":"            for device in block_devices:"},{"line_number":1201,"context_line":"                psize \u003d logical_disk[\u0027size_gb\u0027]"},{"line_number":1202,"context_line":"                if psize \u003d\u003d \u0027MAX\u0027:"},{"line_number":1203,"context_line":"                    psize \u003d \u0027-1\u0027"},{"line_number":1204,"context_line":"                else:"},{"line_number":1205,"context_line":"                    psize \u003d int(psize) * 1024"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_c727fdc6","line":1202,"range":{"start_line":1202,"start_character":19,"end_line":1202,"end_character":33},"updated":"2019-02-13 14:44:57.000000000","message":"Maybe guard just in case someone tries \u0027max\u0027 or \u0027Max\u0027?\n\nconverting to lower or upper seems reasonable to me.","commit_id":"6e08c6755603f4dd0c9a60631a22067bb7803fd9"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"093906c9b509b0d435306598935a7b7d0fa9bb92","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"        for logical_disk in logical_disks:"},{"line_number":1200,"context_line":"            for device in block_devices:"},{"line_number":1201,"context_line":"                psize \u003d logical_disk[\u0027size_gb\u0027]"},{"line_number":1202,"context_line":"                if psize \u003d\u003d \u0027MAX\u0027:"},{"line_number":1203,"context_line":"                    psize \u003d \u0027-1\u0027"},{"line_number":1204,"context_line":"                else:"},{"line_number":1205,"context_line":"                    psize \u003d int(psize) * 1024"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_f8697cbd","line":1202,"range":{"start_line":1202,"start_character":19,"end_line":1202,"end_character":33},"in_reply_to":"9fdfeff1_c727fdc6","updated":"2019-02-13 15:53:26.000000000","message":"This ... plus some error handling I just realise.","commit_id":"6e08c6755603f4dd0c9a60631a22067bb7803fd9"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"cffe0700bceceee53d3163d42731045f739e4192","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"        for logical_disk in logical_disks:"},{"line_number":1200,"context_line":"            for device in block_devices:"},{"line_number":1201,"context_line":"                psize \u003d logical_disk[\u0027size_gb\u0027]"},{"line_number":1202,"context_line":"                if psize \u003d\u003d \u0027MAX\u0027:"},{"line_number":1203,"context_line":"                    psize \u003d \u0027-1\u0027"},{"line_number":1204,"context_line":"                else:"},{"line_number":1205,"context_line":"                    psize \u003d int(psize) * 1024"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_95b00d45","line":1202,"range":{"start_line":1202,"start_character":19,"end_line":1202,"end_character":33},"in_reply_to":"9fdfeff1_f8697cbd","updated":"2019-02-15 16:35:15.000000000","message":"Not needed actually: the RAID JSON schema checks catch this when the target_raid_config is configured for a node.","commit_id":"6e08c6755603f4dd0c9a60631a22067bb7803fd9"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"5e41556c3291cffb6e14f91dd52873b424ac4013","unresolved":false,"context_lines":[{"line_number":1247,"context_line":"        # NOTE(arne_wiebalck): this clearly needs some work ..."},{"line_number":1248,"context_line":"        holder_devices, err \u003d utils.execute(\u0027mdadm\u0027, \u0027--detail\u0027,"},{"line_number":1249,"context_line":"                                            raid_device.name,"},{"line_number":1250,"context_line":"                                            \"| grep \u0027active sync\u0027\","},{"line_number":1251,"context_line":"                                            \"| awk \u0027{{ print $NF }}\u0027\","},{"line_number":1252,"context_line":"                                            shell\u003dTrue)"},{"line_number":1253,"context_line":"        holder_devices \u003d \"/dev/sda1\\n/dev/sdb1\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_3a713ca9","line":1250,"updated":"2019-02-13 14:44:57.000000000","message":"So you could loop through each line of the output and make a list based upon the presence of \u0027active sync\u0027 in the line. A regular expression may be good for that if we\u0027re concerned that the text may change.\n\nOur hdparm security/erase unit tests may inspire you. :)","commit_id":"6e08c6755603f4dd0c9a60631a22067bb7803fd9"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"093906c9b509b0d435306598935a7b7d0fa9bb92","unresolved":false,"context_lines":[{"line_number":1247,"context_line":"        # NOTE(arne_wiebalck): this clearly needs some work ..."},{"line_number":1248,"context_line":"        holder_devices, err \u003d utils.execute(\u0027mdadm\u0027, \u0027--detail\u0027,"},{"line_number":1249,"context_line":"                                            raid_device.name,"},{"line_number":1250,"context_line":"                                            \"| grep \u0027active sync\u0027\","},{"line_number":1251,"context_line":"                                            \"| awk \u0027{{ print $NF }}\u0027\","},{"line_number":1252,"context_line":"                                            shell\u003dTrue)"},{"line_number":1253,"context_line":"        holder_devices \u003d \"/dev/sda1\\n/dev/sdb1\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_dada70e7","line":1250,"in_reply_to":"9fdfeff1_3a713ca9","updated":"2019-02-13 15:53:26.000000000","message":"Thanks fir the suggestion, I will have a look.","commit_id":"6e08c6755603f4dd0c9a60631a22067bb7803fd9"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"cffe0700bceceee53d3163d42731045f739e4192","unresolved":false,"context_lines":[{"line_number":1247,"context_line":"        # NOTE(arne_wiebalck): this clearly needs some work ..."},{"line_number":1248,"context_line":"        holder_devices, err \u003d utils.execute(\u0027mdadm\u0027, \u0027--detail\u0027,"},{"line_number":1249,"context_line":"                                            raid_device.name,"},{"line_number":1250,"context_line":"                                            \"| grep \u0027active sync\u0027\","},{"line_number":1251,"context_line":"                                            \"| awk \u0027{{ print $NF }}\u0027\","},{"line_number":1252,"context_line":"                                            shell\u003dTrue)"},{"line_number":1253,"context_line":"        holder_devices \u003d \"/dev/sda1\\n/dev/sdb1\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_17a65dc2","line":1250,"in_reply_to":"9fdfeff1_dada70e7","updated":"2019-02-15 16:35:15.000000000","message":"Done","commit_id":"6e08c6755603f4dd0c9a60631a22067bb7803fd9"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"5e41556c3291cffb6e14f91dd52873b424ac4013","unresolved":false,"context_lines":[{"line_number":1250,"context_line":"                                            \"| grep \u0027active sync\u0027\","},{"line_number":1251,"context_line":"                                            \"| awk \u0027{{ print $NF }}\u0027\","},{"line_number":1252,"context_line":"                                            shell\u003dTrue)"},{"line_number":1253,"context_line":"        holder_devices \u003d \"/dev/sda1\\n/dev/sdb1\""},{"line_number":1254,"context_line":"        return holder_devices.split()"},{"line_number":1255,"context_line":""},{"line_number":1256,"context_line":"    def delete_configuration(self, node, ports):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_9a3148f0","line":1253,"updated":"2019-02-13 14:44:57.000000000","message":"Yeah... ++ to the comment above.","commit_id":"6e08c6755603f4dd0c9a60631a22067bb7803fd9"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"093906c9b509b0d435306598935a7b7d0fa9bb92","unresolved":false,"context_lines":[{"line_number":1250,"context_line":"                                            \"| grep \u0027active sync\u0027\","},{"line_number":1251,"context_line":"                                            \"| awk \u0027{{ print $NF }}\u0027\","},{"line_number":1252,"context_line":"                                            shell\u003dTrue)"},{"line_number":1253,"context_line":"        holder_devices \u003d \"/dev/sda1\\n/dev/sdb1\""},{"line_number":1254,"context_line":"        return holder_devices.split()"},{"line_number":1255,"context_line":""},{"line_number":1256,"context_line":"    def delete_configuration(self, node, ports):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_fad734be","line":1253,"in_reply_to":"9fdfeff1_9a3148f0","updated":"2019-02-13 15:53:26.000000000","message":"This line shouldn\u0027t have made it here :-D","commit_id":"6e08c6755603f4dd0c9a60631a22067bb7803fd9"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"cffe0700bceceee53d3163d42731045f739e4192","unresolved":false,"context_lines":[{"line_number":1250,"context_line":"                                            \"| grep \u0027active sync\u0027\","},{"line_number":1251,"context_line":"                                            \"| awk \u0027{{ print $NF }}\u0027\","},{"line_number":1252,"context_line":"                                            shell\u003dTrue)"},{"line_number":1253,"context_line":"        holder_devices \u003d \"/dev/sda1\\n/dev/sdb1\""},{"line_number":1254,"context_line":"        return holder_devices.split()"},{"line_number":1255,"context_line":""},{"line_number":1256,"context_line":"    def delete_configuration(self, node, ports):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_55b62540","line":1253,"in_reply_to":"9fdfeff1_fad734be","updated":"2019-02-15 16:35:15.000000000","message":"Done","commit_id":"6e08c6755603f4dd0c9a60631a22067bb7803fd9"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"e9ab2f216365826ea820a1511858ef39f1c936fc","unresolved":false,"context_lines":[{"line_number":1189,"context_line":"        :param ports: A list of dictionaries containing information"},{"line_number":1190,"context_line":"                      of ports for the node."},{"line_number":1191,"context_line":"        :returns: The current RAID configuration in the usual format."},{"line_number":1192,"context_line":"        \"\"\""},{"line_number":1193,"context_line":"        LOG.info(\"Creating Software RAID\")"},{"line_number":1194,"context_line":""},{"line_number":1195,"context_line":"        raid_config \u003d node.get(\u0027target_raid_config\u0027, {})"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_eded0125","line":1192,"range":{"start_line":1192,"start_character":8,"end_line":1192,"end_character":11},"updated":"2019-03-28 09:29:39.000000000","message":"Add \"raises:\"  in doc string.","commit_id":"880a710116e0a10b421de83ec205b66a60e6bcbb"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"fe2543da3318cbeaac70c08ffa74441da7c579c5","unresolved":false,"context_lines":[{"line_number":1189,"context_line":"        :param ports: A list of dictionaries containing information"},{"line_number":1190,"context_line":"                      of ports for the node."},{"line_number":1191,"context_line":"        :returns: The current RAID configuration in the usual format."},{"line_number":1192,"context_line":"        \"\"\""},{"line_number":1193,"context_line":"        LOG.info(\"Creating Software RAID\")"},{"line_number":1194,"context_line":""},{"line_number":1195,"context_line":"        raid_config \u003d node.get(\u0027target_raid_config\u0027, {})"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_046611ee","line":1192,"range":{"start_line":1192,"start_character":8,"end_line":1192,"end_character":11},"in_reply_to":"5fc1f717_eded0125","updated":"2019-03-29 10:12:40.000000000","message":"Thanks, will do.","commit_id":"880a710116e0a10b421de83ec205b66a60e6bcbb"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"e9ab2f216365826ea820a1511858ef39f1c936fc","unresolved":false,"context_lines":[{"line_number":1265,"context_line":"            except processutils.ProcessExecutionError as e:"},{"line_number":1266,"context_line":"                msg \u003d \"Failed to create md device {} on {}: {}\".format("},{"line_number":1267,"context_line":"                    md_device, component_devices, e)"},{"line_number":1268,"context_line":"                raise errors.SoftwareRAIDError(msg)"},{"line_number":1269,"context_line":""},{"line_number":1270,"context_line":"        LOG.debug(\"Finished creating Software RAID\")"},{"line_number":1271,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_6de35106","line":1268,"range":{"start_line":1268,"start_character":15,"end_line":1268,"end_character":51},"updated":"2019-03-28 09:29:39.000000000","message":"Would it be better to delete raids and md-metadata created so far before raising error? Otherwise, I suppose user would need to perform \u0027delete_configuration\u0027 before re-attempting \u0027create_configuration\u0027.","commit_id":"880a710116e0a10b421de83ec205b66a60e6bcbb"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"fe2543da3318cbeaac70c08ffa74441da7c579c5","unresolved":false,"context_lines":[{"line_number":1265,"context_line":"            except processutils.ProcessExecutionError as e:"},{"line_number":1266,"context_line":"                msg \u003d \"Failed to create md device {} on {}: {}\".format("},{"line_number":1267,"context_line":"                    md_device, component_devices, e)"},{"line_number":1268,"context_line":"                raise errors.SoftwareRAIDError(msg)"},{"line_number":1269,"context_line":""},{"line_number":1270,"context_line":"        LOG.debug(\"Finished creating Software RAID\")"},{"line_number":1271,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_e46ae5b0","line":1268,"range":{"start_line":1268,"start_character":15,"end_line":1268,"end_character":51},"in_reply_to":"5fc1f717_6de35106","updated":"2019-03-29 10:12:40.000000000","message":"I was under the impression that automatic cleaning would always call delete_configuration before it calls create_configuration, and that create_configuration should not remove any config. See here https://docs.openstack.org/ironic/latest/admin/raid.html","commit_id":"880a710116e0a10b421de83ec205b66a60e6bcbb"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8971eb181f1c1fd1ef0eb5dde64c6d8d0202e2ab","unresolved":false,"context_lines":[{"line_number":1265,"context_line":"            except processutils.ProcessExecutionError as e:"},{"line_number":1266,"context_line":"                msg \u003d \"Failed to create md device {} on {}: {}\".format("},{"line_number":1267,"context_line":"                    md_device, component_devices, e)"},{"line_number":1268,"context_line":"                raise errors.SoftwareRAIDError(msg)"},{"line_number":1269,"context_line":""},{"line_number":1270,"context_line":"        LOG.debug(\"Finished creating Software RAID\")"},{"line_number":1271,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"dfbec78f_732f34a1","line":1268,"range":{"start_line":1268,"start_character":15,"end_line":1268,"end_character":51},"in_reply_to":"5fc1f717_e46ae5b0","updated":"2019-05-09 10:02:29.000000000","message":"RAID methods are not called during automatic cleaning. They are part of manual cleaning. In the above mentioned link it is recommended to perform delete followed by create to delete the logical volumes created in previous successful raid operation. But here it is about cleaning up when raid creation operation has failed. I think cleanup would be useful.","commit_id":"880a710116e0a10b421de83ec205b66a60e6bcbb"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"e9ab2f216365826ea820a1511858ef39f1c936fc","unresolved":false,"context_lines":[{"line_number":1336,"context_line":"        # Only one or two RAID devices are supported for now."},{"line_number":1337,"context_line":"        if len(logical_disks) not in [1, 2]:"},{"line_number":1338,"context_line":"            LOG.error(\"Software RAID config needs one or two logical disks\")"},{"line_number":1339,"context_line":"            return False"},{"line_number":1340,"context_line":""},{"line_number":1341,"context_line":"        # The first RAID device needs to be RAID-1."},{"line_number":1342,"context_line":"        if logical_disks[0][\u0027raid_level\u0027] !\u003d \u00271\u0027:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_6d9fd14f","line":1339,"range":{"start_line":1339,"start_character":12,"end_line":1339,"end_character":24},"updated":"2019-03-28 09:29:39.000000000","message":"It would be better to perform all the validation checks and collate into single error message before returning. It would save multiple IPA ramdisk boot for user to detect all errors in his raid_config.","commit_id":"880a710116e0a10b421de83ec205b66a60e6bcbb"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"fe2543da3318cbeaac70c08ffa74441da7c579c5","unresolved":false,"context_lines":[{"line_number":1336,"context_line":"        # Only one or two RAID devices are supported for now."},{"line_number":1337,"context_line":"        if len(logical_disks) not in [1, 2]:"},{"line_number":1338,"context_line":"            LOG.error(\"Software RAID config needs one or two logical disks\")"},{"line_number":1339,"context_line":"            return False"},{"line_number":1340,"context_line":""},{"line_number":1341,"context_line":"        # The first RAID device needs to be RAID-1."},{"line_number":1342,"context_line":"        if logical_disks[0][\u0027raid_level\u0027] !\u003d \u00271\u0027:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_447e596a","line":1339,"range":{"start_line":1339,"start_character":12,"end_line":1339,"end_character":24},"in_reply_to":"5fc1f717_6d9fd14f","updated":"2019-03-29 10:12:40.000000000","message":"Good point, thanks. How about we do all the checks here (log the corresponding errors) and decide at the end whether we return success?\n\nI wasn\u0027t sure how much of these should maybe move to the validation when the target RAID config is specified. So, rather than failing in the IPA, we\u0027d fail when we pass something that is invalid. Thoughts?","commit_id":"880a710116e0a10b421de83ec205b66a60e6bcbb"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"5effcd4efb45e80de9c8129d1c10330acbac04da","unresolved":false,"context_lines":[{"line_number":1178,"context_line":"            }"},{"line_number":1179,"context_line":"        ]"},{"line_number":1180,"context_line":""},{"line_number":1181,"context_line":"    def create_configuration(self, node, ports):"},{"line_number":1182,"context_line":"        \"\"\"Create a RAID configuration."},{"line_number":1183,"context_line":""},{"line_number":1184,"context_line":"        Unless overwritten by a local hardware manager, this method"}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_9a733a16","line":1181,"updated":"2019-03-29 10:34:22.000000000","message":"just wondering if it\u0027s worth maybe creating different functions for all the internal checks and operations?","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"d480a71715cece33c5ba071912e16089e658f208","unresolved":false,"context_lines":[{"line_number":1178,"context_line":"            }"},{"line_number":1179,"context_line":"        ]"},{"line_number":1180,"context_line":""},{"line_number":1181,"context_line":"    def create_configuration(self, node, ports):"},{"line_number":1182,"context_line":"        \"\"\"Create a RAID configuration."},{"line_number":1183,"context_line":""},{"line_number":1184,"context_line":"        Unless overwritten by a local hardware manager, this method"}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_893668e7","line":1181,"in_reply_to":"5fc1f717_530da133","updated":"2019-04-02 08:08:23.000000000","message":"Agreed, the function got a monolithic touch ... will look into splitting.","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c3a8702edbb80abf213d2dca045fed28519dbc47","unresolved":false,"context_lines":[{"line_number":1178,"context_line":"            }"},{"line_number":1179,"context_line":"        ]"},{"line_number":1180,"context_line":""},{"line_number":1181,"context_line":"    def create_configuration(self, node, ports):"},{"line_number":1182,"context_line":"        \"\"\"Create a RAID configuration."},{"line_number":1183,"context_line":""},{"line_number":1184,"context_line":"        Unless overwritten by a local hardware manager, this method"}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_530da133","line":1181,"in_reply_to":"5fc1f717_9a733a16","updated":"2019-04-01 14:10:54.000000000","message":"Wow, Yeah.... This would be a perfect thing as a follow-up.","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c3a8702edbb80abf213d2dca045fed28519dbc47","unresolved":false,"context_lines":[{"line_number":1211,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1212,"context_line":""},{"line_number":1213,"context_line":"        # Create an MBR partition table on each disk."},{"line_number":1214,"context_line":"        # TODO(arne_wiebalck): Check if GPT would work as well."},{"line_number":1215,"context_line":"        for block_device in block_devices:"},{"line_number":1216,"context_line":"            LOG.info(\"Creating partition table on {}\".format("},{"line_number":1217,"context_line":"                block_device.name))"}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_b325e5b0","line":1214,"updated":"2019-04-01 14:10:54.000000000","message":"It should without any issues. Not using it means we should likely put a note in the release note indicating that it is not supported for boot devices \u003e\u003d2TB.","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"d480a71715cece33c5ba071912e16089e658f208","unresolved":false,"context_lines":[{"line_number":1211,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1212,"context_line":""},{"line_number":1213,"context_line":"        # Create an MBR partition table on each disk."},{"line_number":1214,"context_line":"        # TODO(arne_wiebalck): Check if GPT would work as well."},{"line_number":1215,"context_line":"        for block_device in block_devices:"},{"line_number":1216,"context_line":"            LOG.info(\"Creating partition table on {}\".format("},{"line_number":1217,"context_line":"                block_device.name))"}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_49172047","line":1214,"in_reply_to":"5fc1f717_b325e5b0","updated":"2019-04-02 08:08:23.000000000","message":"I\u0027ll add a note for now to be on the safe side, but I\u0027ll put this on the list of things to test.","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c3a8702edbb80abf213d2dca045fed28519dbc47","unresolved":false,"context_lines":[{"line_number":1254,"context_line":"            raid_level \u003d logical_disk[\u0027raid_level\u0027]"},{"line_number":1255,"context_line":"            # The schema check allows \u00271+0\u0027, but mdadm knows it as \u002710\u0027."},{"line_number":1256,"context_line":"            if raid_level \u003d\u003d \u00271+0\u0027:"},{"line_number":1257,"context_line":"                LOG.debug(\"Adapting RAID level from \u00271+0\u0027 to \u002710\u0027\")"},{"line_number":1258,"context_line":"                raid_level \u003d \u002710\u0027"},{"line_number":1259,"context_line":"            try:"},{"line_number":1260,"context_line":"                LOG.info(\"Creating md device {} on {}\".format("}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_736d3dcb","line":1257,"updated":"2019-04-01 14:10:54.000000000","message":"nice touch :)","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"d480a71715cece33c5ba071912e16089e658f208","unresolved":false,"context_lines":[{"line_number":1254,"context_line":"            raid_level \u003d logical_disk[\u0027raid_level\u0027]"},{"line_number":1255,"context_line":"            # The schema check allows \u00271+0\u0027, but mdadm knows it as \u002710\u0027."},{"line_number":1256,"context_line":"            if raid_level \u003d\u003d \u00271+0\u0027:"},{"line_number":1257,"context_line":"                LOG.debug(\"Adapting RAID level from \u00271+0\u0027 to \u002710\u0027\")"},{"line_number":1258,"context_line":"                raid_level \u003d \u002710\u0027"},{"line_number":1259,"context_line":"            try:"},{"line_number":1260,"context_line":"                LOG.info(\"Creating md device {} on {}\".format("}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_693e9cba","line":1257,"in_reply_to":"5fc1f717_736d3dcb","updated":"2019-04-02 08:08:23.000000000","message":":)\n\nNot sure if there was a good solution to allow both during schema checks, but know which one to use during RAID setup. This seemed like a minimal impact thing, but will be confusing for people used to md RAID!","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c3a8702edbb80abf213d2dca045fed28519dbc47","unresolved":false,"context_lines":[{"line_number":1260,"context_line":"                LOG.info(\"Creating md device {} on {}\".format("},{"line_number":1261,"context_line":"                         md_device, component_devices))"},{"line_number":1262,"context_line":"                cmd \u003d (\"mdadm --create {} --level\u003d{} --raid-devices\u003d{} {} \""},{"line_number":1263,"context_line":"                       \"--force --run --metadata\u003d1.0\").format("},{"line_number":1264,"context_line":"                           md_device, raid_level, raid_devices,"},{"line_number":1265,"context_line":"                           component_devices)"},{"line_number":1266,"context_line":"                LOG.info(cmd)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_73c9bdaa","line":1263,"range":{"start_line":1263,"start_character":49,"end_line":1263,"end_character":52},"updated":"2019-04-01 14:10:54.000000000","message":"Any reason for 1.0 and not default or 1.2? 1.2 seems to focus on 4K block alignment?\n\nAdditional future improvement we may want to consider. Supporting the user selecting \u0027ddf\u0027 or \u0027imsm\u0027... but definitely out of scope for this patch.","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"d480a71715cece33c5ba071912e16089e658f208","unresolved":false,"context_lines":[{"line_number":1260,"context_line":"                LOG.info(\"Creating md device {} on {}\".format("},{"line_number":1261,"context_line":"                         md_device, component_devices))"},{"line_number":1262,"context_line":"                cmd \u003d (\"mdadm --create {} --level\u003d{} --raid-devices\u003d{} {} \""},{"line_number":1263,"context_line":"                       \"--force --run --metadata\u003d1.0\").format("},{"line_number":1264,"context_line":"                           md_device, raid_level, raid_devices,"},{"line_number":1265,"context_line":"                           component_devices)"},{"line_number":1266,"context_line":"                LOG.info(cmd)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_6e5d4247","line":1263,"range":{"start_line":1263,"start_character":49,"end_line":1263,"end_character":52},"in_reply_to":"5fc1f717_73c9bdaa","updated":"2019-04-02 08:08:23.000000000","message":"No particular reason to chose 1.0 over 1.2, no. Since 1.2 seems to be the same as \"dafault\" and (according to the man page) to be the most common 1.x version, it may be worth changing it. The reason to choose 1.x was to get the superblock out of the way.\n\nI\u0027ll try \"1.2\" (or just \"1\").\n\nWe could also make this part of the target_raid_config, and hence configurable.","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"5effcd4efb45e80de9c8129d1c10330acbac04da","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"        that config has been lost, though, the cleanup may become"},{"line_number":1285,"context_line":"        difficult. So, for now, we delete everything we detect."},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"        :param node: A dcitionary of the node object"},{"line_number":1288,"context_line":"        :param ports: A list of dictionaries containing information"},{"line_number":1289,"context_line":"                      of ports for the node"},{"line_number":1290,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_9a4c9ac8","line":1287,"range":{"start_line":1287,"start_character":23,"end_line":1287,"end_character":33},"updated":"2019-03-29 10:34:22.000000000","message":"nit: dictionary","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"d480a71715cece33c5ba071912e16089e658f208","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"        that config has been lost, though, the cleanup may become"},{"line_number":1285,"context_line":"        difficult. So, for now, we delete everything we detect."},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"        :param node: A dcitionary of the node object"},{"line_number":1288,"context_line":"        :param ports: A list of dictionaries containing information"},{"line_number":1289,"context_line":"                      of ports for the node"},{"line_number":1290,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_e9984ccd","line":1287,"range":{"start_line":1287,"start_character":23,"end_line":1287,"end_character":33},"in_reply_to":"5fc1f717_9a4c9ac8","updated":"2019-04-02 08:08:23.000000000","message":"Thanks, will fix.","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c3a8702edbb80abf213d2dca045fed28519dbc47","unresolved":false,"context_lines":[{"line_number":1325,"context_line":""},{"line_number":1326,"context_line":"        Validate a given raid_config, in particular with respect to"},{"line_number":1327,"context_line":"        the limitations of the current implementation of software"},{"line_number":1328,"context_line":"        RAID support."},{"line_number":1329,"context_line":""},{"line_number":1330,"context_line":"        :param raid_config: The current RAID configuration in the usual format."},{"line_number":1331,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_9337894e","line":1328,"updated":"2019-04-01 14:10:54.000000000","message":"Is this just examining data with a focus on the mirror set?","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"d480a71715cece33c5ba071912e16089e658f208","unresolved":false,"context_lines":[{"line_number":1325,"context_line":""},{"line_number":1326,"context_line":"        Validate a given raid_config, in particular with respect to"},{"line_number":1327,"context_line":"        the limitations of the current implementation of software"},{"line_number":1328,"context_line":"        RAID support."},{"line_number":1329,"context_line":""},{"line_number":1330,"context_line":"        :param raid_config: The current RAID configuration in the usual format."},{"line_number":1331,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_a9a244fb","line":1328,"in_reply_to":"5fc1f717_9337894e","updated":"2019-04-02 08:08:23.000000000","message":"No, it should check the target_raid_config as given by the user to be compliant with what we currently support.","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c3a8702edbb80abf213d2dca045fed28519dbc47","unresolved":false,"context_lines":[{"line_number":1338,"context_line":""},{"line_number":1339,"context_line":"        # Only one or two RAID devices are supported for now."},{"line_number":1340,"context_line":"        if len(logical_disks) not in [1, 2]:"},{"line_number":1341,"context_line":"            LOG.error(\"Software RAID config needs one or two logical disks\")"},{"line_number":1342,"context_line":"            return False"},{"line_number":1343,"context_line":""},{"line_number":1344,"context_line":"        # The first RAID device needs to be RAID-1."}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_d308b192","line":1341,"updated":"2019-04-01 14:10:54.000000000","message":"For a mirror set, but...\n\nI guess this seems like it should be len(logical_disks) \u003e\u003d 1, or maybe more context is needed","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"d480a71715cece33c5ba071912e16089e658f208","unresolved":false,"context_lines":[{"line_number":1338,"context_line":""},{"line_number":1339,"context_line":"        # Only one or two RAID devices are supported for now."},{"line_number":1340,"context_line":"        if len(logical_disks) not in [1, 2]:"},{"line_number":1341,"context_line":"            LOG.error(\"Software RAID config needs one or two logical disks\")"},{"line_number":1342,"context_line":"            return False"},{"line_number":1343,"context_line":""},{"line_number":1344,"context_line":"        # The first RAID device needs to be RAID-1."}],"source_content_type":"text/x-python","patch_set":14,"id":"5fc1f717_c980f049","line":1341,"in_reply_to":"5fc1f717_d308b192","updated":"2019-04-02 08:08:23.000000000","message":"It\u0027s the logical devices, not the constituent/member devices.\nAs per the spec we support:\n- 1x RAID-1\n- 1x RAID-1 plus 1x RAID-N\n\nSo, we have 1 or 2 logical disks. The number of disks used to build these logical disks is not necessarily fixed.","commit_id":"952990bae0007e046f2eab6afbefa2dd3bf84091"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8971eb181f1c1fd1ef0eb5dde64c6d8d0202e2ab","unresolved":false,"context_lines":[{"line_number":1179,"context_line":"            {"},{"line_number":1180,"context_line":"                \u0027step\u0027: \u0027delete_configuration\u0027,"},{"line_number":1181,"context_line":"                \u0027priority\u0027: 0,"},{"line_number":1182,"context_line":"                \u0027interface\u0027: \u0027deploy\u0027,"},{"line_number":1183,"context_line":"                \u0027reboot_requested\u0027: False,"},{"line_number":1184,"context_line":"                \u0027abortable\u0027: True"},{"line_number":1185,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_3629aa89","line":1182,"range":{"start_line":1182,"start_character":30,"end_line":1182,"end_character":36},"updated":"2019-05-09 10:02:29.000000000","message":"RAID operations are part of \u0027raid\u0027 interface.\ns/ \u0027deploy\u0027 / \u0027raid\u0027 /","commit_id":"4c983610f4aed0ee918fec300ee4a7fa3cc2178a"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8971eb181f1c1fd1ef0eb5dde64c6d8d0202e2ab","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"            {"},{"line_number":1187,"context_line":"                \u0027step\u0027: \u0027create_configuration\u0027,"},{"line_number":1188,"context_line":"                \u0027priority\u0027: 0,"},{"line_number":1189,"context_line":"                \u0027interface\u0027: \u0027deploy\u0027,"},{"line_number":1190,"context_line":"                \u0027reboot_requested\u0027: False,"},{"line_number":1191,"context_line":"                \u0027abortable\u0027: True"},{"line_number":1192,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_d35b8051","line":1189,"range":{"start_line":1189,"start_character":16,"end_line":1189,"end_character":38},"updated":"2019-05-09 10:02:29.000000000","message":"ditto","commit_id":"4c983610f4aed0ee918fec300ee4a7fa3cc2178a"},{"author":{"_account_id":11929,"name":"Michael Turek","email":"mjturek@linux.vnet.ibm.com","username":"mjturek"},"change_message_id":"b4df375ae139a603a772d5473a117f885a8a1365","unresolved":false,"context_lines":[{"line_number":1220,"context_line":"        block_devices \u003d self.list_block_devices()"},{"line_number":1221,"context_line":"        block_devices_partitions \u003d self.list_block_devices("},{"line_number":1222,"context_line":"            include_partitions\u003dTrue)"},{"line_number":1223,"context_line":"        if len(block_devices) !\u003d len(block_devices_partitions):"},{"line_number":1224,"context_line":"            msg \u003d \"Partitions detected during RAID config\""},{"line_number":1225,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1226,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_73e870e1","line":1223,"updated":"2019-05-10 19:34:40.000000000","message":"Does this really imply that all block devices have a single partition? What if one device somehow winds up with two partitions and another with none?","commit_id":"4bd48c7c7bf2344a97efe34e5617c9a13494fbfd"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"187dd5762f6313e4867234ad0c1e60c08cb1c492","unresolved":false,"context_lines":[{"line_number":1220,"context_line":"        block_devices \u003d self.list_block_devices()"},{"line_number":1221,"context_line":"        block_devices_partitions \u003d self.list_block_devices("},{"line_number":1222,"context_line":"            include_partitions\u003dTrue)"},{"line_number":1223,"context_line":"        if len(block_devices) !\u003d len(block_devices_partitions):"},{"line_number":1224,"context_line":"            msg \u003d \"Partitions detected during RAID config\""},{"line_number":1225,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1226,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_d3b34997","line":1223,"in_reply_to":"dfbec78f_73e870e1","updated":"2019-05-13 08:25:07.000000000","message":"It is supposed to mean that there are no partitions on the disks (the two calls give the same list of devices), a safety measure to not screw up sth that was configured before.","commit_id":"4bd48c7c7bf2344a97efe34e5617c9a13494fbfd"},{"author":{"_account_id":11929,"name":"Michael Turek","email":"mjturek@linux.vnet.ibm.com","username":"mjturek"},"change_message_id":"96259e9d4eb30b73790e88af295c1b1f4511912d","unresolved":false,"context_lines":[{"line_number":1220,"context_line":"        block_devices \u003d self.list_block_devices()"},{"line_number":1221,"context_line":"        block_devices_partitions \u003d self.list_block_devices("},{"line_number":1222,"context_line":"            include_partitions\u003dTrue)"},{"line_number":1223,"context_line":"        if len(block_devices) !\u003d len(block_devices_partitions):"},{"line_number":1224,"context_line":"            msg \u003d \"Partitions detected during RAID config\""},{"line_number":1225,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1226,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_2ef0ac90","line":1223,"in_reply_to":"dfbec78f_d3b34997","updated":"2019-05-20 13:59:23.000000000","message":"ahhh I see now! I misread. Seems sane to me.","commit_id":"4bd48c7c7bf2344a97efe34e5617c9a13494fbfd"},{"author":{"_account_id":11929,"name":"Michael Turek","email":"mjturek@linux.vnet.ibm.com","username":"mjturek"},"change_message_id":"b4df375ae139a603a772d5473a117f885a8a1365","unresolved":false,"context_lines":[{"line_number":1225,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1226,"context_line":""},{"line_number":1227,"context_line":"        # Create an MBR partition table on each disk."},{"line_number":1228,"context_line":"        # TODO(arne_wiebalck): Check if GPT would work as well."},{"line_number":1229,"context_line":"        for block_device in block_devices:"},{"line_number":1230,"context_line":"            LOG.info(\"Creating partition table on {}\".format("},{"line_number":1231,"context_line":"                block_device.name))"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_130d74a0","line":1228,"updated":"2019-05-10 19:34:40.000000000","message":"Wondering if this is problematic... Wouldn\u0027t this create MBR partitions that are not part of the raid?","commit_id":"4bd48c7c7bf2344a97efe34e5617c9a13494fbfd"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"187dd5762f6313e4867234ad0c1e60c08cb1c492","unresolved":false,"context_lines":[{"line_number":1225,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1226,"context_line":""},{"line_number":1227,"context_line":"        # Create an MBR partition table on each disk."},{"line_number":1228,"context_line":"        # TODO(arne_wiebalck): Check if GPT would work as well."},{"line_number":1229,"context_line":"        for block_device in block_devices:"},{"line_number":1230,"context_line":"            LOG.info(\"Creating partition table on {}\".format("},{"line_number":1231,"context_line":"                block_device.name))"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_b37b35bc","line":1228,"in_reply_to":"dfbec78f_130d74a0","updated":"2019-05-13 08:25:07.000000000","message":"The MBR will hold the partition table with the partitions that will become part of the RAID (the RAID device is made from partitions, not devices).","commit_id":"4bd48c7c7bf2344a97efe34e5617c9a13494fbfd"},{"author":{"_account_id":11929,"name":"Michael Turek","email":"mjturek@linux.vnet.ibm.com","username":"mjturek"},"change_message_id":"96259e9d4eb30b73790e88af295c1b1f4511912d","unresolved":false,"context_lines":[{"line_number":1225,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1226,"context_line":""},{"line_number":1227,"context_line":"        # Create an MBR partition table on each disk."},{"line_number":1228,"context_line":"        # TODO(arne_wiebalck): Check if GPT would work as well."},{"line_number":1229,"context_line":"        for block_device in block_devices:"},{"line_number":1230,"context_line":"            LOG.info(\"Creating partition table on {}\".format("},{"line_number":1231,"context_line":"                block_device.name))"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_21199d78","line":1228,"in_reply_to":"dfbec78f_b37b35bc","updated":"2019-05-20 13:59:23.000000000","message":"I think I was under the impression that you could specify which disks to use in the RAID, but looking at the spec again I think I was mistaken.\n\nThanks!","commit_id":"4bd48c7c7bf2344a97efe34e5617c9a13494fbfd"},{"author":{"_account_id":24843,"name":"Adam Kimball","email":"baha@linux.vnet.ibm.com","username":"baha"},"change_message_id":"f243870e8cb5bec73da0e12d65c6fad426e6f26c","unresolved":false,"context_lines":[{"line_number":1275,"context_line":"                         md_device, component_devices))"},{"line_number":1276,"context_line":"                cmd \u003d (\"mdadm --create {} --level\u003d{} --raid-devices\u003d{} {} \""},{"line_number":1277,"context_line":"                       \"--force --run --metadata\u003d1\").format("},{"line_number":1278,"context_line":"                           md_device, raid_level, raid_devices,"},{"line_number":1279,"context_line":"                           component_devices)"},{"line_number":1280,"context_line":"                LOG.info(cmd)"},{"line_number":1281,"context_line":"                utils.execute(cmd, shell\u003dTrue)"},{"line_number":1282,"context_line":"            except processutils.ProcessExecutionError as e:"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_738ab0bf","line":1279,"range":{"start_line":1278,"start_character":50,"end_line":1279,"end_character":44},"updated":"2019-05-10 19:38:03.000000000","message":"My understanding of list_block_devices() (used above) is that it will return every drive attached to the system.\n\nSince the definitions of raid_devices and component_devices are derived from that, doesn\u0027t this imply we\u0027d be attempting to create a raid device using every drive attached to the system?","commit_id":"4bd48c7c7bf2344a97efe34e5617c9a13494fbfd"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"f5836c4a273ea80f07067a6446b88b44c8070994","unresolved":false,"context_lines":[{"line_number":1275,"context_line":"                         md_device, component_devices))"},{"line_number":1276,"context_line":"                cmd \u003d (\"mdadm --create {} --level\u003d{} --raid-devices\u003d{} {} \""},{"line_number":1277,"context_line":"                       \"--force --run --metadata\u003d1\").format("},{"line_number":1278,"context_line":"                           md_device, raid_level, raid_devices,"},{"line_number":1279,"context_line":"                           component_devices)"},{"line_number":1280,"context_line":"                LOG.info(cmd)"},{"line_number":1281,"context_line":"                utils.execute(cmd, shell\u003dTrue)"},{"line_number":1282,"context_line":"            except processutils.ProcessExecutionError as e:"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_d30fc934","line":1279,"range":{"start_line":1278,"start_character":50,"end_line":1279,"end_character":44},"in_reply_to":"dfbec78f_738ab0bf","updated":"2019-05-13 08:38:36.000000000","message":"That is correct. There are some limitations in this first implementation and this is one of them (it is also explicitly mentioned in the spec [1]).\n\nSuggestions how to do device selection and patches to amend this are welcome! :-)\n\n\n[1] https://review.opendev.org/#/c/624413/2/specs/approved/software-raid.rst","commit_id":"4bd48c7c7bf2344a97efe34e5617c9a13494fbfd"},{"author":{"_account_id":24843,"name":"Adam Kimball","email":"baha@linux.vnet.ibm.com","username":"baha"},"change_message_id":"f243870e8cb5bec73da0e12d65c6fad426e6f26c","unresolved":false,"context_lines":[{"line_number":1351,"context_line":""},{"line_number":1352,"context_line":"        logical_disks \u003d raid_config.get(\u0027logical_disks\u0027)"},{"line_number":1353,"context_line":"        if not logical_disks:"},{"line_number":1354,"context_line":"            LOG.error(\"RAID config contains mo logical disks\")"},{"line_number":1355,"context_line":"            return False"},{"line_number":1356,"context_line":""},{"line_number":1357,"context_line":"        rc \u003d True"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_c2d388d4","line":1354,"range":{"start_line":1354,"start_character":44,"end_line":1354,"end_character":46},"updated":"2019-05-10 19:38:03.000000000","message":"nit: s/mo/no","commit_id":"4bd48c7c7bf2344a97efe34e5617c9a13494fbfd"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"f5836c4a273ea80f07067a6446b88b44c8070994","unresolved":false,"context_lines":[{"line_number":1351,"context_line":""},{"line_number":1352,"context_line":"        logical_disks \u003d raid_config.get(\u0027logical_disks\u0027)"},{"line_number":1353,"context_line":"        if not logical_disks:"},{"line_number":1354,"context_line":"            LOG.error(\"RAID config contains mo logical disks\")"},{"line_number":1355,"context_line":"            return False"},{"line_number":1356,"context_line":""},{"line_number":1357,"context_line":"        rc \u003d True"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_f30c4d42","line":1354,"range":{"start_line":1354,"start_character":44,"end_line":1354,"end_character":46},"in_reply_to":"dfbec78f_c2d388d4","updated":"2019-05-13 08:38:36.000000000","message":"Thanks, I\u0027ll fix this.","commit_id":"4bd48c7c7bf2344a97efe34e5617c9a13494fbfd"},{"author":{"_account_id":24843,"name":"Adam Kimball","email":"baha@linux.vnet.ibm.com","username":"baha"},"change_message_id":"f243870e8cb5bec73da0e12d65c6fad426e6f26c","unresolved":false,"context_lines":[{"line_number":1356,"context_line":""},{"line_number":1357,"context_line":"        rc \u003d True"},{"line_number":1358,"context_line":""},{"line_number":1359,"context_line":"        # Only one or two RAID devices are supported for now."},{"line_number":1360,"context_line":"        if len(logical_disks) not in [1, 2]:"},{"line_number":1361,"context_line":"            LOG.error(\"Software RAID config needs one or two logical disks\")"},{"line_number":1362,"context_line":"            rc \u003d False"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_6205fc45","line":1359,"range":{"start_line":1359,"start_character":10,"end_line":1359,"end_character":61},"updated":"2019-05-10 19:38:03.000000000","message":"I\u0027m confused by this. The spec defines support for RAID5 and RAID6, which is not possible with only two disks. This, and the release notes, indicate 0, 1, and 10 support. Do we have plans for RAID5/6 or arbitrary numbers of disks be added later?","commit_id":"4bd48c7c7bf2344a97efe34e5617c9a13494fbfd"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"f5836c4a273ea80f07067a6446b88b44c8070994","unresolved":false,"context_lines":[{"line_number":1356,"context_line":""},{"line_number":1357,"context_line":"        rc \u003d True"},{"line_number":1358,"context_line":""},{"line_number":1359,"context_line":"        # Only one or two RAID devices are supported for now."},{"line_number":1360,"context_line":"        if len(logical_disks) not in [1, 2]:"},{"line_number":1361,"context_line":"            LOG.error(\"Software RAID config needs one or two logical disks\")"},{"line_number":1362,"context_line":"            rc \u003d False"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_e611e953","line":1359,"range":{"start_line":1359,"start_character":10,"end_line":1359,"end_character":61},"in_reply_to":"dfbec78f_6205fc45","updated":"2019-05-13 08:38:36.000000000","message":"It\u0027s RAID devices, not disks (we usually have servers with 4 disks in our deployment). There is no reason I exclude RAID-5 and RAID-6 here ... apart from the fact that I haven\u0027t tested this. This is indeed a discrepancy from the spec where I was more generous.","commit_id":"4bd48c7c7bf2344a97efe34e5617c9a13494fbfd"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        return []"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    component_devices \u003d []"},{"line_number":128,"context_line":"    out, _ \u003d utils.execute(\u0027mdadm\u0027, \u0027--detail\u0027, raid_device)"},{"line_number":129,"context_line":"    lines \u003d out.splitlines()"},{"line_number":130,"context_line":"    for line in lines:"},{"line_number":131,"context_line":"        if \u0027active sync\u0027 not in line:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_feef491b","line":128,"updated":"2019-05-24 08:22:54.000000000","message":"++ this needs at least some handling","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"02c96a34ef297894a3a76387fe5d76661cdc55cf","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        return []"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    component_devices \u003d []"},{"line_number":128,"context_line":"    out, _ \u003d utils.execute(\u0027mdadm\u0027, \u0027--detail\u0027, raid_device)"},{"line_number":129,"context_line":"    lines \u003d out.splitlines()"},{"line_number":130,"context_line":"    for line in lines:"},{"line_number":131,"context_line":"        if \u0027active sync\u0027 not in line:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_41c5b18d","line":128,"updated":"2019-05-20 14:17:50.000000000","message":"wondering if it\u0027s worth to call try_execute here instead","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"5ef3ee186f6eb85a4dbb9079d1749bafe4a73d3b","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        return []"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    component_devices \u003d []"},{"line_number":128,"context_line":"    out, _ \u003d utils.execute(\u0027mdadm\u0027, \u0027--detail\u0027, raid_device)"},{"line_number":129,"context_line":"    lines \u003d out.splitlines()"},{"line_number":130,"context_line":"    for line in lines:"},{"line_number":131,"context_line":"        if \u0027active sync\u0027 not in line:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_c53af096","line":128,"in_reply_to":"bfb3d3c7_41c5b18d","updated":"2019-05-21 18:26:33.000000000","message":"or just maybe try/except and return [] if there is a failure?","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        return []"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    component_devices \u003d []"},{"line_number":128,"context_line":"    out, _ \u003d utils.execute(\u0027mdadm\u0027, \u0027--detail\u0027, raid_device)"},{"line_number":129,"context_line":"    lines \u003d out.splitlines()"},{"line_number":130,"context_line":"    for line in lines:"},{"line_number":131,"context_line":"        if \u0027active sync\u0027 not in line:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_513ff885","line":128,"in_reply_to":"bfb3d3c7_feef491b","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    out, _ \u003d utils.execute(\u0027mdadm\u0027, \u0027--detail\u0027, raid_device)"},{"line_number":129,"context_line":"    lines \u003d out.splitlines()"},{"line_number":130,"context_line":"    for line in lines:"},{"line_number":131,"context_line":"        if \u0027active sync\u0027 not in line:"},{"line_number":132,"context_line":"            continue"},{"line_number":133,"context_line":"        device \u003d re.findall(r\u0027/dev/\\w+\u0027, line)"},{"line_number":134,"context_line":"        component_devices +\u003d device"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_9ef08dff","line":131,"updated":"2019-05-24 08:22:54.000000000","message":"Since we\u0027re trying to find English text, we should pass use_standard_local\u003dTrue to execute.","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    out, _ \u003d utils.execute(\u0027mdadm\u0027, \u0027--detail\u0027, raid_device)"},{"line_number":129,"context_line":"    lines \u003d out.splitlines()"},{"line_number":130,"context_line":"    for line in lines:"},{"line_number":131,"context_line":"        if \u0027active sync\u0027 not in line:"},{"line_number":132,"context_line":"            continue"},{"line_number":133,"context_line":"        device \u003d re.findall(r\u0027/dev/\\w+\u0027, line)"},{"line_number":134,"context_line":"        component_devices +\u003d device"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_71423c11","line":131,"in_reply_to":"bfb3d3c7_545c18ec","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"cf950c3b66c5c94b2adb13d5476028011272f8b1","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    out, _ \u003d utils.execute(\u0027mdadm\u0027, \u0027--detail\u0027, raid_device)"},{"line_number":129,"context_line":"    lines \u003d out.splitlines()"},{"line_number":130,"context_line":"    for line in lines:"},{"line_number":131,"context_line":"        if \u0027active sync\u0027 not in line:"},{"line_number":132,"context_line":"            continue"},{"line_number":133,"context_line":"        device \u003d re.findall(r\u0027/dev/\\w+\u0027, line)"},{"line_number":134,"context_line":"        component_devices +\u003d device"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_545c18ec","line":131,"in_reply_to":"bfb3d3c7_9ef08dff","updated":"2019-05-27 14:34:49.000000000","message":"good point","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1180,"context_line":"                \u0027step\u0027: \u0027delete_configuration\u0027,"},{"line_number":1181,"context_line":"                \u0027priority\u0027: 0,"},{"line_number":1182,"context_line":"                \u0027interface\u0027: \u0027raid\u0027,"},{"line_number":1183,"context_line":"                \u0027reboot_requested\u0027: False,"},{"line_number":1184,"context_line":"                \u0027abortable\u0027: True"},{"line_number":1185,"context_line":"            },"},{"line_number":1186,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_bef551ef","line":1183,"updated":"2019-05-24 08:22:54.000000000","message":"I wonder if this is correct.. Will it really work on fly?","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"0c6c3a3391f2673b0b0a3cb2162769cedaaec166","unresolved":false,"context_lines":[{"line_number":1180,"context_line":"                \u0027step\u0027: \u0027delete_configuration\u0027,"},{"line_number":1181,"context_line":"                \u0027priority\u0027: 0,"},{"line_number":1182,"context_line":"                \u0027interface\u0027: \u0027raid\u0027,"},{"line_number":1183,"context_line":"                \u0027reboot_requested\u0027: False,"},{"line_number":1184,"context_line":"                \u0027abortable\u0027: True"},{"line_number":1185,"context_line":"            },"},{"line_number":1186,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":20,"id":"9fb8cfa7_6d6491ba","line":1183,"in_reply_to":"bfb3d3c7_31712477","updated":"2019-05-31 17:51:47.000000000","message":"It does, it is dynamic multidevice support!","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1180,"context_line":"                \u0027step\u0027: \u0027delete_configuration\u0027,"},{"line_number":1181,"context_line":"                \u0027priority\u0027: 0,"},{"line_number":1182,"context_line":"                \u0027interface\u0027: \u0027raid\u0027,"},{"line_number":1183,"context_line":"                \u0027reboot_requested\u0027: False,"},{"line_number":1184,"context_line":"                \u0027abortable\u0027: True"},{"line_number":1185,"context_line":"            },"},{"line_number":1186,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_31712477","line":1183,"in_reply_to":"bfb3d3c7_bef551ef","updated":"2019-05-31 11:07:13.000000000","message":"It should :) But I was also assuming that the manual cleaning will end with a reboot, no? Anyway: even if multiple steps are performed, I don\u0027t think a reboot is required.","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1207,"context_line":"                 valid or if there was an error when creating the RAID"},{"line_number":1208,"context_line":"                 devices."},{"line_number":1209,"context_line":"        \"\"\""},{"line_number":1210,"context_line":"        LOG.info(\"Creating Software RAID\")"},{"line_number":1211,"context_line":""},{"line_number":1212,"context_line":"        raid_config \u003d node.get(\u0027target_raid_config\u0027, {})"},{"line_number":1213,"context_line":"        if raid_config \u003d\u003d {}:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_5ede956d","line":1210,"updated":"2019-05-24 08:22:54.000000000","message":"let\u0027s log target_raid_config here for some useful details","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1207,"context_line":"                 valid or if there was an error when creating the RAID"},{"line_number":1208,"context_line":"                 devices."},{"line_number":1209,"context_line":"        \"\"\""},{"line_number":1210,"context_line":"        LOG.info(\"Creating Software RAID\")"},{"line_number":1211,"context_line":""},{"line_number":1212,"context_line":"        raid_config \u003d node.get(\u0027target_raid_config\u0027, {})"},{"line_number":1213,"context_line":"        if raid_config \u003d\u003d {}:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_71b31cea","line":1210,"in_reply_to":"bfb3d3c7_5ede956d","updated":"2019-05-31 11:07:13.000000000","message":"Done: Logged after the validation.","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1211,"context_line":""},{"line_number":1212,"context_line":"        raid_config \u003d node.get(\u0027target_raid_config\u0027, {})"},{"line_number":1213,"context_line":"        if raid_config \u003d\u003d {}:"},{"line_number":1214,"context_line":"            return {}"},{"line_number":1215,"context_line":"        if not self.validate_configuration(raid_config):"},{"line_number":1216,"context_line":"            msg \u003d \"Software RAID configuration is invalid\""},{"line_number":1217,"context_line":"            raise errors.SoftwareRAIDError(msg)"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_7edb597b","line":1214,"updated":"2019-05-24 08:22:54.000000000","message":".. and log it after this check","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1211,"context_line":""},{"line_number":1212,"context_line":"        raid_config \u003d node.get(\u0027target_raid_config\u0027, {})"},{"line_number":1213,"context_line":"        if raid_config \u003d\u003d {}:"},{"line_number":1214,"context_line":"            return {}"},{"line_number":1215,"context_line":"        if not self.validate_configuration(raid_config):"},{"line_number":1216,"context_line":"            msg \u003d \"Software RAID configuration is invalid\""},{"line_number":1217,"context_line":"            raise errors.SoftwareRAIDError(msg)"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_f1662cbb","line":1214,"in_reply_to":"bfb3d3c7_7edb597b","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1213,"context_line":"        if raid_config \u003d\u003d {}:"},{"line_number":1214,"context_line":"            return {}"},{"line_number":1215,"context_line":"        if not self.validate_configuration(raid_config):"},{"line_number":1216,"context_line":"            msg \u003d \"Software RAID configuration is invalid\""},{"line_number":1217,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"        # Make sure there are no partitions yet (or left behind)."}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_1ee49d3b","line":1216,"updated":"2019-05-24 08:22:54.000000000","message":"Can we include some error message? It will be a nightmare to troubleshoot.","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1213,"context_line":"        if raid_config \u003d\u003d {}:"},{"line_number":1214,"context_line":"            return {}"},{"line_number":1215,"context_line":"        if not self.validate_configuration(raid_config):"},{"line_number":1216,"context_line":"            msg \u003d \"Software RAID configuration is invalid\""},{"line_number":1217,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"        # Make sure there are no partitions yet (or left behind)."}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_7110fc00","line":1216,"in_reply_to":"bfb3d3c7_1ee49d3b","updated":"2019-05-31 11:07:13.000000000","message":"validate_configuration will provide the details, I think. But see also below.","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1221,"context_line":"        block_devices_partitions \u003d self.list_block_devices("},{"line_number":1222,"context_line":"            include_partitions\u003dTrue)"},{"line_number":1223,"context_line":"        if len(block_devices) !\u003d len(block_devices_partitions):"},{"line_number":1224,"context_line":"            msg \u003d \"Partitions detected during RAID config\""},{"line_number":1225,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1226,"context_line":""},{"line_number":1227,"context_line":"        # Create an MBR partition table on each disk."}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_3ee1612b","line":1224,"updated":"2019-05-24 08:22:54.000000000","message":"Let\u0027s add the detected partitions (set(block_device_partitions) - set(block_devices)) to the error message.","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1221,"context_line":"        block_devices_partitions \u003d self.list_block_devices("},{"line_number":1222,"context_line":"            include_partitions\u003dTrue)"},{"line_number":1223,"context_line":"        if len(block_devices) !\u003d len(block_devices_partitions):"},{"line_number":1224,"context_line":"            msg \u003d \"Partitions detected during RAID config\""},{"line_number":1225,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1226,"context_line":""},{"line_number":1227,"context_line":"        # Create an MBR partition table on each disk."}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_11fbc0c0","line":1224,"in_reply_to":"bfb3d3c7_3ee1612b","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1225,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1226,"context_line":""},{"line_number":1227,"context_line":"        # Create an MBR partition table on each disk."},{"line_number":1228,"context_line":"        # TODO(arne_wiebalck): Check if GPT would work as well."},{"line_number":1229,"context_line":"        for block_device in block_devices:"},{"line_number":1230,"context_line":"            LOG.info(\"Creating partition table on {}\".format("},{"line_number":1231,"context_line":"                block_device.name))"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_ded3655f","line":1228,"updated":"2019-05-24 08:22:54.000000000","message":"++ UEFI is taking over the world","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1239,"context_line":""},{"line_number":1240,"context_line":"        # Create the partitions which will become the component devices."},{"line_number":1241,"context_line":"        logical_disks \u003d raid_config.get(\u0027logical_disks\u0027)"},{"line_number":1242,"context_line":"        sector \u003d \u00272048s\u0027"},{"line_number":1243,"context_line":"        for logical_disk in logical_disks:"},{"line_number":1244,"context_line":"            psize \u003d logical_disk[\u0027size_gb\u0027]"},{"line_number":1245,"context_line":"            if psize \u003d\u003d \u0027MAX\u0027:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_fed8a97b","line":1242,"updated":"2019-05-24 08:22:54.000000000","message":"nit: Make this configurable?","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1239,"context_line":""},{"line_number":1240,"context_line":"        # Create the partitions which will become the component devices."},{"line_number":1241,"context_line":"        logical_disks \u003d raid_config.get(\u0027logical_disks\u0027)"},{"line_number":1242,"context_line":"        sector \u003d \u00272048s\u0027"},{"line_number":1243,"context_line":"        for logical_disk in logical_disks:"},{"line_number":1244,"context_line":"            psize \u003d logical_disk[\u0027size_gb\u0027]"},{"line_number":1245,"context_line":"            if psize \u003d\u003d \u0027MAX\u0027:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_311fe408","line":1242,"in_reply_to":"bfb3d3c7_fed8a97b","updated":"2019-05-31 11:07:13.000000000","message":"Left it as is for now: seems a dangerous param to play around with :)","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1248,"context_line":"                psize \u003d int(psize) * 1024"},{"line_number":1249,"context_line":"            for device in block_devices:"},{"line_number":1250,"context_line":"                try:"},{"line_number":1251,"context_line":"                    LOG.info(\"Creating partition on {}: {} {}\".format("},{"line_number":1252,"context_line":"                        device.name, sector, psize))"},{"line_number":1253,"context_line":"                    utils.execute(\u0027parted\u0027, device.name, \u0027-s\u0027, \u0027-a\u0027,"},{"line_number":1254,"context_line":"                                  \u0027optimal\u0027, \u0027--\u0027, \u0027mkpart\u0027, \u0027primary\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_9ec96dad","line":1251,"updated":"2019-05-24 08:22:54.000000000","message":"s/info/debug/","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1248,"context_line":"                psize \u003d int(psize) * 1024"},{"line_number":1249,"context_line":"            for device in block_devices:"},{"line_number":1250,"context_line":"                try:"},{"line_number":1251,"context_line":"                    LOG.info(\"Creating partition on {}: {} {}\".format("},{"line_number":1252,"context_line":"                        device.name, sector, psize))"},{"line_number":1253,"context_line":"                    utils.execute(\u0027parted\u0027, device.name, \u0027-s\u0027, \u0027-a\u0027,"},{"line_number":1254,"context_line":"                                  \u0027optimal\u0027, \u0027--\u0027, \u0027mkpart\u0027, \u0027primary\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_f114ecea","line":1251,"in_reply_to":"bfb3d3c7_9ec96dad","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1260,"context_line":"            sector \u003d psize"},{"line_number":1261,"context_line":""},{"line_number":1262,"context_line":"        # Create the RAID devices."},{"line_number":1263,"context_line":"        raid_devices \u003d len(block_devices)"},{"line_number":1264,"context_line":"        for index, logical_disk in enumerate(logical_disks):"},{"line_number":1265,"context_line":"            md_device \u003d \u0027/dev/md\u0027 + str(index)"},{"line_number":1266,"context_line":"            component_devices \u003d \u0027 \u0027.join("}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_beceb1b1","line":1263,"updated":"2019-05-24 08:22:54.000000000","message":"nit: raid_device_count?","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1260,"context_line":"            sector \u003d psize"},{"line_number":1261,"context_line":""},{"line_number":1262,"context_line":"        # Create the RAID devices."},{"line_number":1263,"context_line":"        raid_devices \u003d len(block_devices)"},{"line_number":1264,"context_line":"        for index, logical_disk in enumerate(logical_disks):"},{"line_number":1265,"context_line":"            md_device \u003d \u0027/dev/md\u0027 + str(index)"},{"line_number":1266,"context_line":"            component_devices \u003d \u0027 \u0027.join("}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_51db784d","line":1263,"in_reply_to":"bfb3d3c7_beceb1b1","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1262,"context_line":"        # Create the RAID devices."},{"line_number":1263,"context_line":"        raid_devices \u003d len(block_devices)"},{"line_number":1264,"context_line":"        for index, logical_disk in enumerate(logical_disks):"},{"line_number":1265,"context_line":"            md_device \u003d \u0027/dev/md\u0027 + str(index)"},{"line_number":1266,"context_line":"            component_devices \u003d \u0027 \u0027.join("},{"line_number":1267,"context_line":"                [device.name + str(index + 1) for device in block_devices])"},{"line_number":1268,"context_line":"            raid_level \u003d logical_disk[\u0027raid_level\u0027]"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_5ec77597","line":1265,"updated":"2019-05-24 08:22:54.000000000","message":"nit: use formatting","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1262,"context_line":"        # Create the RAID devices."},{"line_number":1263,"context_line":"        raid_devices \u003d len(block_devices)"},{"line_number":1264,"context_line":"        for index, logical_disk in enumerate(logical_disks):"},{"line_number":1265,"context_line":"            md_device \u003d \u0027/dev/md\u0027 + str(index)"},{"line_number":1266,"context_line":"            component_devices \u003d \u0027 \u0027.join("},{"line_number":1267,"context_line":"                [device.name + str(index + 1) for device in block_devices])"},{"line_number":1268,"context_line":"            raid_level \u003d logical_disk[\u0027raid_level\u0027]"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_91bed0d2","line":1265,"in_reply_to":"bfb3d3c7_5ec77597","updated":"2019-05-31 11:07:13.000000000","message":"Could you explain a little more?","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"85659b812aa33d65c8c5faebd47fb0415a23148e","unresolved":false,"context_lines":[{"line_number":1262,"context_line":"        # Create the RAID devices."},{"line_number":1263,"context_line":"        raid_devices \u003d len(block_devices)"},{"line_number":1264,"context_line":"        for index, logical_disk in enumerate(logical_disks):"},{"line_number":1265,"context_line":"            md_device \u003d \u0027/dev/md\u0027 + str(index)"},{"line_number":1266,"context_line":"            component_devices \u003d \u0027 \u0027.join("},{"line_number":1267,"context_line":"                [device.name + str(index + 1) for device in block_devices])"},{"line_number":1268,"context_line":"            raid_level \u003d logical_disk[\u0027raid_level\u0027]"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_a267044d","line":1265,"in_reply_to":"bfb3d3c7_91bed0d2","updated":"2019-05-31 13:26:07.000000000","message":"\u0027/dev/md%d\u0027 % index","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"785311a0d9b59b5ed80cdefa7c78d2b643c24c8a","unresolved":false,"context_lines":[{"line_number":1262,"context_line":"        # Create the RAID devices."},{"line_number":1263,"context_line":"        raid_devices \u003d len(block_devices)"},{"line_number":1264,"context_line":"        for index, logical_disk in enumerate(logical_disks):"},{"line_number":1265,"context_line":"            md_device \u003d \u0027/dev/md\u0027 + str(index)"},{"line_number":1266,"context_line":"            component_devices \u003d \u0027 \u0027.join("},{"line_number":1267,"context_line":"                [device.name + str(index + 1) for device in block_devices])"},{"line_number":1268,"context_line":"            raid_level \u003d logical_disk[\u0027raid_level\u0027]"}],"source_content_type":"text/x-python","patch_set":20,"id":"9fb8cfa7_6ac237ec","line":1265,"in_reply_to":"bfb3d3c7_a267044d","updated":"2019-05-31 17:23:53.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1264,"context_line":"        for index, logical_disk in enumerate(logical_disks):"},{"line_number":1265,"context_line":"            md_device \u003d \u0027/dev/md\u0027 + str(index)"},{"line_number":1266,"context_line":"            component_devices \u003d \u0027 \u0027.join("},{"line_number":1267,"context_line":"                [device.name + str(index + 1) for device in block_devices])"},{"line_number":1268,"context_line":"            raid_level \u003d logical_disk[\u0027raid_level\u0027]"},{"line_number":1269,"context_line":"            # The schema check allows \u00271+0\u0027, but mdadm knows it as \u002710\u0027."},{"line_number":1270,"context_line":"            if raid_level \u003d\u003d \u00271+0\u0027:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_7ec4b991","line":1267,"updated":"2019-05-24 08:22:54.000000000","message":"nit: [] redundant","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1264,"context_line":"        for index, logical_disk in enumerate(logical_disks):"},{"line_number":1265,"context_line":"            md_device \u003d \u0027/dev/md\u0027 + str(index)"},{"line_number":1266,"context_line":"            component_devices \u003d \u0027 \u0027.join("},{"line_number":1267,"context_line":"                [device.name + str(index + 1) for device in block_devices])"},{"line_number":1268,"context_line":"            raid_level \u003d logical_disk[\u0027raid_level\u0027]"},{"line_number":1269,"context_line":"            # The schema check allows \u00271+0\u0027, but mdadm knows it as \u002710\u0027."},{"line_number":1270,"context_line":"            if raid_level \u003d\u003d \u00271+0\u0027:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_b1c19456","line":1267,"in_reply_to":"bfb3d3c7_7ec4b991","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1268,"context_line":"            raid_level \u003d logical_disk[\u0027raid_level\u0027]"},{"line_number":1269,"context_line":"            # The schema check allows \u00271+0\u0027, but mdadm knows it as \u002710\u0027."},{"line_number":1270,"context_line":"            if raid_level \u003d\u003d \u00271+0\u0027:"},{"line_number":1271,"context_line":"                LOG.debug(\"Adapting RAID level from \u00271+0\u0027 to \u002710\u0027\")"},{"line_number":1272,"context_line":"                raid_level \u003d \u002710\u0027"},{"line_number":1273,"context_line":"            try:"},{"line_number":1274,"context_line":"                LOG.info(\"Creating md device {} on {}\".format("}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_1ebd7d01","line":1271,"updated":"2019-05-24 08:22:54.000000000","message":"nit: I don\u0027t think this is useful logging","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1268,"context_line":"            raid_level \u003d logical_disk[\u0027raid_level\u0027]"},{"line_number":1269,"context_line":"            # The schema check allows \u00271+0\u0027, but mdadm knows it as \u002710\u0027."},{"line_number":1270,"context_line":"            if raid_level \u003d\u003d \u00271+0\u0027:"},{"line_number":1271,"context_line":"                LOG.debug(\"Adapting RAID level from \u00271+0\u0027 to \u002710\u0027\")"},{"line_number":1272,"context_line":"                raid_level \u003d \u002710\u0027"},{"line_number":1273,"context_line":"            try:"},{"line_number":1274,"context_line":"                LOG.info(\"Creating md device {} on {}\".format("}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_51b4d8f1","line":1271,"in_reply_to":"bfb3d3c7_1ebd7d01","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"                LOG.debug(\"Adapting RAID level from \u00271+0\u0027 to \u002710\u0027\")"},{"line_number":1272,"context_line":"                raid_level \u003d \u002710\u0027"},{"line_number":1273,"context_line":"            try:"},{"line_number":1274,"context_line":"                LOG.info(\"Creating md device {} on {}\".format("},{"line_number":1275,"context_line":"                         md_device, component_devices))"},{"line_number":1276,"context_line":"                cmd \u003d (\"mdadm --create {} --level\u003d{} --raid-devices\u003d{} {} \""},{"line_number":1277,"context_line":"                       \"--force --run --metadata\u003d1\").format("}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_3ebac109","line":1274,"updated":"2019-05-24 08:22:54.000000000","message":"s/info/debug/","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"                LOG.debug(\"Adapting RAID level from \u00271+0\u0027 to \u002710\u0027\")"},{"line_number":1272,"context_line":"                raid_level \u003d \u002710\u0027"},{"line_number":1273,"context_line":"            try:"},{"line_number":1274,"context_line":"                LOG.info(\"Creating md device {} on {}\".format("},{"line_number":1275,"context_line":"                         md_device, component_devices))"},{"line_number":1276,"context_line":"                cmd \u003d (\"mdadm --create {} --level\u003d{} --raid-devices\u003d{} {} \""},{"line_number":1277,"context_line":"                       \"--force --run --metadata\u003d1\").format("}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_71b79cf6","line":1274,"in_reply_to":"bfb3d3c7_3ebac109","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1277,"context_line":"                       \"--force --run --metadata\u003d1\").format("},{"line_number":1278,"context_line":"                           md_device, raid_level, raid_devices,"},{"line_number":1279,"context_line":"                           component_devices)"},{"line_number":1280,"context_line":"                LOG.info(cmd)"},{"line_number":1281,"context_line":"                utils.execute(cmd, shell\u003dTrue)"},{"line_number":1282,"context_line":"            except processutils.ProcessExecutionError as e:"},{"line_number":1283,"context_line":"                msg \u003d \"Failed to create md device {} on {}: {}\".format("}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_de3845a1","line":1280,"updated":"2019-05-24 08:22:54.000000000","message":"commands are logged by ironic-lib, no need to do it here (esp. in INFO)","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1277,"context_line":"                       \"--force --run --metadata\u003d1\").format("},{"line_number":1278,"context_line":"                           md_device, raid_level, raid_devices,"},{"line_number":1279,"context_line":"                           component_devices)"},{"line_number":1280,"context_line":"                LOG.info(cmd)"},{"line_number":1281,"context_line":"                utils.execute(cmd, shell\u003dTrue)"},{"line_number":1282,"context_line":"            except processutils.ProcessExecutionError as e:"},{"line_number":1283,"context_line":"                msg \u003d \"Failed to create md device {} on {}: {}\".format("}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_11d2e028","line":1280,"in_reply_to":"bfb3d3c7_de3845a1","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"02c96a34ef297894a3a76387fe5d76661cdc55cf","unresolved":false,"context_lines":[{"line_number":1278,"context_line":"                           md_device, raid_level, raid_devices,"},{"line_number":1279,"context_line":"                           component_devices)"},{"line_number":1280,"context_line":"                LOG.info(cmd)"},{"line_number":1281,"context_line":"                utils.execute(cmd, shell\u003dTrue)"},{"line_number":1282,"context_line":"            except processutils.ProcessExecutionError as e:"},{"line_number":1283,"context_line":"                msg \u003d \"Failed to create md device {} on {}: {}\".format("},{"line_number":1284,"context_line":"                    md_device, component_devices, e)"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_21ff5dab","line":1281,"updated":"2019-05-20 14:17:50.000000000","message":"ditto","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"5ef3ee186f6eb85a4dbb9079d1749bafe4a73d3b","unresolved":false,"context_lines":[{"line_number":1278,"context_line":"                           md_device, raid_level, raid_devices,"},{"line_number":1279,"context_line":"                           component_devices)"},{"line_number":1280,"context_line":"                LOG.info(cmd)"},{"line_number":1281,"context_line":"                utils.execute(cmd, shell\u003dTrue)"},{"line_number":1282,"context_line":"            except processutils.ProcessExecutionError as e:"},{"line_number":1283,"context_line":"                msg \u003d \"Failed to create md device {} on {}: {}\".format("},{"line_number":1284,"context_line":"                    md_device, component_devices, e)"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_e51b7418","line":1281,"in_reply_to":"bfb3d3c7_21ff5dab","updated":"2019-05-21 18:26:33.000000000","message":"I suspect less important since the catch is present.","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"                    md_device, component_devices, e)"},{"line_number":1285,"context_line":"                raise errors.SoftwareRAIDError(msg)"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"        LOG.debug(\"Finished creating Software RAID\")"},{"line_number":1288,"context_line":""},{"line_number":1289,"context_line":"        return raid_config"},{"line_number":1290,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_fe3d098f","line":1287,"updated":"2019-05-24 08:22:54.000000000","message":"nit: This actually can be info (maybe add some details)","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"                    md_device, component_devices, e)"},{"line_number":1285,"context_line":"                raise errors.SoftwareRAIDError(msg)"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"        LOG.debug(\"Finished creating Software RAID\")"},{"line_number":1288,"context_line":""},{"line_number":1289,"context_line":"        return raid_config"},{"line_number":1290,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_91a330b2","line":1287,"in_reply_to":"bfb3d3c7_fe3d098f","updated":"2019-05-31 11:07:13.000000000","message":"Done. Wasn\u0027t sure what additional info to add, though. Any suggestions?","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1311,"context_line":"                     raid_device.name))"},{"line_number":1312,"context_line":""},{"line_number":1313,"context_line":"            component_devices \u003d _get_component_devices(raid_device.name)"},{"line_number":1314,"context_line":"            LOG.info(\"Found component devices {}\".format("},{"line_number":1315,"context_line":"                     component_devices))"},{"line_number":1316,"context_line":""},{"line_number":1317,"context_line":"            # remove md devices"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_9e3e4d89","line":1314,"updated":"2019-05-24 08:22:54.000000000","message":"s/info/debug/","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1311,"context_line":"                     raid_device.name))"},{"line_number":1312,"context_line":""},{"line_number":1313,"context_line":"            component_devices \u003d _get_component_devices(raid_device.name)"},{"line_number":1314,"context_line":"            LOG.info(\"Found component devices {}\".format("},{"line_number":1315,"context_line":"                     component_devices))"},{"line_number":1316,"context_line":""},{"line_number":1317,"context_line":"            # remove md devices"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_b1a674c0","line":1314,"in_reply_to":"bfb3d3c7_9e3e4d89","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"02c96a34ef297894a3a76387fe5d76661cdc55cf","unresolved":false,"context_lines":[{"line_number":1315,"context_line":"                     component_devices))"},{"line_number":1316,"context_line":""},{"line_number":1317,"context_line":"            # remove md devices"},{"line_number":1318,"context_line":"            utils.execute(\u0027wipefs\u0027, \u0027-af\u0027, raid_device.name)"},{"line_number":1319,"context_line":"            utils.execute(\u0027mdadm\u0027, \u0027--stop\u0027, raid_device.name)"},{"line_number":1320,"context_line":""},{"line_number":1321,"context_line":"            # remove md metadata from component devices"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_61e31507","line":1318,"updated":"2019-05-20 14:17:50.000000000","message":"ditto","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1315,"context_line":"                     component_devices))"},{"line_number":1316,"context_line":""},{"line_number":1317,"context_line":"            # remove md devices"},{"line_number":1318,"context_line":"            utils.execute(\u0027wipefs\u0027, \u0027-af\u0027, raid_device.name)"},{"line_number":1319,"context_line":"            utils.execute(\u0027mdadm\u0027, \u0027--stop\u0027, raid_device.name)"},{"line_number":1320,"context_line":""},{"line_number":1321,"context_line":"            # remove md metadata from component devices"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_51a9388d","line":1318,"in_reply_to":"bfb3d3c7_61e31507","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"02c96a34ef297894a3a76387fe5d76661cdc55cf","unresolved":false,"context_lines":[{"line_number":1316,"context_line":""},{"line_number":1317,"context_line":"            # remove md devices"},{"line_number":1318,"context_line":"            utils.execute(\u0027wipefs\u0027, \u0027-af\u0027, raid_device.name)"},{"line_number":1319,"context_line":"            utils.execute(\u0027mdadm\u0027, \u0027--stop\u0027, raid_device.name)"},{"line_number":1320,"context_line":""},{"line_number":1321,"context_line":"            # remove md metadata from component devices"},{"line_number":1322,"context_line":"            for component_device in component_devices:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_c1bbe1e2","line":1319,"updated":"2019-05-20 14:17:50.000000000","message":"ditto","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1316,"context_line":""},{"line_number":1317,"context_line":"            # remove md devices"},{"line_number":1318,"context_line":"            utils.execute(\u0027wipefs\u0027, \u0027-af\u0027, raid_device.name)"},{"line_number":1319,"context_line":"            utils.execute(\u0027mdadm\u0027, \u0027--stop\u0027, raid_device.name)"},{"line_number":1320,"context_line":""},{"line_number":1321,"context_line":"            # remove md metadata from component devices"},{"line_number":1322,"context_line":"            for component_device in component_devices:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_71ac7c9e","line":1319,"in_reply_to":"bfb3d3c7_c1bbe1e2","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"02c96a34ef297894a3a76387fe5d76661cdc55cf","unresolved":false,"context_lines":[{"line_number":1320,"context_line":""},{"line_number":1321,"context_line":"            # remove md metadata from component devices"},{"line_number":1322,"context_line":"            for component_device in component_devices:"},{"line_number":1323,"context_line":"                _, err \u003d utils.execute(\u0027mdadm\u0027, \u0027--examine\u0027,"},{"line_number":1324,"context_line":"                                       component_device)"},{"line_number":1325,"context_line":"                if \"No md superblock detected\" in err:"},{"line_number":1326,"context_line":"                    # actually not a component device"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_81b5e9f0","line":1323,"updated":"2019-05-20 14:17:50.000000000","message":"ditto","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1320,"context_line":""},{"line_number":1321,"context_line":"            # remove md metadata from component devices"},{"line_number":1322,"context_line":"            for component_device in component_devices:"},{"line_number":1323,"context_line":"                _, err \u003d utils.execute(\u0027mdadm\u0027, \u0027--examine\u0027,"},{"line_number":1324,"context_line":"                                       component_device)"},{"line_number":1325,"context_line":"                if \"No md superblock detected\" in err:"},{"line_number":1326,"context_line":"                    # actually not a component device"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_1197404a","line":1323,"in_reply_to":"bfb3d3c7_81b5e9f0","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1325,"context_line":"                if \"No md superblock detected\" in err:"},{"line_number":1326,"context_line":"                    # actually not a component device"},{"line_number":1327,"context_line":"                    continue"},{"line_number":1328,"context_line":"                LOG.info(\"Deleting md superblock on {}\".format("},{"line_number":1329,"context_line":"                         component_device))"},{"line_number":1330,"context_line":"                utils.execute(\u0027mdadm\u0027, \u0027--zero-superblock\u0027, component_device)"},{"line_number":1331,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_be431113","line":1328,"updated":"2019-05-24 08:22:54.000000000","message":"nit: debug","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1325,"context_line":"                if \"No md superblock detected\" in err:"},{"line_number":1326,"context_line":"                    # actually not a component device"},{"line_number":1327,"context_line":"                    continue"},{"line_number":1328,"context_line":"                LOG.info(\"Deleting md superblock on {}\".format("},{"line_number":1329,"context_line":"                         component_device))"},{"line_number":1330,"context_line":"                utils.execute(\u0027mdadm\u0027, \u0027--zero-superblock\u0027, component_device)"},{"line_number":1331,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_31928458","line":1328,"in_reply_to":"bfb3d3c7_be431113","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"02c96a34ef297894a3a76387fe5d76661cdc55cf","unresolved":false,"context_lines":[{"line_number":1327,"context_line":"                    continue"},{"line_number":1328,"context_line":"                LOG.info(\"Deleting md superblock on {}\".format("},{"line_number":1329,"context_line":"                         component_device))"},{"line_number":1330,"context_line":"                utils.execute(\u0027mdadm\u0027, \u0027--zero-superblock\u0027, component_device)"},{"line_number":1331,"context_line":""},{"line_number":1332,"context_line":"            LOG.info(\"Deleted Software RAID device {}\".format("},{"line_number":1333,"context_line":"                     raid_device.name))"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_a1ba6ddb","line":1330,"updated":"2019-05-20 14:17:50.000000000","message":"ditto","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1327,"context_line":"                    continue"},{"line_number":1328,"context_line":"                LOG.info(\"Deleting md superblock on {}\".format("},{"line_number":1329,"context_line":"                         component_device))"},{"line_number":1330,"context_line":"                utils.execute(\u0027mdadm\u0027, \u0027--zero-superblock\u0027, component_device)"},{"line_number":1331,"context_line":""},{"line_number":1332,"context_line":"            LOG.info(\"Deleted Software RAID device {}\".format("},{"line_number":1333,"context_line":"                     raid_device.name))"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_f1970c44","line":1330,"in_reply_to":"bfb3d3c7_a1ba6ddb","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":1347,"context_line":""},{"line_number":1348,"context_line":"        if not raid_config:"},{"line_number":1349,"context_line":"            LOG.error(\"No RAID config passed\")"},{"line_number":1350,"context_line":"            return False"},{"line_number":1351,"context_line":""},{"line_number":1352,"context_line":"        logical_disks \u003d raid_config.get(\u0027logical_disks\u0027)"},{"line_number":1353,"context_line":"        if not logical_disks:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_5e4c5541","line":1350,"updated":"2019-05-24 08:22:54.000000000","message":"This function should return the error, so that it can be passed back to the conductor and eventually to node.last_error. IPA logs are not always trivial to access.","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":1347,"context_line":""},{"line_number":1348,"context_line":"        if not raid_config:"},{"line_number":1349,"context_line":"            LOG.error(\"No RAID config passed\")"},{"line_number":1350,"context_line":"            return False"},{"line_number":1351,"context_line":""},{"line_number":1352,"context_line":"        logical_disks \u003d raid_config.get(\u0027logical_disks\u0027)"},{"line_number":1353,"context_line":"        if not logical_disks:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_d1aa086f","line":1350,"in_reply_to":"bfb3d3c7_5e4c5541","updated":"2019-05-31 11:07:13.000000000","message":"I agree, IPA debugging is not convenient :)\nBut I am not clear on how the messaging back to the conductor works ... could you expand a little or point me to an example?","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"85659b812aa33d65c8c5faebd47fb0415a23148e","unresolved":false,"context_lines":[{"line_number":1347,"context_line":""},{"line_number":1348,"context_line":"        if not raid_config:"},{"line_number":1349,"context_line":"            LOG.error(\"No RAID config passed\")"},{"line_number":1350,"context_line":"            return False"},{"line_number":1351,"context_line":""},{"line_number":1352,"context_line":"        logical_disks \u003d raid_config.get(\u0027logical_disks\u0027)"},{"line_number":1353,"context_line":"        if not logical_disks:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_e26f3c25","line":1350,"in_reply_to":"bfb3d3c7_d1aa086f","updated":"2019-05-31 13:26:07.000000000","message":"I think just raising an exception instead of returning False will be enough.","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"785311a0d9b59b5ed80cdefa7c78d2b643c24c8a","unresolved":false,"context_lines":[{"line_number":1347,"context_line":""},{"line_number":1348,"context_line":"        if not raid_config:"},{"line_number":1349,"context_line":"            LOG.error(\"No RAID config passed\")"},{"line_number":1350,"context_line":"            return False"},{"line_number":1351,"context_line":""},{"line_number":1352,"context_line":"        logical_disks \u003d raid_config.get(\u0027logical_disks\u0027)"},{"line_number":1353,"context_line":"        if not logical_disks:"}],"source_content_type":"text/x-python","patch_set":20,"id":"9fb8cfa7_2a4aff7f","line":1350,"in_reply_to":"bfb3d3c7_e26f3c25","updated":"2019-05-31 17:23:53.000000000","message":"Hmm ... I changed the function earlier to have all issues with the target RAID config to be logged (see Shivanand\u0027s comment above). If this functions raises an exception in order to have more info in the conductor logs, I\u0027d need to append all issues to the exception message ... or is there a better way?","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7abc6592f204b30deb99cf402986449ae73dbdce","unresolved":false,"context_lines":[{"line_number":133,"context_line":"               {\u0027dev\u0027: raid_device, \u0027err\u0027: e})"},{"line_number":134,"context_line":"        raise errors.SoftwareRAIDError(msg)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    lines \u003d out.splitlines()"},{"line_number":137,"context_line":"    for line in lines:"},{"line_number":138,"context_line":"        if \u0027active sync\u0027 not in line:"},{"line_number":139,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":21,"id":"bfb3d3c7_dda539a0","line":136,"updated":"2019-05-31 13:58:13.000000000","message":"I have no idea what mdadm output looks like, so I can\u0027t evaluate whether this parsing code is doing what\u0027s expected. Could you add a comment here showing a sample of what we would expect to see?","commit_id":"0fc2465346e91326f76c1130990300083f285b84"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"1389f5f0273e9d411f5a0cb96a780a1d423a7359","unresolved":false,"context_lines":[{"line_number":133,"context_line":"               {\u0027dev\u0027: raid_device, \u0027err\u0027: e})"},{"line_number":134,"context_line":"        raise errors.SoftwareRAIDError(msg)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    lines \u003d out.splitlines()"},{"line_number":137,"context_line":"    for line in lines:"},{"line_number":138,"context_line":"        if \u0027active sync\u0027 not in line:"},{"line_number":139,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":21,"id":"bfb3d3c7_a804c515","line":136,"in_reply_to":"bfb3d3c7_dda539a0","updated":"2019-05-31 14:11:40.000000000","message":"There is an example in the unit test for this function.","commit_id":"0fc2465346e91326f76c1130990300083f285b84"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7abc6592f204b30deb99cf402986449ae73dbdce","unresolved":false,"context_lines":[{"line_number":163,"context_line":"               {\u0027dev\u0027: raid_device, \u0027err\u0027: e})"},{"line_number":164,"context_line":"        raise errors.SoftwareRAIDError(msg)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    lines \u003d out.splitlines()"},{"line_number":167,"context_line":"    for line in lines:"},{"line_number":168,"context_line":"        if \u0027active sync\u0027 not in line:"},{"line_number":169,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":21,"id":"bfb3d3c7_7dba0dc1","line":166,"updated":"2019-05-31 13:58:13.000000000","message":"Ditto","commit_id":"0fc2465346e91326f76c1130990300083f285b84"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"1389f5f0273e9d411f5a0cb96a780a1d423a7359","unresolved":false,"context_lines":[{"line_number":163,"context_line":"               {\u0027dev\u0027: raid_device, \u0027err\u0027: e})"},{"line_number":164,"context_line":"        raise errors.SoftwareRAIDError(msg)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    lines \u003d out.splitlines()"},{"line_number":167,"context_line":"    for line in lines:"},{"line_number":168,"context_line":"        if \u0027active sync\u0027 not in line:"},{"line_number":169,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":21,"id":"bfb3d3c7_680a4d20","line":166,"in_reply_to":"bfb3d3c7_7dba0dc1","updated":"2019-05-31 14:11:40.000000000","message":"See above.","commit_id":"0fc2465346e91326f76c1130990300083f285b84"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7abc6592f204b30deb99cf402986449ae73dbdce","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    \"\"\""},{"line_number":184,"context_line":"    try:"},{"line_number":185,"context_line":"        utils.execute(\"mdadm --detail {}\".format(raid_device), shell\u003dTrue)"},{"line_number":186,"context_line":"        LOG.info(\"%s is an md device\", raid_device)"},{"line_number":187,"context_line":"        return True"},{"line_number":188,"context_line":"    except processutils.ProcessExecutionError:"},{"line_number":189,"context_line":"        LOG.info(\"%s is not an md device\", raid_device)"}],"source_content_type":"text/x-python","patch_set":21,"id":"bfb3d3c7_fdcd9d65","line":186,"updated":"2019-05-31 13:58:13.000000000","message":"Is it typical in ironic code to log like this in a check function, rather than in the caller? If I was reading the logs, would I understand why this line was being reported at all based on the surrounding context from other log lines?","commit_id":"0fc2465346e91326f76c1130990300083f285b84"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"1389f5f0273e9d411f5a0cb96a780a1d423a7359","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    \"\"\""},{"line_number":184,"context_line":"    try:"},{"line_number":185,"context_line":"        utils.execute(\"mdadm --detail {}\".format(raid_device), shell\u003dTrue)"},{"line_number":186,"context_line":"        LOG.info(\"%s is an md device\", raid_device)"},{"line_number":187,"context_line":"        return True"},{"line_number":188,"context_line":"    except processutils.ProcessExecutionError:"},{"line_number":189,"context_line":"        LOG.info(\"%s is not an md device\", raid_device)"}],"source_content_type":"text/x-python","patch_set":21,"id":"bfb3d3c7_4820a99b","line":186,"in_reply_to":"bfb3d3c7_fdcd9d65","updated":"2019-05-31 14:11:40.000000000","message":"I lack the experience to say if it is typical ... maybe this should move to debug anyway.","commit_id":"0fc2465346e91326f76c1130990300083f285b84"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7abc6592f204b30deb99cf402986449ae73dbdce","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    except processutils.ProcessExecutionError as e:"},{"line_number":209,"context_line":"        error_msg \u003d (\u0027Could not restart md device %(dev)s: %(err)s\u0027 %"},{"line_number":210,"context_line":"                     {\u0027dev\u0027: raid_device, \u0027err\u0027: e})"},{"line_number":211,"context_line":"        LOG.error(error_msg)"},{"line_number":212,"context_line":"        raise errors.CommandExecutionError(error_msg)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"bfb3d3c7_9d0b418c","line":211,"updated":"2019-05-31 13:58:13.000000000","message":"Is logging the error here going to result in it being logged twice (once here, and once when the exception is handled by the app)?","commit_id":"0fc2465346e91326f76c1130990300083f285b84"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"1389f5f0273e9d411f5a0cb96a780a1d423a7359","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    except processutils.ProcessExecutionError as e:"},{"line_number":209,"context_line":"        error_msg \u003d (\u0027Could not restart md device %(dev)s: %(err)s\u0027 %"},{"line_number":210,"context_line":"                     {\u0027dev\u0027: raid_device, \u0027err\u0027: e})"},{"line_number":211,"context_line":"        LOG.error(error_msg)"},{"line_number":212,"context_line":"        raise errors.CommandExecutionError(error_msg)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"bfb3d3c7_9d36e102","line":211,"in_reply_to":"bfb3d3c7_9d0b418c","updated":"2019-05-31 14:11:40.000000000","message":"If I understand things correctly, the exception will transport this message back to the conductor while the LOG goes to the IPA logs on the node.","commit_id":"0fc2465346e91326f76c1130990300083f285b84"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7abc6592f204b30deb99cf402986449ae73dbdce","unresolved":false,"context_lines":[{"line_number":1461,"context_line":"        # Only one or two RAID devices are supported for now."},{"line_number":1462,"context_line":"        if len(logical_disks) not in [1, 2]:"},{"line_number":1463,"context_line":"            LOG.error(\"Software RAID config needs one or two logical disks\")"},{"line_number":1464,"context_line":"            rc \u003d False"},{"line_number":1465,"context_line":""},{"line_number":1466,"context_line":"        # All disks need to be flagged for Software RAID"},{"line_number":1467,"context_line":"        for logical_disk in logical_disks:"}],"source_content_type":"text/x-python","patch_set":21,"id":"bfb3d3c7_fd6efd2c","line":1464,"updated":"2019-05-31 13:58:13.000000000","message":"The return code is never reset to true beyond this point. Is there any reason not to return right here and bypass the rest of the checks?","commit_id":"0fc2465346e91326f76c1130990300083f285b84"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"1389f5f0273e9d411f5a0cb96a780a1d423a7359","unresolved":false,"context_lines":[{"line_number":1461,"context_line":"        # Only one or two RAID devices are supported for now."},{"line_number":1462,"context_line":"        if len(logical_disks) not in [1, 2]:"},{"line_number":1463,"context_line":"            LOG.error(\"Software RAID config needs one or two logical disks\")"},{"line_number":1464,"context_line":"            rc \u003d False"},{"line_number":1465,"context_line":""},{"line_number":1466,"context_line":"        # All disks need to be flagged for Software RAID"},{"line_number":1467,"context_line":"        for logical_disk in logical_disks:"}],"source_content_type":"text/x-python","patch_set":21,"id":"bfb3d3c7_9d510139","line":1464,"in_reply_to":"bfb3d3c7_fd6efd2c","updated":"2019-05-31 14:11:40.000000000","message":"Yes: this will give a full list of the issues rather than one issue at a time. This was mentioned earlier in the review history.","commit_id":"0fc2465346e91326f76c1130990300083f285b84"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"0c6c3a3391f2673b0b0a3cb2162769cedaaec166","unresolved":false,"context_lines":[{"line_number":1325,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1326,"context_line":""},{"line_number":1327,"context_line":"        # Create an MBR partition table on each disk."},{"line_number":1328,"context_line":"        # TODO(arne_wiebalck): Check if GPT would work as well."},{"line_number":1329,"context_line":"        for block_device in block_devices:"},{"line_number":1330,"context_line":"            LOG.info(\"Creating partition table on {}\".format("},{"line_number":1331,"context_line":"                block_device.name))"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fb8cfa7_6d933151","line":1328,"updated":"2019-05-31 17:51:47.000000000","message":"GPT should work just fine, although I suspect we might have some additional things though :\\","commit_id":"e85079b406e1033e8a15cb396fd8a81d1fa86c70"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":182,"context_line":"    :returns: True if the device is an md device, False otherwise."},{"line_number":183,"context_line":"    \"\"\""},{"line_number":184,"context_line":"    try:"},{"line_number":185,"context_line":"        utils.execute(\"mdadm --detail {}\".format(raid_device), shell\u003dTrue)"},{"line_number":186,"context_line":"        LOG.info(\"%s is an md device\", raid_device)"},{"line_number":187,"context_line":"        return True"},{"line_number":188,"context_line":"    except processutils.ProcessExecutionError:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_59b141e1","line":185,"updated":"2019-06-03 07:47:44.000000000","message":"why do you need shell\u003dTrue here? you don\u0027t seem to use any shell features.","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":182,"context_line":"    :returns: True if the device is an md device, False otherwise."},{"line_number":183,"context_line":"    \"\"\""},{"line_number":184,"context_line":"    try:"},{"line_number":185,"context_line":"        utils.execute(\"mdadm --detail {}\".format(raid_device), shell\u003dTrue)"},{"line_number":186,"context_line":"        LOG.info(\"%s is an md device\", raid_device)"},{"line_number":187,"context_line":"        return True"},{"line_number":188,"context_line":"    except processutils.ProcessExecutionError:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_c513edb7","line":185,"in_reply_to":"9fb8cfa7_59b141e1","updated":"2019-06-04 11:03:27.000000000","message":"Done","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    \"\"\""},{"line_number":184,"context_line":"    try:"},{"line_number":185,"context_line":"        utils.execute(\"mdadm --detail {}\".format(raid_device), shell\u003dTrue)"},{"line_number":186,"context_line":"        LOG.info(\"%s is an md device\", raid_device)"},{"line_number":187,"context_line":"        return True"},{"line_number":188,"context_line":"    except processutils.ProcessExecutionError:"},{"line_number":189,"context_line":"        LOG.info(\"%s is not an md device\", raid_device)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_79b685dc","line":186,"updated":"2019-06-03 07:47:44.000000000","message":"nit: s/info/debug/","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    \"\"\""},{"line_number":184,"context_line":"    try:"},{"line_number":185,"context_line":"        utils.execute(\"mdadm --detail {}\".format(raid_device), shell\u003dTrue)"},{"line_number":186,"context_line":"        LOG.info(\"%s is an md device\", raid_device)"},{"line_number":187,"context_line":"        return True"},{"line_number":188,"context_line":"    except processutils.ProcessExecutionError:"},{"line_number":189,"context_line":"        LOG.info(\"%s is not an md device\", raid_device)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_e51871d4","line":186,"in_reply_to":"9fb8cfa7_79b685dc","updated":"2019-06-04 11:03:27.000000000","message":"Done","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        LOG.info(\"%s is an md device\", raid_device)"},{"line_number":187,"context_line":"        return True"},{"line_number":188,"context_line":"    except processutils.ProcessExecutionError:"},{"line_number":189,"context_line":"        LOG.info(\"%s is not an md device\", raid_device)"},{"line_number":190,"context_line":"        return False"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_19cbc953","line":189,"updated":"2019-06-03 07:47:44.000000000","message":"ditto","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        LOG.info(\"%s is an md device\", raid_device)"},{"line_number":187,"context_line":"        return True"},{"line_number":188,"context_line":"    except processutils.ProcessExecutionError:"},{"line_number":189,"context_line":"        LOG.info(\"%s is not an md device\", raid_device)"},{"line_number":190,"context_line":"        return False"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_850df591","line":189,"in_reply_to":"9fb8cfa7_19cbc953","updated":"2019-06-04 11:03:27.000000000","message":"Done","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    try:"},{"line_number":202,"context_line":"        component_devices \u003d _get_component_devices(raid_device)"},{"line_number":203,"context_line":"        cmd \u003d \"mdadm --stop {}\".format(raid_device)"},{"line_number":204,"context_line":"        utils.execute(cmd, shell\u003dTrue)"},{"line_number":205,"context_line":"        utils.execute(\"mdadm --assemble {} {}\".format("},{"line_number":206,"context_line":"                      raid_device, \u0027 \u0027.join(component_devices)),"},{"line_number":207,"context_line":"                      shell\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_39c80d54","line":204,"updated":"2019-06-03 07:47:44.000000000","message":"ditto re shell","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    try:"},{"line_number":202,"context_line":"        component_devices \u003d _get_component_devices(raid_device)"},{"line_number":203,"context_line":"        cmd \u003d \"mdadm --stop {}\".format(raid_device)"},{"line_number":204,"context_line":"        utils.execute(cmd, shell\u003dTrue)"},{"line_number":205,"context_line":"        utils.execute(\"mdadm --assemble {} {}\".format("},{"line_number":206,"context_line":"                      raid_device, \u0027 \u0027.join(component_devices)),"},{"line_number":207,"context_line":"                      shell\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_a51279b0","line":204,"in_reply_to":"9fb8cfa7_39c80d54","updated":"2019-06-04 11:03:27.000000000","message":"Done","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        utils.execute(cmd, shell\u003dTrue)"},{"line_number":205,"context_line":"        utils.execute(\"mdadm --assemble {} {}\".format("},{"line_number":206,"context_line":"                      raid_device, \u0027 \u0027.join(component_devices)),"},{"line_number":207,"context_line":"                      shell\u003dTrue)"},{"line_number":208,"context_line":"    except processutils.ProcessExecutionError as e:"},{"line_number":209,"context_line":"        error_msg \u003d (\u0027Could not restart md device %(dev)s: %(err)s\u0027 %"},{"line_number":210,"context_line":"                     {\u0027dev\u0027: raid_device, \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_d9c45143","line":207,"updated":"2019-06-03 07:47:44.000000000","message":"ditto","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        utils.execute(cmd, shell\u003dTrue)"},{"line_number":205,"context_line":"        utils.execute(\"mdadm --assemble {} {}\".format("},{"line_number":206,"context_line":"                      raid_device, \u0027 \u0027.join(component_devices)),"},{"line_number":207,"context_line":"                      shell\u003dTrue)"},{"line_number":208,"context_line":"    except processutils.ProcessExecutionError as e:"},{"line_number":209,"context_line":"        error_msg \u003d (\u0027Could not restart md device %(dev)s: %(err)s\u0027 %"},{"line_number":210,"context_line":"                     {\u0027dev\u0027: raid_device, \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_4527fd13","line":207,"in_reply_to":"9fb8cfa7_d9c45143","updated":"2019-06-04 11:03:27.000000000","message":"Done","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":1283,"context_line":"                 valid or if there was an error when creating the RAID"},{"line_number":1284,"context_line":"                 devices."},{"line_number":1285,"context_line":"        \"\"\""},{"line_number":1286,"context_line":"        LOG.info(\"Creating Software RAID\")"},{"line_number":1287,"context_line":""},{"line_number":1288,"context_line":"        raid_config \u003d node.get(\u0027target_raid_config\u0027, {})"},{"line_number":1289,"context_line":"        if raid_config \u003d\u003d {}:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_f9c11530","line":1286,"updated":"2019-06-03 07:47:44.000000000","message":"nit: remove, duplicates line 1305","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":1283,"context_line":"                 valid or if there was an error when creating the RAID"},{"line_number":1284,"context_line":"                 devices."},{"line_number":1285,"context_line":"        \"\"\""},{"line_number":1286,"context_line":"        LOG.info(\"Creating Software RAID\")"},{"line_number":1287,"context_line":""},{"line_number":1288,"context_line":"        raid_config \u003d node.get(\u0027target_raid_config\u0027, {})"},{"line_number":1289,"context_line":"        if raid_config \u003d\u003d {}:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_052105fc","line":1286,"in_reply_to":"9fb8cfa7_f9c11530","updated":"2019-06-04 11:03:27.000000000","message":"Done","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"ef9c9186c696b2ce8c3863554e6a2dbc1596b146","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"        LOG.info(\"Creating Software RAID\")"},{"line_number":1287,"context_line":""},{"line_number":1288,"context_line":"        raid_config \u003d node.get(\u0027target_raid_config\u0027, {})"},{"line_number":1289,"context_line":"        if raid_config \u003d\u003d {}:"},{"line_number":1290,"context_line":"            return {}"},{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"        # No \u0027software\u0027 controller: do nothing. If \u0027controller\u0027 is"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_b5b7233b","line":1289,"updated":"2019-06-03 07:55:28.000000000","message":"This will not happen. See [1]. If happens we should throw error as done in Ironic.\n[1] https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/agent.py#L741-L744\n[2] https://github.com/openstack/ironic/blob/master/ironic/common/raid.py#L131-L153","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"        LOG.info(\"Creating Software RAID\")"},{"line_number":1287,"context_line":""},{"line_number":1288,"context_line":"        raid_config \u003d node.get(\u0027target_raid_config\u0027, {})"},{"line_number":1289,"context_line":"        if raid_config \u003d\u003d {}:"},{"line_number":1290,"context_line":"            return {}"},{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"        # No \u0027software\u0027 controller: do nothing. If \u0027controller\u0027 is"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_e57dd1e7","line":1289,"in_reply_to":"9fb8cfa7_b5b7233b","updated":"2019-06-04 11:03:27.000000000","message":"Thanks, Shivanand, you\u0027re right, I removed this.","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"ef9c9186c696b2ce8c3863554e6a2dbc1596b146","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"                break"},{"line_number":1301,"context_line":"        if not software_raid:"},{"line_number":1302,"context_line":"            LOG.debug(\"No Software RAID config found\")"},{"line_number":1303,"context_line":"            return {}"},{"line_number":1304,"context_line":""},{"line_number":1305,"context_line":"        LOG.info(\"Creating Software RAID\")"},{"line_number":1306,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_9588df71","line":1303,"range":{"start_line":1303,"start_character":12,"end_line":1303,"end_character":21},"updated":"2019-06-03 07:55:28.000000000","message":"Shouldn\u0027t it throw errors.IncompatibleHardwareMethodError ? The exception with appropriate message would be useful to user to know what went wrong.","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"                break"},{"line_number":1301,"context_line":"        if not software_raid:"},{"line_number":1302,"context_line":"            LOG.debug(\"No Software RAID config found\")"},{"line_number":1303,"context_line":"            return {}"},{"line_number":1304,"context_line":""},{"line_number":1305,"context_line":"        LOG.info(\"Creating Software RAID\")"},{"line_number":1306,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_a5bcb969","line":1303,"range":{"start_line":1303,"start_character":12,"end_line":1303,"end_character":21},"in_reply_to":"9fb8cfa7_9588df71","updated":"2019-06-04 11:03:27.000000000","message":"Hmm ... I was thinking that this is more of a safety guard to prevent this function does anything in case it gets called unintentionally, like when there is a target raid configuration, but it is not meant for the creation of a software RAID.","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":1306,"context_line":""},{"line_number":1307,"context_line":"        # Check if the config is compliant with current limitations."},{"line_number":1308,"context_line":"        if not self.validate_configuration(raid_config):"},{"line_number":1309,"context_line":"            msg \u003d \"Software RAID configuration is invalid\""},{"line_number":1310,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"        # Log the validated target_raid_configuration."}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_99dc9919","line":1309,"updated":"2019-06-03 07:47:44.000000000","message":"This is too generic, I suggest raising specific exceptions in validate_configuration (see my comments there).","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":1306,"context_line":""},{"line_number":1307,"context_line":"        # Check if the config is compliant with current limitations."},{"line_number":1308,"context_line":"        if not self.validate_configuration(raid_config):"},{"line_number":1309,"context_line":"            msg \u003d \"Software RAID configuration is invalid\""},{"line_number":1310,"context_line":"            raise errors.SoftwareRAIDError(msg)"},{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"        # Log the validated target_raid_configuration."}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_a587d9d7","line":1309,"in_reply_to":"9fb8cfa7_99dc9919","updated":"2019-06-04 11:03:27.000000000","message":"Done","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"        # Log the validated target_raid_configuration."},{"line_number":1313,"context_line":"        LOG.debug(\"Target Software RAID configuration {}\".format("},{"line_number":1314,"context_line":"                  raid_config))"},{"line_number":1315,"context_line":""},{"line_number":1316,"context_line":"        # Make sure there are no partitions yet (or left behind)."},{"line_number":1317,"context_line":"        block_devices \u003d self.list_block_devices()"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_b9e15dd3","line":1314,"updated":"2019-06-03 07:47:44.000000000","message":"nit: formatting is not desired with LOG.debug (and other log functions):\n\n LOG.debug(\u0027Target software RAID configuration: %s\u0027, raid_config)\n\n(this has benefit of not doing string formatting if debug logging is disabled)","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"        # Log the validated target_raid_configuration."},{"line_number":1313,"context_line":"        LOG.debug(\"Target Software RAID configuration {}\".format("},{"line_number":1314,"context_line":"                  raid_config))"},{"line_number":1315,"context_line":""},{"line_number":1316,"context_line":"        # Make sure there are no partitions yet (or left behind)."},{"line_number":1317,"context_line":"        block_devices \u003d self.list_block_devices()"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_456cdd35","line":1314,"in_reply_to":"9fb8cfa7_b9e15dd3","updated":"2019-06-04 11:03:27.000000000","message":"Done","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":1376,"context_line":"                       \"--force --run --metadata\u003d1\").format("},{"line_number":1377,"context_line":"                           md_device, raid_level, raid_device_count,"},{"line_number":1378,"context_line":"                           component_devices)"},{"line_number":1379,"context_line":"                utils.execute(cmd, shell\u003dTrue)"},{"line_number":1380,"context_line":"            except processutils.ProcessExecutionError as e:"},{"line_number":1381,"context_line":"                msg \u003d \"Failed to create md device {} on {}: {}\".format("},{"line_number":1382,"context_line":"                    md_device, component_devices, e)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_59e621eb","line":1379,"updated":"2019-06-03 07:47:44.000000000","message":"nit: no need for shell","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":1376,"context_line":"                       \"--force --run --metadata\u003d1\").format("},{"line_number":1377,"context_line":"                           md_device, raid_level, raid_device_count,"},{"line_number":1378,"context_line":"                           component_devices)"},{"line_number":1379,"context_line":"                utils.execute(cmd, shell\u003dTrue)"},{"line_number":1380,"context_line":"            except processutils.ProcessExecutionError as e:"},{"line_number":1381,"context_line":"                msg \u003d \"Failed to create md device {} on {}: {}\".format("},{"line_number":1382,"context_line":"                    md_device, component_devices, e)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_6569e123","line":1379,"in_reply_to":"9fb8cfa7_59e621eb","updated":"2019-06-04 11:03:27.000000000","message":"Done","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":1400,"context_line":"        :param ports: A list of dictionaries containing information"},{"line_number":1401,"context_line":"                      of ports for the node"},{"line_number":1402,"context_line":"        \"\"\""},{"line_number":1403,"context_line":"        LOG.info(\"Deleting Software RAID(s)\")"},{"line_number":1404,"context_line":""},{"line_number":1405,"context_line":"        raid_devices \u003d list_all_block_devices(block_type\u003d\u0027raid\u0027,"},{"line_number":1406,"context_line":"                                              ignore_raid\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_79ebe5af","line":1403,"updated":"2019-06-03 07:47:44.000000000","message":"nit: probably redundant with line 1408","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":1400,"context_line":"        :param ports: A list of dictionaries containing information"},{"line_number":1401,"context_line":"                      of ports for the node"},{"line_number":1402,"context_line":"        \"\"\""},{"line_number":1403,"context_line":"        LOG.info(\"Deleting Software RAID(s)\")"},{"line_number":1404,"context_line":""},{"line_number":1405,"context_line":"        raid_devices \u003d list_all_block_devices(block_type\u003d\u0027raid\u0027,"},{"line_number":1406,"context_line":"                                              ignore_raid\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_0576e507","line":1403,"in_reply_to":"9fb8cfa7_79ebe5af","updated":"2019-06-04 11:03:27.000000000","message":"Done","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":1411,"context_line":"            component_devices \u003d _get_component_devices(raid_device.name)"},{"line_number":1412,"context_line":"            LOG.debug(\"Found component devices {}\".format("},{"line_number":1413,"context_line":"                      component_devices))"},{"line_number":1414,"context_line":"            holder_disks \u003d get_holder_disks(raid_device.name)"},{"line_number":1415,"context_line":"            LOG.debug(\"Found holder disks {}\".format("},{"line_number":1416,"context_line":"                      holder_disks))"},{"line_number":1417,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_19d0a9f7","line":1414,"updated":"2019-06-03 07:47:44.000000000","message":"should be _get_holder_disks (see pep8 failure). which makes me wonder if we cover this part in unit tests.","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":1411,"context_line":"            component_devices \u003d _get_component_devices(raid_device.name)"},{"line_number":1412,"context_line":"            LOG.debug(\"Found component devices {}\".format("},{"line_number":1413,"context_line":"                      component_devices))"},{"line_number":1414,"context_line":"            holder_disks \u003d get_holder_disks(raid_device.name)"},{"line_number":1415,"context_line":"            LOG.debug(\"Found holder disks {}\".format("},{"line_number":1416,"context_line":"                      holder_disks))"},{"line_number":1417,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_2573e917","line":1414,"in_reply_to":"9fb8cfa7_19d0a9f7","updated":"2019-06-04 11:03:27.000000000","message":"Done","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":1486,"context_line":"        logical_disks \u003d raid_config.get(\u0027logical_disks\u0027)"},{"line_number":1487,"context_line":"        if not logical_disks:"},{"line_number":1488,"context_line":"            LOG.error(\"RAID config contains no logical disks\")"},{"line_number":1489,"context_line":"            return False"},{"line_number":1490,"context_line":""},{"line_number":1491,"context_line":"        rc \u003d True"},{"line_number":1492,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_39cd6d5d","line":1489,"updated":"2019-06-03 07:47:44.000000000","message":"should be\n\n raise SomeException(\"RAID config contains no logical disks\")","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"ef9c9186c696b2ce8c3863554e6a2dbc1596b146","unresolved":false,"context_lines":[{"line_number":1486,"context_line":"        logical_disks \u003d raid_config.get(\u0027logical_disks\u0027)"},{"line_number":1487,"context_line":"        if not logical_disks:"},{"line_number":1488,"context_line":"            LOG.error(\"RAID config contains no logical disks\")"},{"line_number":1489,"context_line":"            return False"},{"line_number":1490,"context_line":""},{"line_number":1491,"context_line":"        rc \u003d True"},{"line_number":1492,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_5982a1ca","line":1489,"in_reply_to":"9fb8cfa7_39cd6d5d","updated":"2019-06-03 07:55:28.000000000","message":"+1","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":1486,"context_line":"        logical_disks \u003d raid_config.get(\u0027logical_disks\u0027)"},{"line_number":1487,"context_line":"        if not logical_disks:"},{"line_number":1488,"context_line":"            LOG.error(\"RAID config contains no logical disks\")"},{"line_number":1489,"context_line":"            return False"},{"line_number":1490,"context_line":""},{"line_number":1491,"context_line":"        rc \u003d True"},{"line_number":1492,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_c561ad3b","line":1489,"in_reply_to":"9fb8cfa7_5982a1ca","updated":"2019-06-04 11:03:27.000000000","message":"Done","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":1488,"context_line":"            LOG.error(\"RAID config contains no logical disks\")"},{"line_number":1489,"context_line":"            return False"},{"line_number":1490,"context_line":""},{"line_number":1491,"context_line":"        rc \u003d True"},{"line_number":1492,"context_line":""},{"line_number":1493,"context_line":"        # Only one or two RAID devices are supported for now."},{"line_number":1494,"context_line":"        if len(logical_disks) not in [1, 2]:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_d9d9b122","line":1491,"updated":"2019-06-03 07:47:44.000000000","message":"Please replace all occurances of rc with an exception, otherwise it will be way too hard to debug. Alternatively, you can accumulate error messages similarly to https://review.opendev.org/#/c/648178/8/ironic/conductor/allocations.py@305","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":1488,"context_line":"            LOG.error(\"RAID config contains no logical disks\")"},{"line_number":1489,"context_line":"            return False"},{"line_number":1490,"context_line":""},{"line_number":1491,"context_line":"        rc \u003d True"},{"line_number":1492,"context_line":""},{"line_number":1493,"context_line":"        # Only one or two RAID devices are supported for now."},{"line_number":1494,"context_line":"        if len(logical_disks) not in [1, 2]:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_855bb585","line":1491,"in_reply_to":"9fb8cfa7_d9d9b122","updated":"2019-06-04 11:03:27.000000000","message":"Thanks, Dmitry. I used the same approach now.","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":1525,"context_line":"                    \u0027 \u0027.join(accepted_levels)))"},{"line_number":1526,"context_line":"                rc \u003d False"},{"line_number":1527,"context_line":""},{"line_number":1528,"context_line":"        LOG.debug(\"Software RAID config validation finished\")"},{"line_number":1529,"context_line":"        return rc"},{"line_number":1530,"context_line":""},{"line_number":1531,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_f9d6f5f1","line":1528,"updated":"2019-06-03 07:47:44.000000000","message":"nit: not very useful IMO","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":1525,"context_line":"                    \u0027 \u0027.join(accepted_levels)))"},{"line_number":1526,"context_line":"                rc \u003d False"},{"line_number":1527,"context_line":""},{"line_number":1528,"context_line":"        LOG.debug(\"Software RAID config validation finished\")"},{"line_number":1529,"context_line":"        return rc"},{"line_number":1530,"context_line":""},{"line_number":1531,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_4555bd4f","line":1528,"in_reply_to":"9fb8cfa7_f9d6f5f1","updated":"2019-06-04 11:03:27.000000000","message":"Done","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1343,"context_line":"            for device in block_devices:"},{"line_number":1344,"context_line":"                try:"},{"line_number":1345,"context_line":"                    LOG.debug(\"Creating partition on {}: {} {}\".format("},{"line_number":1346,"context_line":"                        device.name, sector, psize))"},{"line_number":1347,"context_line":"                    utils.execute(\u0027parted\u0027, device.name, \u0027-s\u0027, \u0027-a\u0027,"},{"line_number":1348,"context_line":"                                  \u0027optimal\u0027, \u0027--\u0027, \u0027mkpart\u0027, \u0027primary\u0027,"},{"line_number":1349,"context_line":"                                  sector, psize)"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_08d3483a","line":1346,"updated":"2019-06-05 06:17:15.000000000","message":"See my comments on delete_configuration re logging","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1351,"context_line":"                    msg \u003d \"Failed to create partitions on {}: {}\".format("},{"line_number":1352,"context_line":"                        device.name, e)"},{"line_number":1353,"context_line":"                    raise errors.SoftwareRAIDError(msg)"},{"line_number":1354,"context_line":"            sector \u003d psize"},{"line_number":1355,"context_line":""},{"line_number":1356,"context_line":"        # Create the RAID devices."},{"line_number":1357,"context_line":"        raid_device_count \u003d len(block_devices)"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_28d88c51","line":1354,"updated":"2019-06-05 06:17:15.000000000","message":"Is it fine to have sector \u003d\u003d \u0027-1\u0027 if we had \u0027MAX\u0027 initially? I\u0027d appreciate a comment explaining what is going on with sectore here..","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1403,"context_line":""},{"line_number":1404,"context_line":"            component_devices \u003d _get_component_devices(raid_device.name)"},{"line_number":1405,"context_line":"            LOG.debug(\"Found component devices {}\".format("},{"line_number":1406,"context_line":"                      component_devices))"},{"line_number":1407,"context_line":"            holder_disks \u003d _get_holder_disks(raid_device.name)"},{"line_number":1408,"context_line":"            LOG.debug(\"Found holder disks {}\".format("},{"line_number":1409,"context_line":"                      holder_disks))"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_c8dc5048","line":1406,"updated":"2019-06-05 06:17:15.000000000","message":"Please avoid pre-formatting strings when logging. The logging module has formatting built-in, and it has a benefit of not doing any formatting when the log level (DEBUG in this case) is not enabled. So,\n\n LOG.debug(\u0027Found component devices %s\u0027, component_devices)","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"296f3d7c8dadb8e318b90ff8e2a8287a3d5981f3","unresolved":false,"context_lines":[{"line_number":1403,"context_line":""},{"line_number":1404,"context_line":"            component_devices \u003d _get_component_devices(raid_device.name)"},{"line_number":1405,"context_line":"            LOG.debug(\"Found component devices {}\".format("},{"line_number":1406,"context_line":"                      component_devices))"},{"line_number":1407,"context_line":"            holder_disks \u003d _get_holder_disks(raid_device.name)"},{"line_number":1408,"context_line":"            LOG.debug(\"Found holder disks {}\".format("},{"line_number":1409,"context_line":"                      holder_disks))"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_8b69518c","line":1406,"in_reply_to":"9fb8cfa7_c8dc5048","updated":"2019-06-07 18:35:44.000000000","message":"Done","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1406,"context_line":"                      component_devices))"},{"line_number":1407,"context_line":"            holder_disks \u003d _get_holder_disks(raid_device.name)"},{"line_number":1408,"context_line":"            LOG.debug(\"Found holder disks {}\".format("},{"line_number":1409,"context_line":"                      holder_disks))"},{"line_number":1410,"context_line":""},{"line_number":1411,"context_line":"            # Remove md devices."},{"line_number":1412,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_e8e11400","line":1409,"updated":"2019-06-05 06:17:15.000000000","message":"ditto","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"296f3d7c8dadb8e318b90ff8e2a8287a3d5981f3","unresolved":false,"context_lines":[{"line_number":1406,"context_line":"                      component_devices))"},{"line_number":1407,"context_line":"            holder_disks \u003d _get_holder_disks(raid_device.name)"},{"line_number":1408,"context_line":"            LOG.debug(\"Found holder disks {}\".format("},{"line_number":1409,"context_line":"                      holder_disks))"},{"line_number":1410,"context_line":""},{"line_number":1411,"context_line":"            # Remove md devices."},{"line_number":1412,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_2b0625d0","line":1409,"in_reply_to":"9fb8cfa7_e8e11400","updated":"2019-06-07 18:35:44.000000000","message":"Done","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1413,"context_line":"                utils.execute(\u0027wipefs\u0027, \u0027-af\u0027, raid_device.name)"},{"line_number":1414,"context_line":"            except processutils.ProcessExecutionError as e:"},{"line_number":1415,"context_line":"                msg \u003d \"Failed to wipefs {}: {}\".format("},{"line_number":1416,"context_line":"                    raid_device.name, e)"},{"line_number":1417,"context_line":"                LOG.warning(msg)"},{"line_number":1418,"context_line":"            try:"},{"line_number":1419,"context_line":"                utils.execute(\u0027mdadm\u0027, \u0027--stop\u0027, raid_device.name)"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_88e65816","line":1416,"updated":"2019-06-05 06:17:15.000000000","message":"ditto (although less important with warnings)","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"296f3d7c8dadb8e318b90ff8e2a8287a3d5981f3","unresolved":false,"context_lines":[{"line_number":1413,"context_line":"                utils.execute(\u0027wipefs\u0027, \u0027-af\u0027, raid_device.name)"},{"line_number":1414,"context_line":"            except processutils.ProcessExecutionError as e:"},{"line_number":1415,"context_line":"                msg \u003d \"Failed to wipefs {}: {}\".format("},{"line_number":1416,"context_line":"                    raid_device.name, e)"},{"line_number":1417,"context_line":"                LOG.warning(msg)"},{"line_number":1418,"context_line":"            try:"},{"line_number":1419,"context_line":"                utils.execute(\u0027mdadm\u0027, \u0027--stop\u0027, raid_device.name)"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_ab221551","line":1416,"in_reply_to":"9fb8cfa7_88e65816","updated":"2019-06-07 18:35:44.000000000","message":"Done","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1419,"context_line":"                utils.execute(\u0027mdadm\u0027, \u0027--stop\u0027, raid_device.name)"},{"line_number":1420,"context_line":"            except processutils.ProcessExecutionError as e:"},{"line_number":1421,"context_line":"                msg \u003d \"Failed to stop {}: {}\".format("},{"line_number":1422,"context_line":"                    raid_device.name, e)"},{"line_number":1423,"context_line":"                LOG.warning(msg)"},{"line_number":1424,"context_line":""},{"line_number":1425,"context_line":"            # Remove md metadata from component devices."}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_a8e31c05","line":1422,"updated":"2019-06-05 06:17:15.000000000","message":"ditto","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"296f3d7c8dadb8e318b90ff8e2a8287a3d5981f3","unresolved":false,"context_lines":[{"line_number":1419,"context_line":"                utils.execute(\u0027mdadm\u0027, \u0027--stop\u0027, raid_device.name)"},{"line_number":1420,"context_line":"            except processutils.ProcessExecutionError as e:"},{"line_number":1421,"context_line":"                msg \u003d \"Failed to stop {}: {}\".format("},{"line_number":1422,"context_line":"                    raid_device.name, e)"},{"line_number":1423,"context_line":"                LOG.warning(msg)"},{"line_number":1424,"context_line":""},{"line_number":1425,"context_line":"            # Remove md metadata from component devices."}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_cb1d0910","line":1422,"in_reply_to":"9fb8cfa7_a8e31c05","updated":"2019-06-07 18:35:44.000000000","message":"Done","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1426,"context_line":"            for component_device in component_devices:"},{"line_number":1427,"context_line":"                try:"},{"line_number":1428,"context_line":"                    utils.execute(\u0027mdadm\u0027, \u0027--examine\u0027,"},{"line_number":1429,"context_line":"                                  component_device)"},{"line_number":1430,"context_line":"                except processutils.ProcessExecutionError as e:"},{"line_number":1431,"context_line":"                    if \"No md superblock detected\" in str(e):"},{"line_number":1432,"context_line":"                        # actually not a component device"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_48f060ca","line":1429,"updated":"2019-06-05 06:17:15.000000000","message":"you need use_standard_local\u003dTrue since you\u0027re parsing its text output","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"296f3d7c8dadb8e318b90ff8e2a8287a3d5981f3","unresolved":false,"context_lines":[{"line_number":1426,"context_line":"            for component_device in component_devices:"},{"line_number":1427,"context_line":"                try:"},{"line_number":1428,"context_line":"                    utils.execute(\u0027mdadm\u0027, \u0027--examine\u0027,"},{"line_number":1429,"context_line":"                                  component_device)"},{"line_number":1430,"context_line":"                except processutils.ProcessExecutionError as e:"},{"line_number":1431,"context_line":"                    if \"No md superblock detected\" in str(e):"},{"line_number":1432,"context_line":"                        # actually not a component device"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_4bd7d924","line":1429,"in_reply_to":"9fb8cfa7_48f060ca","updated":"2019-06-07 18:35:44.000000000","message":"Done","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1437,"context_line":"                        raise errors.SoftwareRAIDError(msg)"},{"line_number":1438,"context_line":""},{"line_number":1439,"context_line":"                LOG.debug(\"Deleting md superblock on {}\".format("},{"line_number":1440,"context_line":"                          component_device))"},{"line_number":1441,"context_line":"                try:"},{"line_number":1442,"context_line":"                    utils.execute(\u0027mdadm\u0027, \u0027--zero-superblock\u0027,"},{"line_number":1443,"context_line":"                                  component_device)"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_68ed24ee","line":1440,"updated":"2019-06-05 06:17:15.000000000","message":"ditto re logging","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"296f3d7c8dadb8e318b90ff8e2a8287a3d5981f3","unresolved":false,"context_lines":[{"line_number":1437,"context_line":"                        raise errors.SoftwareRAIDError(msg)"},{"line_number":1438,"context_line":""},{"line_number":1439,"context_line":"                LOG.debug(\"Deleting md superblock on {}\".format("},{"line_number":1440,"context_line":"                          component_device))"},{"line_number":1441,"context_line":"                try:"},{"line_number":1442,"context_line":"                    utils.execute(\u0027mdadm\u0027, \u0027--zero-superblock\u0027,"},{"line_number":1443,"context_line":"                                  component_device)"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_ebb6cdfa","line":1440,"in_reply_to":"9fb8cfa7_68ed24ee","updated":"2019-06-07 18:35:44.000000000","message":"Done","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1444,"context_line":"                except processutils.ProcessExecutionError as e:"},{"line_number":1445,"context_line":"                    msg \u003d \"Failed to remove superblock from {}: {}\".format("},{"line_number":1446,"context_line":"                        raid_device.name, e)"},{"line_number":1447,"context_line":"                    LOG.warning(msg)"},{"line_number":1448,"context_line":""},{"line_number":1449,"context_line":"            # Remove the partitions we created during create_configuration."},{"line_number":1450,"context_line":"            for holder_disk in holder_disks:"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_08bca8da","line":1447,"updated":"2019-06-05 06:17:15.000000000","message":"ditto","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"296f3d7c8dadb8e318b90ff8e2a8287a3d5981f3","unresolved":false,"context_lines":[{"line_number":1444,"context_line":"                except processutils.ProcessExecutionError as e:"},{"line_number":1445,"context_line":"                    msg \u003d \"Failed to remove superblock from {}: {}\".format("},{"line_number":1446,"context_line":"                        raid_device.name, e)"},{"line_number":1447,"context_line":"                    LOG.warning(msg)"},{"line_number":1448,"context_line":""},{"line_number":1449,"context_line":"            # Remove the partitions we created during create_configuration."},{"line_number":1450,"context_line":"            for holder_disk in holder_disks:"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_8bc5d15d","line":1447,"in_reply_to":"9fb8cfa7_08bca8da","updated":"2019-06-07 18:35:44.000000000","message":"Done","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"            # Remove the partitions we created during create_configuration."},{"line_number":1450,"context_line":"            for holder_disk in holder_disks:"},{"line_number":1451,"context_line":"                LOG.debug(\"Removing partitions on {}\".format("},{"line_number":1452,"context_line":"                          holder_disk))"},{"line_number":1453,"context_line":"                try:"},{"line_number":1454,"context_line":"                    utils.execute(\u0027wipefs\u0027, \u0027-af\u0027, holder_disk)"},{"line_number":1455,"context_line":"                except processutils.ProcessExecutionError as e:"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_28c16c55","line":1452,"updated":"2019-06-05 06:17:15.000000000","message":"ditto","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"296f3d7c8dadb8e318b90ff8e2a8287a3d5981f3","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"            # Remove the partitions we created during create_configuration."},{"line_number":1450,"context_line":"            for holder_disk in holder_disks:"},{"line_number":1451,"context_line":"                LOG.debug(\"Removing partitions on {}\".format("},{"line_number":1452,"context_line":"                          holder_disk))"},{"line_number":1453,"context_line":"                try:"},{"line_number":1454,"context_line":"                    utils.execute(\u0027wipefs\u0027, \u0027-af\u0027, holder_disk)"},{"line_number":1455,"context_line":"                except processutils.ProcessExecutionError as e:"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_ebab2d86","line":1452,"in_reply_to":"9fb8cfa7_28c16c55","updated":"2019-06-07 18:35:44.000000000","message":"Done","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1454,"context_line":"                    utils.execute(\u0027wipefs\u0027, \u0027-af\u0027, holder_disk)"},{"line_number":1455,"context_line":"                except processutils.ProcessExecutionError as e:"},{"line_number":1456,"context_line":"                    LOG.warning(\"Failed to remove partitions on {}\".format("},{"line_number":1457,"context_line":"                        holder_disk))"},{"line_number":1458,"context_line":""},{"line_number":1459,"context_line":"            LOG.info(\"Deleted Software RAID device {}\".format("},{"line_number":1460,"context_line":"                     raid_device.name))"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_c8b530f0","line":1457,"updated":"2019-06-05 06:17:15.000000000","message":"ditto","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"296f3d7c8dadb8e318b90ff8e2a8287a3d5981f3","unresolved":false,"context_lines":[{"line_number":1454,"context_line":"                    utils.execute(\u0027wipefs\u0027, \u0027-af\u0027, holder_disk)"},{"line_number":1455,"context_line":"                except processutils.ProcessExecutionError as e:"},{"line_number":1456,"context_line":"                    LOG.warning(\"Failed to remove partitions on {}\".format("},{"line_number":1457,"context_line":"                        holder_disk))"},{"line_number":1458,"context_line":""},{"line_number":1459,"context_line":"            LOG.info(\"Deleted Software RAID device {}\".format("},{"line_number":1460,"context_line":"                     raid_device.name))"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_8b9ab16b","line":1457,"in_reply_to":"9fb8cfa7_c8b530f0","updated":"2019-06-07 18:35:44.000000000","message":"Done","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1457,"context_line":"                        holder_disk))"},{"line_number":1458,"context_line":""},{"line_number":1459,"context_line":"            LOG.info(\"Deleted Software RAID device {}\".format("},{"line_number":1460,"context_line":"                     raid_device.name))"},{"line_number":1461,"context_line":""},{"line_number":1462,"context_line":"        LOG.debug(\"Finished deleting Software RAID(s)\")"},{"line_number":1463,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_e8ba74dc","line":1460,"updated":"2019-06-05 06:17:15.000000000","message":"ditto","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"296f3d7c8dadb8e318b90ff8e2a8287a3d5981f3","unresolved":false,"context_lines":[{"line_number":1457,"context_line":"                        holder_disk))"},{"line_number":1458,"context_line":""},{"line_number":1459,"context_line":"            LOG.info(\"Deleted Software RAID device {}\".format("},{"line_number":1460,"context_line":"                     raid_device.name))"},{"line_number":1461,"context_line":""},{"line_number":1462,"context_line":"        LOG.debug(\"Finished deleting Software RAID(s)\")"},{"line_number":1463,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_eb848d0e","line":1460,"in_reply_to":"9fb8cfa7_e8ba74dc","updated":"2019-06-07 18:35:44.000000000","message":"Done","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1493,"context_line":"        for logical_disk in logical_disks:"},{"line_number":1494,"context_line":"            if logical_disk.get(\u0027controller\u0027) !\u003d \u0027software\u0027:"},{"line_number":1495,"context_line":"                msg \u003d (\"Software RAID configuration requires all logical \""},{"line_number":1496,"context_line":"                       \"disks to have \u0027controller\u0027\u003d\u0027software\u0027\")"},{"line_number":1497,"context_line":"                raid_errors.append(msg)"},{"line_number":1498,"context_line":""},{"line_number":1499,"context_line":"        # The first RAID device needs to be RAID-1."}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_88cf387e","line":1496,"updated":"2019-06-05 06:17:15.000000000","message":"nit: add which logical_disks failed this check","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"296f3d7c8dadb8e318b90ff8e2a8287a3d5981f3","unresolved":false,"context_lines":[{"line_number":1493,"context_line":"        for logical_disk in logical_disks:"},{"line_number":1494,"context_line":"            if logical_disk.get(\u0027controller\u0027) !\u003d \u0027software\u0027:"},{"line_number":1495,"context_line":"                msg \u003d (\"Software RAID configuration requires all logical \""},{"line_number":1496,"context_line":"                       \"disks to have \u0027controller\u0027\u003d\u0027software\u0027\")"},{"line_number":1497,"context_line":"                raid_errors.append(msg)"},{"line_number":1498,"context_line":""},{"line_number":1499,"context_line":"        # The first RAID device needs to be RAID-1."}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_abfa1572","line":1496,"in_reply_to":"9fb8cfa7_88cf387e","updated":"2019-06-07 18:35:44.000000000","message":"Logical disks don\u0027t have a name or id.","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1514,"context_line":"                raid_errors.append(msg)"},{"line_number":1515,"context_line":""},{"line_number":1516,"context_line":"            # Check the accepted RAID levels."},{"line_number":1517,"context_line":"            accepted_levels \u003d [\u00270\u0027, \u00271\u0027, \u00271+0\u0027]"},{"line_number":1518,"context_line":"            current_level \u003d logical_disks[1][\u0027raid_level\u0027]"},{"line_number":1519,"context_line":"            if current_level not in accepted_levels:"},{"line_number":1520,"context_line":"                msg \u003d (\"Software RAID configuration does not support \""}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_a8cc7c89","line":1517,"updated":"2019-06-05 06:17:15.000000000","message":"nit: move this to a top-level constant (and probabably make a frozenset)","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"296f3d7c8dadb8e318b90ff8e2a8287a3d5981f3","unresolved":false,"context_lines":[{"line_number":1514,"context_line":"                raid_errors.append(msg)"},{"line_number":1515,"context_line":""},{"line_number":1516,"context_line":"            # Check the accepted RAID levels."},{"line_number":1517,"context_line":"            accepted_levels \u003d [\u00270\u0027, \u00271\u0027, \u00271+0\u0027]"},{"line_number":1518,"context_line":"            current_level \u003d logical_disks[1][\u0027raid_level\u0027]"},{"line_number":1519,"context_line":"            if current_level not in accepted_levels:"},{"line_number":1520,"context_line":"                msg \u003d (\"Software RAID configuration does not support \""}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_2b64e521","line":1517,"in_reply_to":"9fb8cfa7_a8cc7c89","updated":"2019-06-07 18:35:44.000000000","message":"Done","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1518,"context_line":"            current_level \u003d logical_disks[1][\u0027raid_level\u0027]"},{"line_number":1519,"context_line":"            if current_level not in accepted_levels:"},{"line_number":1520,"context_line":"                msg \u003d (\"Software RAID configuration does not support \""},{"line_number":1521,"context_line":"                       \"RAID level %s\" % current_level)"},{"line_number":1522,"context_line":"                raid_errors.append(msg)"},{"line_number":1523,"context_line":""},{"line_number":1524,"context_line":"        if raid_errors:"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_48c94076","line":1521,"updated":"2019-06-05 06:17:15.000000000","message":"nit: add what level was requested","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"296f3d7c8dadb8e318b90ff8e2a8287a3d5981f3","unresolved":false,"context_lines":[{"line_number":1518,"context_line":"            current_level \u003d logical_disks[1][\u0027raid_level\u0027]"},{"line_number":1519,"context_line":"            if current_level not in accepted_levels:"},{"line_number":1520,"context_line":"                msg \u003d (\"Software RAID configuration does not support \""},{"line_number":1521,"context_line":"                       \"RAID level %s\" % current_level)"},{"line_number":1522,"context_line":"                raid_errors.append(msg)"},{"line_number":1523,"context_line":""},{"line_number":1524,"context_line":"        if raid_errors:"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_cb23c904","line":1521,"in_reply_to":"9fb8cfa7_48c94076","updated":"2019-06-07 18:35:44.000000000","message":"\"current_level\" is the requested level.","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed38442931398afd670cba32be439110b89206ea","unresolved":false,"context_lines":[{"line_number":1527,"context_line":"                                      \u0027errors\u0027: \u0027; \u0027.join(raid_errors)}"},{"line_number":1528,"context_line":"            raise errors.SoftwareRAIDError(error)"},{"line_number":1529,"context_line":""},{"line_number":1530,"context_line":"        return True"},{"line_number":1531,"context_line":""},{"line_number":1532,"context_line":""},{"line_number":1533,"context_line":"def _compare_extensions(ext1, ext2):"}],"source_content_type":"text/x-python","patch_set":24,"id":"9fb8cfa7_68c6846a","line":1530,"updated":"2019-06-05 06:17:15.000000000","message":"nit: unused","commit_id":"2db123d318e481e4c59e305ca52e4eeb526b7659"}],"ironic_python_agent/tests/unit/test_hardware.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c841d8c6525f0449a52be5833632c08eb58b6cd4","unresolved":false,"context_lines":[{"line_number":2439,"context_line":"        }"},{"line_number":2440,"context_line":"        self.assertEqual(False,"},{"line_number":2441,"context_line":"                         self.hardware.validate_configuration(raid_config))"},{"line_number":2442,"context_line":""},{"line_number":2443,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"},{"line_number":2444,"context_line":"    def test_get_system_vendor_info(self, mocked_execute):"},{"line_number":2445,"context_line":"        mocked_execute.return_value \u003d LSHW_JSON_OUTPUT"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_9905797d","line":2442,"updated":"2019-06-03 07:47:44.000000000","message":"There don\u0027t seem to be tests on delete_configuration, this is probably why the issue spotted by pep8 ended up unnoticed. Could you add some?","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"a9b101a52f54a4b32211beadf1603c753aa5e3ce","unresolved":false,"context_lines":[{"line_number":2439,"context_line":"        }"},{"line_number":2440,"context_line":"        self.assertEqual(False,"},{"line_number":2441,"context_line":"                         self.hardware.validate_configuration(raid_config))"},{"line_number":2442,"context_line":""},{"line_number":2443,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"},{"line_number":2444,"context_line":"    def test_get_system_vendor_info(self, mocked_execute):"},{"line_number":2445,"context_line":"        mocked_execute.return_value \u003d LSHW_JSON_OUTPUT"}],"source_content_type":"text/x-python","patch_set":23,"id":"9fb8cfa7_85d095cb","line":2442,"in_reply_to":"9fb8cfa7_9905797d","updated":"2019-06-04 11:03:27.000000000","message":"There is a test on delete_configuration, but the pep8 issue was not discovered as the get_holder_disk function is mocked. That function has its own dedicated test, though.","commit_id":"b0d3453f1669fba5257f7776ff5e8fb3075b4d96"}],"releasenotes/notes/software-raid-4a88e6c5af9ea742.yaml":[{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"8f4da398892fbe59563e80a35bd6b4667c998dd1","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    one RAID-N can be configured (where N can be 0, 1, and 1+0). The"},{"line_number":7,"context_line":"    RAID is created/deleted during manual cleaning."},{"line_number":8,"context_line":"    Several limitations apply for this initial implementation:"},{"line_number":9,"context_line":"      * no support for boot devices beyond 2TB;"},{"line_number":10,"context_line":"      * no support for partitioning the configured RAID devices;"},{"line_number":11,"context_line":"      * no support for selecting the devices to be used as constituent devices;"},{"line_number":12,"context_line":"      * no support for partition images."}],"source_content_type":"text/x-yaml","patch_set":18,"id":"dfbec78f_24c63d4a","line":9,"updated":"2019-05-10 07:34:21.000000000","message":"need to unindent this line up to line 12, even with line 8, or reno build will fail","commit_id":"1646bd35baf3b943ab9c26ea6921bfb681e43573"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"b1051d290765a7c169610409ca33aa4582f1e767","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    one RAID-N can be configured (where N can be 0, 1, and 1+0). The"},{"line_number":7,"context_line":"    RAID is created/deleted during manual cleaning."},{"line_number":8,"context_line":"    Several limitations apply for this initial implementation:"},{"line_number":9,"context_line":"      * no support for boot devices beyond 2TB;"},{"line_number":10,"context_line":"      * no support for partitioning the configured RAID devices;"},{"line_number":11,"context_line":"      * no support for selecting the devices to be used as constituent devices;"},{"line_number":12,"context_line":"      * no support for partition images."}],"source_content_type":"text/x-yaml","patch_set":18,"id":"dfbec78f_c725e3ac","line":9,"in_reply_to":"dfbec78f_24c63d4a","updated":"2019-05-10 07:59:04.000000000","message":"Thanks, Riccardo! I removed the whole bit in the last patch set. Not sure this should have gone into the reno in the first place.","commit_id":"1646bd35baf3b943ab9c26ea6921bfb681e43573"},{"author":{"_account_id":11929,"name":"Michael Turek","email":"mjturek@linux.vnet.ibm.com","username":"mjturek"},"change_message_id":"b4df375ae139a603a772d5473a117f885a8a1365","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Adds support for software RAID via the generic hardware manager. By"},{"line_number":5,"context_line":"    means of the target_raid_config a single RAID-1 or one RAID-1 plus"},{"line_number":6,"context_line":"    one RAID-N can be configured (where N can be 0, 1, and 1+0). The"},{"line_number":7,"context_line":"    RAID is created/deleted during manual cleaning."}],"source_content_type":"text/x-yaml","patch_set":19,"id":"dfbec78f_62265cd1","line":6,"updated":"2019-05-10 19:34:40.000000000","message":"The code seems to indicate that there is a limit on how many disks can be used for the RAID0 and RAID1 (a limit of 2 disks). Can you express that here?","commit_id":"4bd48c7c7bf2344a97efe34e5617c9a13494fbfd"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7db850bcc28d9cc8dd38f6b34d692af5a590d485","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Adds support for software RAID via the generic hardware manager. By"},{"line_number":5,"context_line":"    means of the target_raid_config a single RAID-1 or one RAID-1 plus"},{"line_number":6,"context_line":"    one RAID-N can be configured (where N can be 0, 1, and 1+0). The"},{"line_number":7,"context_line":"    RAID is created/deleted during manual cleaning."}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bfb3d3c7_7e49192f","line":7,"updated":"2019-05-24 08:22:54.000000000","message":"++","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"5ef3ee186f6eb85a4dbb9079d1749bafe4a73d3b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Adds support for software RAID via the generic hardware manager. By"},{"line_number":5,"context_line":"    means of the target_raid_config a single RAID-1 or one RAID-1 plus"},{"line_number":6,"context_line":"    one RAID-N can be configured (where N can be 0, 1, and 1+0). The"},{"line_number":7,"context_line":"    RAID is created/deleted during manual cleaning."}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bfb3d3c7_059a486d","line":7,"updated":"2019-05-21 18:26:33.000000000","message":"We likely want to note that this expects to be able to utilize all disks in the device as presently designed and implemented. That operators should be aware of such when planning use of software raid with Ironic.","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"17fa093922dbd3e69d87480b0de522120ae81d28","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Adds support for software RAID via the generic hardware manager. By"},{"line_number":5,"context_line":"    means of the target_raid_config a single RAID-1 or one RAID-1 plus"},{"line_number":6,"context_line":"    one RAID-N can be configured (where N can be 0, 1, and 1+0). The"},{"line_number":7,"context_line":"    RAID is created/deleted during manual cleaning."}],"source_content_type":"text/x-yaml","patch_set":20,"id":"bfb3d3c7_f1a5cc9f","line":7,"in_reply_to":"bfb3d3c7_7e49192f","updated":"2019-05-31 11:07:13.000000000","message":"Done","commit_id":"4d86d745346c8eed6ae5de71b4cc31881e9e934e"}]}
