)]}'
{"elements/ironic-agent/post-install.d/80-ironic-agent":[{"author":{"_account_id":21741,"name":"Andreas Florath","email":"andreas@florath.net","username":"florath"},"change_message_id":"5b497e521aa9f07dd689bce049ac6b47cf601d5e","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        fi"},{"line_number":21,"context_line":"        ;;"},{"line_number":22,"context_line":"    systemd)"},{"line_number":23,"context_line":"        if [[ $(systemctl --no-pager list-unit-files iptables.service) \u003d~ \u0027enabled\u0027 ]]; then"},{"line_number":24,"context_line":"            systemctl disable iptables.service"},{"line_number":25,"context_line":"        fi"},{"line_number":26,"context_line":"        systemctl enable $(svc-map ironic-python-agent).service"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"7a3c09a3_525e0977","line":23,"updated":"2017-01-15 17:01:47.000000000","message":"Obviously disabling the iptables.service never worked.\nDo you have a reason that this must be disabled (maybe a failing test case)? If so, could you please add some lines of comment, why this is needed?\nIf there is no use-case or failing test-case, I\u0027d prefer to remove this three lines.","commit_id":"fe4ac67241a85d2fee5046893cafdbb10465961b"},{"author":{"_account_id":19156,"name":"Leehom Li","email":"feli5_li@163.com","username":"leehom"},"change_message_id":"053147b3da84b68b0f6720517b659b5e65eb5460","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        fi"},{"line_number":21,"context_line":"        ;;"},{"line_number":22,"context_line":"    systemd)"},{"line_number":23,"context_line":"        if [[ $(systemctl --no-pager list-unit-files iptables.service) \u003d~ \u0027enabled\u0027 ]]; then"},{"line_number":24,"context_line":"            systemctl disable iptables.service"},{"line_number":25,"context_line":"        fi"},{"line_number":26,"context_line":"        systemctl enable $(svc-map ironic-python-agent).service"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"7a3c09a3_58be0bd5","line":23,"in_reply_to":"7a3c09a3_525e0977","updated":"2017-01-16 14:37:52.000000000","message":"Previously, diskimage-builder fail when try to disable iptables service when create with image without iptable service. \nSee commit: dd7648277fa45f102c4dd30bde90bd44ecb8a553\n\nBut in previous fix\n$(systemctl --no-pager list-unit-files iptables)\nwill not return the expected result.\nSo I uploaded this patch.\n\nI think with this three lines, we can make sure that communication between IPA and ironic-conductor will not be blocked by iptables.\nAnd BTW we should also need to disable firewalld service as start from CentOS7 firewalld became default firewall.\nWhat you think @Andreas?","commit_id":"fe4ac67241a85d2fee5046893cafdbb10465961b"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2472cd4d044eb89f2de9e0e12de1c366accf3414","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        fi"},{"line_number":21,"context_line":"        ;;"},{"line_number":22,"context_line":"    systemd)"},{"line_number":23,"context_line":"        if [[ $(systemctl --no-pager list-unit-files iptables.service) \u003d~ \u0027enabled\u0027 ]]; then"},{"line_number":24,"context_line":"            systemctl disable iptables.service"},{"line_number":25,"context_line":"        fi"},{"line_number":26,"context_line":"        systemctl enable $(svc-map ironic-python-agent).service"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"7a3c09a3_96b2c292","line":23,"in_reply_to":"7a3c09a3_58be0bd5","updated":"2017-01-17 16:27:45.000000000","message":"I would propose that we stop trying to parse the output of the command and use the systemctl is-enabled command to check this.","commit_id":"fe4ac67241a85d2fee5046893cafdbb10465961b"},{"author":{"_account_id":9369,"name":"Steve Kowalik","email":"steven@wedontsleep.org","username":"stevenk"},"change_message_id":"e51796b5e02ac1a242073278f2fa35db4df5e12f","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        fi"},{"line_number":21,"context_line":"        ;;"},{"line_number":22,"context_line":"    systemd)"},{"line_number":23,"context_line":"        if [[ $(systemctl --no-pager list-unit-files iptables.service) \u003d~ \u0027enabled\u0027 ]]; then"},{"line_number":24,"context_line":"            systemctl disable iptables.service"},{"line_number":25,"context_line":"        fi"},{"line_number":26,"context_line":"        systemctl enable $(svc-map ironic-python-agent).service"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"7a3c09a3_6d81e3fa","line":23,"in_reply_to":"7a3c09a3_62a57345","updated":"2017-01-18 05:06:48.000000000","message":"Ben\u0027s suggestion of guarding systemctl in an if block will will not cause disk-image-create to fail. The only thing you\u0027ll see sometimes is stderr if systemctl outputs any.","commit_id":"fe4ac67241a85d2fee5046893cafdbb10465961b"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"c3a5f3ffb63c448a507b9e03b17de5ebfe42014b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        fi"},{"line_number":21,"context_line":"        ;;"},{"line_number":22,"context_line":"    systemd)"},{"line_number":23,"context_line":"        if [[ $(systemctl --no-pager list-unit-files iptables.service) \u003d~ \u0027enabled\u0027 ]]; then"},{"line_number":24,"context_line":"            systemctl disable iptables.service"},{"line_number":25,"context_line":"        fi"},{"line_number":26,"context_line":"        systemctl enable $(svc-map ironic-python-agent).service"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"5a3905b3_267fa8ab","line":23,"in_reply_to":"7a3c09a3_62a57345","updated":"2017-01-19 15:57:51.000000000","message":"Yeah, that\u0027s exactly the behavior you want.  The command fails, so the if evaluates to false and we skip the disable step.  Command failures in an if statement don\u0027t trigger set -e to fail the script.","commit_id":"fe4ac67241a85d2fee5046893cafdbb10465961b"},{"author":{"_account_id":19156,"name":"Leehom Li","email":"feli5_li@163.com","username":"leehom"},"change_message_id":"22ce0b0b65358726d9dc8e5a1ae912a51c015b92","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        fi"},{"line_number":21,"context_line":"        ;;"},{"line_number":22,"context_line":"    systemd)"},{"line_number":23,"context_line":"        if [[ $(systemctl --no-pager list-unit-files iptables.service) \u003d~ \u0027enabled\u0027 ]]; then"},{"line_number":24,"context_line":"            systemctl disable iptables.service"},{"line_number":25,"context_line":"        fi"},{"line_number":26,"context_line":"        systemctl enable $(svc-map ironic-python-agent).service"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"7a3c09a3_62a57345","line":23,"in_reply_to":"7a3c09a3_96b2c292","updated":"2017-01-18 02:51:10.000000000","message":"That\u0027s would be the result when create with image without iptables service.\n\n# systemctl is-enabled iptables\nFailed to get unit file state for iptables.service: No such file or directory\n# echo $?\n1\n\nAnd this will cause disk-image-create command execute fail.","commit_id":"fe4ac67241a85d2fee5046893cafdbb10465961b"},{"author":{"_account_id":9369,"name":"Steve Kowalik","email":"steven@wedontsleep.org","username":"stevenk"},"change_message_id":"0d1a9688321d1b334f01979efd1b53ece72857ce","unresolved":false,"context_lines":[{"line_number":11,"context_line":"rm -rf /tmp/ironic-python-agent"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"# Disable firewall service to prevent ironic conductor from communication"},{"line_number":14,"context_line":"# fail with ironic-python-agent"},{"line_number":15,"context_line":"case \"$DIB_INIT_SYSTEM\" in"},{"line_number":16,"context_line":"    upstart)"},{"line_number":17,"context_line":"        if [ -f /etc/init/ufw.conf ]; then"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"5a3905b3_a408012f","line":14,"range":{"start_line":14,"start_character":19,"end_line":14,"end_character":25},"updated":"2017-01-25 03:41:25.000000000","message":"I certainly appreciate the comment, but I think it would be better placed in the systemd section, closer to the code in question.","commit_id":"c5ec30f0342fb52c3a1c36284ff5576819f9e26e"},{"author":{"_account_id":19156,"name":"Leehom Li","email":"feli5_li@163.com","username":"leehom"},"change_message_id":"27fcf55f87eb0ba275cc6ec1b6135097b7f7ddf5","unresolved":false,"context_lines":[{"line_number":11,"context_line":"rm -rf /tmp/ironic-python-agent"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"# Disable firewall service to prevent ironic conductor from communication"},{"line_number":14,"context_line":"# fail with ironic-python-agent"},{"line_number":15,"context_line":"case \"$DIB_INIT_SYSTEM\" in"},{"line_number":16,"context_line":"    upstart)"},{"line_number":17,"context_line":"        if [ -f /etc/init/ufw.conf ]; then"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"5a3905b3_93ab49d6","line":14,"range":{"start_line":14,"start_character":19,"end_line":14,"end_character":25},"in_reply_to":"5a3905b3_a408012f","updated":"2017-01-25 06:24:24.000000000","message":"@Steve thanks for your comment.\nI put comment here because OS with upstart and sysv are also disabling firewall service to do the prevention.","commit_id":"c5ec30f0342fb52c3a1c36284ff5576819f9e26e"}]}
