)]}'
{"diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"010ed2c234e5bc33efa5683eb1575642af371e3a","unresolved":false,"context_lines":[{"line_number":24,"context_line":"elif [ \"$DIB_INIT_SYSTEM\" \u003d\u003d \"systemd\" ]; then"},{"line_number":25,"context_line":"    install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-interface@.service /usr/lib/systemd/system/dhcp-interface@.service"},{"line_number":26,"context_line":"    install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-all-interfaces-udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules"},{"line_number":27,"context_line":"    sed -i \"s/TimeoutStartSec\u003dDIB_DHCP_TIMEOUT/TimeoutStartSec\u003d${DIB_DHCP_TIMEOUT:-30}s/\" /usr/lib/systemd/system/dhcp-interface@.service"},{"line_number":28,"context_line":"elif [ \"$DIB_INIT_SYSTEM\" \u003d\u003d \"sysv\" ]; then"},{"line_number":29,"context_line":"    install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.init /etc/init.d/dhcp-all-interfaces"},{"line_number":30,"context_line":"    update-rc.d dhcp-all-interfaces defaults"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"3fa0c359_ff0c543c","side":"PARENT","line":27,"updated":"2018-02-08 03:01:56.000000000","message":"this is the bit that actually writes the timeout into the file?\n\nI don\u0027t get where ${DIB_DHCP_TIMEOUT} is actually set for the actual booting system?\n\nThe service file \u0026 the upstart file are going to need to set it before the script runs?","commit_id":"be8d9b6520c765b786bcb3939ba795637b7a4f98"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"932c5dfb9566d0c8cc3f5d7c1e1c04c1c1afd400","unresolved":false,"context_lines":[{"line_number":24,"context_line":"elif [ \"$DIB_INIT_SYSTEM\" \u003d\u003d \"systemd\" ]; then"},{"line_number":25,"context_line":"    install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-interface@.service /usr/lib/systemd/system/dhcp-interface@.service"},{"line_number":26,"context_line":"    install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-all-interfaces-udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules"},{"line_number":27,"context_line":"    sed -i \"s/TimeoutStartSec\u003dDIB_DHCP_TIMEOUT/TimeoutStartSec\u003d${DIB_DHCP_TIMEOUT:-30}s/\" /usr/lib/systemd/system/dhcp-interface@.service"},{"line_number":28,"context_line":"elif [ \"$DIB_INIT_SYSTEM\" \u003d\u003d \"sysv\" ]; then"},{"line_number":29,"context_line":"    install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.init /etc/init.d/dhcp-all-interfaces"},{"line_number":30,"context_line":"    update-rc.d dhcp-all-interfaces defaults"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"3fa0c359_3f7abc87","side":"PARENT","line":27,"in_reply_to":"3fa0c359_ff0c543c","updated":"2018-02-08 03:07:50.000000000","message":"I can\u0027t believe I missed that :(","commit_id":"be8d9b6520c765b786bcb3939ba795637b7a4f98"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"c0a856577db7c45a01c13515949d6e6c597fedee","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-interface@.service /usr/lib/systemd/system/dhcp-interface@.service"},{"line_number":26,"context_line":"    install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-all-interfaces-udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules"},{"line_number":27,"context_line":"    sed -i \"s/TimeoutStartSec\u003dDIB_DHCP_TIMEOUT/TimeoutStartSec\u003d${DIB_DHCP_TIMEOUT:-30}s/\" /usr/lib/systemd/system/dhcp-interface@.service"},{"line_number":28,"context_line":"    sed -i \"s/DIB_DHCP_TIMEOUT/${DIB_DHCP_TIMEOUT:-30}/\" /usr/local/sbin/dhcp-all-interfaces.sh"},{"line_number":29,"context_line":"elif [ \"$DIB_INIT_SYSTEM\" \u003d\u003d \"sysv\" ]; then"},{"line_number":30,"context_line":"    install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.init /etc/init.d/dhcp-all-interfaces"},{"line_number":31,"context_line":"    update-rc.d dhcp-all-interfaces defaults"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"3fa0c359_ecbc90dd","line":28,"updated":"2018-02-21 00:55:39.000000000","message":"Getting really close here.  This sed needs to be done fro all installs regardless of the init system  So perhaps move list to line 10 and switch to using ${SCRIPTDIR}/dhcp-all-interfaces.sh.","commit_id":"4e488d9d52351604f294c96e9351b78d7e8880c0"}],"diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"4eb5771a681f089aaa269d0a0fb7281eba62a027","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        echo \"Device has generated MAC, skipping.\""},{"line_number":98,"context_line":"    else"},{"line_number":99,"context_line":"        local has_link"},{"line_number":100,"context_line":"        while [ 1 ]; do"},{"line_number":101,"context_line":"            # Need to set the link up on each iteration"},{"line_number":102,"context_line":"            ip link set dev $interface up \u0026\u003e/dev/null"},{"line_number":103,"context_line":"            has_link\u003d$(get_if_link $interface)"}],"source_content_type":"text/x-sh","patch_set":1,"id":"9f91af0f_655cfeec","line":100,"updated":"2018-01-09 00:01:25.000000000","message":"i really don\u0027t want to put an infinite loop as if something goes wrong it\u0027s really hard to break into.\n\nthis has always timed out [1] and was increased in [2].  increasing the timeout might be appropriate, possibly using a higher timeout for infiniband?\n\n[1] I27e0902e62804e8d719acd7288109bd0e294fd16\n[2] Ibf7015162fc890d4de8a417b868b0301146944c0","commit_id":"459920456b1dba68d48f3952a2f1a39fd3672db3"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"0e9b66b603137d5184ebcdd2f0c002deb9483383","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        echo \"Device has generated MAC, skipping.\""},{"line_number":98,"context_line":"    else"},{"line_number":99,"context_line":"        local has_link"},{"line_number":100,"context_line":"        while [ 1 ]; do"},{"line_number":101,"context_line":"            # Need to set the link up on each iteration"},{"line_number":102,"context_line":"            ip link set dev $interface up \u0026\u003e/dev/null"},{"line_number":103,"context_line":"            has_link\u003d$(get_if_link $interface)"}],"source_content_type":"text/x-sh","patch_set":1,"id":"9f91af0f_e5ea4ed6","line":100,"in_reply_to":"9f91af0f_655cfeec","updated":"2018-01-09 00:09:24.000000000","message":"so you have it configured here https://github.com/openstack/diskimage-builder/blob/master/diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-interface%40.service#L22 is that enough ? It just seem weird that you have the option to configure the timeout but it has no effect","commit_id":"459920456b1dba68d48f3952a2f1a39fd3672db3"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"d5d6b615081f9adc04d23ec331b31c1069a036d2","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        echo \"Device has generated MAC, skipping.\""},{"line_number":98,"context_line":"    else"},{"line_number":99,"context_line":"        local has_link"},{"line_number":100,"context_line":"        while [ 1 ]; do"},{"line_number":101,"context_line":"            # Need to set the link up on each iteration"},{"line_number":102,"context_line":"            ip link set dev $interface up \u0026\u003e/dev/null"},{"line_number":103,"context_line":"            has_link\u003d$(get_if_link $interface)"}],"source_content_type":"text/x-sh","patch_set":1,"id":"9f91af0f_450bfa7b","line":100,"in_reply_to":"9f91af0f_e5ea4ed6","updated":"2018-01-09 00:25:00.000000000","message":"hmm, good point, and i wasn\u0027t aware of that.  \n\nthings other than systemd don\u0027t have that, but we\u0027re in a systemd world now anyway so that\u0027s not huge issue.\n\nso the problem is that this is speeding through, and timing out in ~20 seconds, whereas the overall timeout requested was 30 seconds?\n\ndropping a comment in the cl about that, and a mention that the calling service times out in the code, and fixing the orphaned code and i may be convinced\n\n[1] https://github.com/openstack/diskimage-builder/commit/2747613ca2fc51118526f4ad6e28ed7b49e50632#commitcomment-19918816","commit_id":"459920456b1dba68d48f3952a2f1a39fd3672db3"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"4eb5771a681f089aaa269d0a0fb7281eba62a027","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            [ \"$has_link\" \u003d\u003d \"1\" ] \u0026\u0026 break"},{"line_number":105,"context_line":"            sleep 1"},{"line_number":106,"context_line":"        done"},{"line_number":107,"context_line":"        if [ \"$has_link\" \u003d\u003d \"1\" ]; then"},{"line_number":108,"context_line":"            enable_interface \"$interface\""},{"line_number":109,"context_line":"        else"},{"line_number":110,"context_line":"            echo \"No link detected, skipping\""}],"source_content_type":"text/x-sh","patch_set":1,"id":"9f91af0f_0575f263","line":107,"updated":"2018-01-09 00:01:25.000000000","message":"this essentially orphans this code, as it won\u0027t break until has_link is up","commit_id":"459920456b1dba68d48f3952a2f1a39fd3672db3"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"435b605b0fa3fea4edcdf8b386ba434ba83fff64","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        echo \"Device has generated MAC, skipping.\""},{"line_number":98,"context_line":"    else"},{"line_number":99,"context_line":"        local has_link"},{"line_number":100,"context_line":"        #Service timeout is controlled by DIB_DHCP_TIMEOUT"},{"line_number":101,"context_line":"        while [ 1 ]; do"},{"line_number":102,"context_line":"            # Need to set the link up on each iteration"},{"line_number":103,"context_line":"            ip link set dev $interface up \u0026\u003e/dev/null"}],"source_content_type":"text/x-sh","patch_set":2,"id":"3fa0c359_35369e05","line":100,"updated":"2018-02-06 03:37:01.000000000","message":"I\u0027m not certain this is okay.\n\nWe use this script on most (all except gentoo?) distros but this only uses DIB_DHCP_TIMEOUT in the systemd case.  So that means old redhat distros (el6) and sysv will now potentially sit here forever if an interface is present but not cabled?\n\nNow it seems systemd is the defacto but it at least leaves debian out.","commit_id":"0caf7bcbac70ff1ad2eaa1279718928f5d1d5947"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"ac26fba26d7fc22c99fb16e97b0ec90f57134a22","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        echo \"Device has generated MAC, skipping.\""},{"line_number":98,"context_line":"    else"},{"line_number":99,"context_line":"        local has_link"},{"line_number":100,"context_line":"        local tries\u003d${DIB_DHCP_TIMEOUT:-30}"},{"line_number":101,"context_line":"        for ((; tries \u003e 0; tries--)); do"},{"line_number":102,"context_line":"            # Need to set the link up on each iteration"},{"line_number":103,"context_line":"            ip link set dev $interface up \u0026\u003e/dev/null"}],"source_content_type":"text/x-sh","patch_set":6,"id":"3fa0c359_6eabb41c","line":100,"updated":"2018-02-19 23:06:55.000000000","message":"This has the same problem as PatchSet 4.  During the image create we have access to these DIB_ environment variables but once we\u0027re booting the running system we don\u0027t.  So this is basically the same as tries\u003d30.\n\nI think we can change this line to:\n\n local tries\u003dDIB_DHCP_TIMEOUT\n\nand then add something like:\n\n sed -i \"s/DIB_DHCP_TIMEOUT/${DIB_DHCP_TIMEOUT:-30}s/\" ${SCRIPTDIR}/dhcp-all-interfaces.sh\n\nin 50-dhcp-all-interfaces.sh, possibly removing the sed for TimeoutStartSec ?\n\nI *think* that allows us to put this into the image *and* as a bonus? adds a runtime tweak so you can test it by booting with DIB_DHCP_TIMEOUT\u003d120 to temporarily increase the timeout","commit_id":"c22aeddf2b64f73f251acd302020d979a7089108"},{"author":{"_account_id":14807,"name":"Lenny","email":"lennyb@mellanox.com","username":"lennyb"},"change_message_id":"4d97ee284ff620315c89a70732498e6c56e59d47","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        echo \"Device has generated MAC, skipping.\""},{"line_number":98,"context_line":"    else"},{"line_number":99,"context_line":"        local has_link"},{"line_number":100,"context_line":"        local tries\u003d${DIB_DHCP_TIMEOUT:-30}"},{"line_number":101,"context_line":"        for ((; tries \u003e 0; tries--)); do"},{"line_number":102,"context_line":"            # Need to set the link up on each iteration"},{"line_number":103,"context_line":"            ip link set dev $interface up \u0026\u003e/dev/null"}],"source_content_type":"text/x-sh","patch_set":6,"id":"3fa0c359_27bf03fc","line":100,"in_reply_to":"3fa0c359_6eabb41c","updated":"2018-02-20 12:55:59.000000000","message":"we cant totaly remove DIB_DHCP_TIMEOUT from the TimeoutStartSec, since default timeout is 90 sec.\nRegarding the rest I agree, thanks for a comment and review.","commit_id":"c22aeddf2b64f73f251acd302020d979a7089108"}]}
