)]}'
{"devstack/lib/ironic":[{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"3bbf24e69e88a233996a8f95cb816749d4cb2d27","unresolved":false,"context_lines":[{"line_number":216,"context_line":"IRONIC_DEPLOY_DRIVER\u003d${IRONIC_DEPLOY_DRIVER:-pxe_ssh}"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"# Confirm default deploy driver is enabled or fail early"},{"line_number":219,"context_line":"if [[ ! \"$IRONIC_ENABLED_DRIVERS\" \u003d\u003d *\"$IRONIC_DEPLOY_DRIVER\"* ]]; then"},{"line_number":220,"context_line":"    die \"The default deploy driver (${IRONIC_DEPLOY_DRIVER}) is not in the \\"},{"line_number":221,"context_line":"        list of enabled drivers (${IRONIC_ENABLED_DRIVERS}). Please retry \\"},{"line_number":222,"context_line":"        with a valid, enabled IRONIC_DEPLOY_DRIVER.\""}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"fa6399be_7de12cfe","line":219,"range":{"start_line":219,"start_character":18,"end_line":219,"end_character":19},"updated":"2016-10-18 10:42:32.000000000","message":"It will not work for cases when IRONIC_DEPLOY_DRIVER is a part of IRONIC_ENABLED_DRIVER name for example\n\n$ IRONIC_ENABLED_DRIVERS\u003d\u0027fake_ssh,pxe_ipmitool_ansible\u0027\n$ IRONIC_DEPLOY_DRIVER\u003d\u0027fake\u0027\n$ if [[ ! \"$IRONIC_ENABLED_DRIVERS\" \u003d\u003d *\"$IRONIC_DEPLOY_DRIVER\"* ]]; then echo \"Failure\"; fi\n$\n\nor https://github.com/openstack/ironic-staging-drivers/blob/master/setup.cfg#L42\n\nI would suggest to replace it by: if ! echo \"$IRONIC_ENABLED_DRIVERS\" | grep -qw $IRONIC_DEPLOY_DRIVER; then ....; fi","commit_id":"e4734bf139ac4c80411af7b737b01b4a7065220c"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"402f6755cd850099423c62830f55e5bc44f40f32","unresolved":false,"context_lines":[{"line_number":216,"context_line":"IRONIC_DEPLOY_DRIVER\u003d${IRONIC_DEPLOY_DRIVER:-pxe_ssh}"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"# Confirm default deploy driver is enabled or fail early"},{"line_number":219,"context_line":"if [[ ! \"$IRONIC_ENABLED_DRIVERS\" \u003d\u003d *\"$IRONIC_DEPLOY_DRIVER\"* ]]; then"},{"line_number":220,"context_line":"    die \"The default deploy driver (${IRONIC_DEPLOY_DRIVER}) is not in the \\"},{"line_number":221,"context_line":"        list of enabled drivers (${IRONIC_ENABLED_DRIVERS}). Please retry \\"},{"line_number":222,"context_line":"        with a valid, enabled IRONIC_DEPLOY_DRIVER.\""}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"fa6399be_d1d77fbd","line":219,"range":{"start_line":219,"start_character":18,"end_line":219,"end_character":19},"in_reply_to":"fa6399be_7de12cfe","updated":"2016-10-18 12:19:57.000000000","message":"++ Agreed. Cause \"fake\" is also a valid driver.\n\nAnother solution would be to loop through the list of drivers and check if one matches with the $IRONIC_DEPLOY_DRIVER:\n\n IFS\u003d\u0027,\u0027 read -ra DRIVER \u003c\u003c\u003c \"$IRONIC_ENABLED_DRIVERS\"\n for i in \"${DRIVER[@]}\"; do\n     # Set a flag if the driver was found, fail otherwise.\n done","commit_id":"e4734bf139ac4c80411af7b737b01b4a7065220c"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"307bd4ba4e70deefd49957e5df1ea5e4282f72b9","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"# Confirm default deploy driver is enabled or fail early"},{"line_number":219,"context_line":"VALID_DRIVER\u003d\"False\""},{"line_number":220,"context_line":"IFS\u003d\u0027,\u0027 while read DRIVER; do"},{"line_number":221,"context_line":"    if [[ ${IRONIC_DEPLOY_DRIVER} \u003d\u003d $DRIVER ]]; then"},{"line_number":222,"context_line":"        VALID_DRIVER\u003d\"True\""},{"line_number":223,"context_line":"    fi"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"fa6399be_afeb3f77","line":220,"updated":"2016-10-19 18:09:20.000000000","message":"Hmm, it still does not work for me:\n\n ./test.sh \n ./test.sh: line 4: syntax error near unexpected token `do\u0027\n ./test.sh: line 4: `IFS\u003d\u0027,\u0027 while read DRIVER; do\u0027","commit_id":"54e84b5a8a744cfe467efcfdcdaf0c1d13be6054"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"19df8d2b36c6451d89da6dfae3e080f03bde9233","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"# Confirm default deploy driver is enabled or fail early"},{"line_number":219,"context_line":"VALID_DRIVER\u003d\"False\""},{"line_number":220,"context_line":"IFS\u003d\u0027,\u0027 while read DRIVER; do"},{"line_number":221,"context_line":"    if [[ ${IRONIC_DEPLOY_DRIVER} \u003d\u003d $DRIVER ]]; then"},{"line_number":222,"context_line":"        VALID_DRIVER\u003d\"True\""},{"line_number":223,"context_line":"    fi"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"da6895a0_4d79392f","line":220,"in_reply_to":"fa6399be_0a67a0b7","updated":"2016-10-20 20:29:07.000000000","message":"It\u0027s weird, most syntax I looked up for bash wanted this input given to the loop directly, not to the read earlier in it. Have this fixed in next patchset, lets see how this one goes.","commit_id":"54e84b5a8a744cfe467efcfdcdaf0c1d13be6054"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"501d9a521d18dc7b6fff3a4cd7899f7a829049b0","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"# Confirm default deploy driver is enabled or fail early"},{"line_number":219,"context_line":"VALID_DRIVER\u003d\"False\""},{"line_number":220,"context_line":"IFS\u003d\u0027,\u0027 while read DRIVER; do"},{"line_number":221,"context_line":"    if [[ ${IRONIC_DEPLOY_DRIVER} \u003d\u003d $DRIVER ]]; then"},{"line_number":222,"context_line":"        VALID_DRIVER\u003d\"True\""},{"line_number":223,"context_line":"    fi"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"fa6399be_0a67a0b7","line":220,"in_reply_to":"fa6399be_3547804c","updated":"2016-10-20 11:41:24.000000000","message":"The L220 seems to be missing the input (\u003c\u003c\u003c \"$IRONIC_ENABLED_DRIVERS\"), e.g:\n\nIFS\u003d\u0027,\u0027 read -ra DRIVER \u003c\u003c\u003c \"$IRONIC_ENABLED_DRIVERS\"\n\n(The one line fix presented by vasyl works for me too)","commit_id":"54e84b5a8a744cfe467efcfdcdaf0c1d13be6054"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ed7a429b84eddaf644e054341e6b56d68387a201","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"# Confirm default deploy driver is enabled or fail early"},{"line_number":219,"context_line":"VALID_DRIVER\u003d\"False\""},{"line_number":220,"context_line":"IFS\u003d\u0027,\u0027 while read DRIVER; do"},{"line_number":221,"context_line":"    if [[ ${IRONIC_DEPLOY_DRIVER} \u003d\u003d $DRIVER ]]; then"},{"line_number":222,"context_line":"        VALID_DRIVER\u003d\"True\""},{"line_number":223,"context_line":"    fi"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"fa6399be_3547804c","line":220,"in_reply_to":"fa6399be_afeb3f77","updated":"2016-10-19 18:40:09.000000000","message":"might be use 1 line variant:  if ! echo \"$IRONIC_ENABLED_DRIVERS\" | grep -qw $IRONIC_DEPLOY_DRIVER\nit doesn\u0027t require new variables","commit_id":"54e84b5a8a744cfe467efcfdcdaf0c1d13be6054"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"501d9a521d18dc7b6fff3a4cd7899f7a829049b0","unresolved":false,"context_lines":[{"line_number":221,"context_line":"    if [[ ${IRONIC_DEPLOY_DRIVER} \u003d\u003d $DRIVER ]]; then"},{"line_number":222,"context_line":"        VALID_DRIVER\u003d\"True\""},{"line_number":223,"context_line":"    fi"},{"line_number":224,"context_line":"done \u003c\u003c\u003c \"$IRONIC_ENABLED_DRIVERS\""},{"line_number":225,"context_line":"if [[ \"${VALID_DRIVER}\" \u003d\u003d \"False\" ]]; then"},{"line_number":226,"context_line":"    die \"The default deploy driver (${IRONIC_DEPLOY_DRIVER}) is not in the \\"},{"line_number":227,"context_line":"        list of enabled drivers (${IRONIC_ENABLED_DRIVERS}). Please retry \\"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"fa6399be_aafa34bb","line":224,"range":{"start_line":224,"start_character":5,"end_line":224,"end_character":34},"updated":"2016-10-20 11:41:24.000000000","message":"This should go to line L220","commit_id":"54e84b5a8a744cfe467efcfdcdaf0c1d13be6054"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"fccc798afbf6ee4516948979784ef1b8364169b5","unresolved":false,"context_lines":[{"line_number":218,"context_line":"# Confirm default deploy driver is enabled or fail early"},{"line_number":219,"context_line":"VALID_DRIVER\u003d\"False\""},{"line_number":220,"context_line":"IFS\u003d\u0027,\u0027 while read DRIVER \u003c\u003c\u003c \"${IRONIC_ENABLED_DRIVERS}\"; do"},{"line_number":221,"context_line":"    if [[ ${IRONIC_DEPLOY_DRIVER} \u003d\u003d $DRIVER ]]; then"},{"line_number":222,"context_line":"        VALID_DRIVER\u003d\"True\""},{"line_number":223,"context_line":"    fi"},{"line_number":224,"context_line":"done"}],"source_content_type":"application/x-shellscript","patch_set":5,"id":"da6895a0_d22221b9","line":221,"range":{"start_line":221,"start_character":10,"end_line":221,"end_character":44},"updated":"2016-10-21 19:35:34.000000000","message":"\"${IRONIC_DEPLOY_DRIVER}\" \u003d\u003d \"$DRIVER\" ?","commit_id":"656356ecec274aa4ff45e5a941d91f62f4b54c86"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5308b117de95efa4fa863d915dc35132e406e08b","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"# Confirm default deploy driver is enabled or fail early"},{"line_number":219,"context_line":"VALID_DRIVER\u003d\"False\""},{"line_number":220,"context_line":"while IFS\u003d\u0027,\u0027 read DRIVER \u003c\u003c\u003c \"${IRONIC_ENABLED_DRIVERS}\"; do"},{"line_number":221,"context_line":"    if [[ \"${IRONIC_DEPLOY_DRIVER}\" \u003d\u003d \"$DRIVER\" ]]; then"},{"line_number":222,"context_line":"        VALID_DRIVER\u003d\"True\""},{"line_number":223,"context_line":"    fi"},{"line_number":224,"context_line":"done"},{"line_number":225,"context_line":"if [[ \"${VALID_DRIVER}\" \u003d\u003d \"False\" ]]; then"},{"line_number":226,"context_line":"    die \"The default deploy driver (${IRONIC_DEPLOY_DRIVER}) is not in the \\"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"5a74a57a_1d35a545","line":223,"range":{"start_line":220,"start_character":0,"end_line":223,"end_character":6},"updated":"2016-11-23 10:55:46.000000000","message":"Apparently this syntax is not working in the gate ? Tests seem to be failing since it was introduced :-/\n\nWhat about:\n\n for d in $(echo $IRONIC_ENABLED_DRIVERS | sed \"s/,/ /g\")\n do\n     if [[ \"$d\" \u003d\u003d \"$DRIVER\" ]]; then\n         VALID_DRIVER\u003d\"True\"\n     fi\n done","commit_id":"d162fc99482ade2fdd5361f516a13996b134756f"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"227d90a6e00ab2d31c4f3be6ecc52637ffaaf24e","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        VALID_DRIVER\u003d\"True\""},{"line_number":223,"context_line":"    fi"},{"line_number":224,"context_line":"done"},{"line_number":225,"context_line":"if [[ \"${VALID_DRIVER}\" \u003d\u003d \"False\" ]]; then"},{"line_number":226,"context_line":"    die \"The default deploy driver (${IRONIC_DEPLOY_DRIVER}) is not in the \\"},{"line_number":227,"context_line":"        list of enabled drivers (${IRONIC_ENABLED_DRIVERS}). Please retry \\"},{"line_number":228,"context_line":"        with a valid, enabled IRONIC_DEPLOY_DRIVER.\""}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"5a74a57a_00d64c27","line":225,"updated":"2016-11-29 07:41:24.000000000","message":"Please check my comments to patchset 2. We already using similar one line constructions.\n\nhttps://github.com/openstack/ironic/blob/master/devstack/tools/ironic/scripts/create-node.sh#L48","commit_id":"d162fc99482ade2fdd5361f516a13996b134756f"}]}
