)]}'
{"elements/growroot/init-scripts/upstart/glean.conf":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"b6e51b9538abda5fa126917f413d169f04d2568a","unresolved":false,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"console output"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"start on local-filesystems"}],"source_content_type":"text/plain","patch_set":2,"id":"3a50d1a3_04712f44","line":5,"updated":"2015-07-31 23:06:01.000000000","message":"Is there some way of indicating this should run immediately after local filesystems so that subsequent init scripts don\u0027t bail out when they run out of disk? This may be extra defensive but I am paranoid.","commit_id":"5e83d0099be1294d5f4735889e8595d88190ac0c"}],"elements/growroot/init-scripts/upstart/growroot.conf":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"8d06dc652b45470b88c793207f39d557891fdd3c","unresolved":false,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"console output"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"start on local-filesystems"}],"source_content_type":"text/plain","patch_set":6,"id":"1a4dcd0f_3fc6e449","line":5,"updated":"2015-08-14 17:53:00.000000000","message":"This doesn\u0027t actually seem to run growroot. Aren\u0027t you missing a directive/command here for that?","commit_id":"b21be37d79b01a121d612f1ad68f3530ab7a47ed"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"1ab440ca8ae5648eefa9d215e405292355183d27","unresolved":false,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"console output"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"start on local-filesystems"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"post-start script"},{"line_number":8,"context_line":"/usr/local/sbin/growroot"}],"source_content_type":"text/plain","patch_set":9,"id":"fa1b9901_58b28f07","line":5,"updated":"2015-08-19 20:13:06.000000000","message":"Actually you could do this as soon as / is mounted, and that has the advantage of blocking the rest of boot, so you won\u0027t run things before / is big enough.\n\n    start on mounted MOUNTPOINT\u003d/\n\nHowever, it also starts getting into \"are all of the dependencies in /bin or /sbin\" and blah blah. Just means we have a caveat that system boot will progress without the extra space.","commit_id":"d3f9ed65bafce50511c64bc13820f3e07cd4f013"}],"elements/growroot/static/sbin/growroot":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"b6e51b9538abda5fa126917f413d169f04d2568a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"set -o pipefail"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"root_dev\u003d$(df -P / | tail -n 1 | awk \u0027/.*/ { print $1 }\u0027)"},{"line_number":7,"context_line":"part_no\u003d$(stat --printf\u003d\"%T\" $root_dev | tail -c 1)"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"minor_dev_no\u003d$(stat --printf\u003d\"%T\" $root_dev)"},{"line_number":10,"context_line":"major_dev_no\u003d$(stat --printf\u003d\"%t\" $root_dev)"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"3a50d1a3_24f9cbc8","line":7,"updated":"2015-07-31 23:06:01.000000000","message":"Couple of issues with this:\n\nIt zero indexes (according to my local testing) but grow part expects 1 indexes.\n\nIt will return a hex value which is fine for 0-9 but a-f will need to be converted to decimal if growpart expects decimal (the man page does not say).\n\nThis probably deserves a comment explaining that we take the last byte only because linux only allows up to 15 partitions per device but the minor numbers will be much greater. Basically we do minor mod 16 here. (At least that is how I am reading it and it wasn\u0027t easy to get here).","commit_id":"5e83d0099be1294d5f4735889e8595d88190ac0c"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"b6e51b9538abda5fa126917f413d169f04d2568a","unresolved":false,"context_lines":[{"line_number":6,"context_line":"root_dev\u003d$(df -P / | tail -n 1 | awk \u0027/.*/ { print $1 }\u0027)"},{"line_number":7,"context_line":"part_no\u003d$(stat --printf\u003d\"%T\" $root_dev | tail -c 1)"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"minor_dev_no\u003d$(stat --printf\u003d\"%T\" $root_dev)"},{"line_number":10,"context_line":"major_dev_no\u003d$(stat --printf\u003d\"%t\" $root_dev)"},{"line_number":11,"context_line":"disk\u003d$(find /sys/dev/block -name \"$((16#$major_dev_no)):${minor_dev_no::-1}0\")"},{"line_number":12,"context_line":"disk\u003d\"/dev/$(source ${disk}/uevent; echo $DEVNAME)\""}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"3a50d1a3_84b69ff7","line":9,"updated":"2015-07-31 23:06:01.000000000","message":"The proposed comment above will indicate why this is not a redundant line.","commit_id":"5e83d0099be1294d5f4735889e8595d88190ac0c"}],"elements/growroot/static/usr/local/sbin/growroot":[{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"1ab440ca8ae5648eefa9d215e405292355183d27","unresolved":false,"context_lines":[{"line_number":4,"context_line":"set -exu"},{"line_number":5,"context_line":"set -o pipefail"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"root_dev\u003d$(df -P / | tail -n 1 | awk \u0027/.*/ { print $1 }\u0027)"},{"line_number":8,"context_line":"minor_dev_no\u003d$(stat --printf\u003d\"%T\" $root_dev)"},{"line_number":9,"context_line":"major_dev_no\u003d$(stat --printf\u003d\"%t\" $root_dev)"},{"line_number":10,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":9,"id":"fa1b9901_f844c3b7","line":7,"updated":"2015-08-19 20:13:06.000000000","message":"df is a little.. weird for this.\n\n    root_dev\u003d$(awk \u0027$2 \u003d\u003d \"/\" \u0026\u0026 $1 !\u003d \"rootfs\"{ print $1 } /proc/mounts\u0027)\n\nSeems more robust. :-P #notaminusone","commit_id":"d3f9ed65bafce50511c64bc13820f3e07cd4f013"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"1ab440ca8ae5648eefa9d215e405292355183d27","unresolved":false,"context_lines":[{"line_number":21,"context_line":"growpart $disk $part_no"},{"line_number":22,"context_line":"# Error code 1 means no change"},{"line_number":23,"context_line":"if [ \"$?\" -le 1 ]; then"},{"line_number":24,"context_line":"    # XXX:greghaynes We need to ensure this is an ext4 partition before doing this"},{"line_number":25,"context_line":"    resize2fs $root_dev"},{"line_number":26,"context_line":"fi"}],"source_content_type":"application/x-shellscript","patch_set":9,"id":"fa1b9901_f8a5a346","line":24,"updated":"2015-08-19 20:13:06.000000000","message":"We\u0027ll explode no matter what, so not much we can really do differently.","commit_id":"d3f9ed65bafce50511c64bc13820f3e07cd4f013"},{"author":{"_account_id":9369,"name":"Steve Kowalik","email":"steven@wedontsleep.org","username":"stevenk"},"change_message_id":"7931076a457cee59e7984d5c8b88c3e4e671983e","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"set +e"},{"line_number":21,"context_line":"growpart $disk $part_no"},{"line_number":22,"context_line":"# Error code 1 means no change"},{"line_number":23,"context_line":"if [ \"$?\" -le 1 ]; then"},{"line_number":24,"context_line":"    # always return true because this might not work if were are non ext4"},{"line_number":25,"context_line":"    resize2fs $root_dev || true"}],"source_content_type":"application/x-shellscript","patch_set":10,"id":"fa1b9901_76bf1761","line":22,"updated":"2015-08-21 04:41:25.000000000","message":"You\u0027ll never reach here. The script is set -e, which means if growpart fails, the script will die, and you\u0027ll never check for resize2fs. I\u0027d suggest:\n\nif growpart $disk $part_no; then \u003cresize2fs\u003e","commit_id":"16fc1f901281ad5cc10f69af1f6bbe11e2f9ade4"}]}
