)]}'
{".alltests":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"593cd9ca9cc51f470bb700b4ee02051b901e89cf","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"set -e"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"TOP_DIR\u003d$(python -c \"import os; print os.path.dirname(os.path.realpath(\u0027$0\u0027))\")"},{"line_number":6,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"fa6399be_f76d77cd","line":3,"updated":"2016-10-11 01:09:54.000000000","message":"i agree this is much better than the ad-hoc exit on error handling below\n\nthis was added here -\u003e https://review.openstack.org/#/c/233368/","commit_id":"51d53e1428c078be6aae33eb0674f532912009ad"}],".functests":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"593cd9ca9cc51f470bb700b4ee02051b901e89cf","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"SRC_DIR\u003d$(python -c \"import os; print os.path.dirname(os.path.realpath(\u0027$0\u0027))\")"},{"line_number":4,"context_line":"set -e"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"cd ${SRC_DIR}"},{"line_number":7,"context_line":"export TESTS_DIR\u003d${SRC_DIR}/test/functional"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"fa6399be_573703e3","side":"PARENT","line":4,"updated":"2016-10-11 01:09:54.000000000","message":"i see that this mirrors .probetests - and this script is slightly different in that capturing the return code is apparently working as intended and not just an oversight how how to do \"exit on error\"\n\n... but I\u0027m not sure why we would prefer one way over the other?","commit_id":"9be2a58576f391f5db8dfc393115b1fe6a660d8c"},{"author":{"_account_id":16896,"name":"Ondřej Nový","email":"novy@ondrej.org","username":"onovy"},"change_message_id":"194d3d0e5221851f7df57cdc6c48cfc8e2dd4ff5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"SRC_DIR\u003d$(python -c \"import os; print os.path.dirname(os.path.realpath(\u0027$0\u0027))\")"},{"line_number":4,"context_line":"set -e"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"cd ${SRC_DIR}"},{"line_number":7,"context_line":"export TESTS_DIR\u003d${SRC_DIR}/test/functional"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"fa6399be_53c28c34","side":"PARENT","line":4,"in_reply_to":"fa6399be_573703e3","updated":"2016-10-11 19:42:09.000000000","message":"i\u0027m preffering rvalue\u003d$? + explicit exit here because i want to \"cd\" back before exit. We can use set -e and remove line 9+12, but script will not change pwd back on failure.","commit_id":"9be2a58576f391f5db8dfc393115b1fe6a660d8c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b73744e05d7a2dc9e8f24bd827459d40c120bb59","unresolved":false,"context_lines":[{"line_number":7,"context_line":"export TESTS_DIR\u003d${SRC_DIR}/test/functional"},{"line_number":8,"context_line":"ostestr --serial --pretty $@"},{"line_number":9,"context_line":"rvalue\u003d$?"},{"line_number":10,"context_line":"cd -"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"exit $rvalue"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"fa6399be_b9b029df","side":"PARENT","line":10,"updated":"2016-10-11 20:48:28.000000000","message":"I think i had mistakenly assumed this script was working as intended before\n\n... obviously the `cd -` command here only effects the environment of this forked process and not the cwd of the calling bash environment that invoked this script.\n\nso i\u0027m not *entirely* sure what\u0027s trying to be solved for here?\n\nBut if the assumption is that this line should exit even on failure the set -e was not helping ;)","commit_id":"9be2a58576f391f5db8dfc393115b1fe6a660d8c"}],"/COMMIT_MSG":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"593cd9ca9cc51f470bb700b4ee02051b901e89cf","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Ondřej Nový \u003condrej.novy@firma.seznam.cz\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-08-18 09:48:45 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Correctly check all return codes in SAIO tests"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I36dcff9cc2593bcfb6aebbe84b59d95c711eb3e4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa6399be_37960f95","line":7,"updated":"2016-10-11 01:09:54.000000000","message":"This is vague - how are we defining \"correctly\" - why are the .alltests and .functests scripts getting mixed in with the SAIO scripts?\n\nShould this just say \"apply bash error handling consistently in all bash scripts\" - is that what\u0027s going on in this change?\n\nIt would be easier to evaluate this change with a defined problem and scope.","commit_id":"51d53e1428c078be6aae33eb0674f532912009ad"},{"author":{"_account_id":16896,"name":"Ondřej Nový","email":"novy@ondrej.org","username":"onovy"},"change_message_id":"194d3d0e5221851f7df57cdc6c48cfc8e2dd4ff5","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Ondřej Nový \u003condrej.novy@firma.seznam.cz\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-08-18 09:48:45 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Correctly check all return codes in SAIO tests"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I36dcff9cc2593bcfb6aebbe84b59d95c711eb3e4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa6399be_93e264d4","line":7,"in_reply_to":"fa6399be_37960f95","updated":"2016-10-11 19:42:09.000000000","message":"Done","commit_id":"51d53e1428c078be6aae33eb0674f532912009ad"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b73744e05d7a2dc9e8f24bd827459d40c120bb59","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Ondřej Nový \u003condrej.novy@firma.seznam.cz\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-10-11 22:13:06 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Apply bash error handling consistently in all bash scripts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I36dcff9cc2593bcfb6aebbe84b59d95c711eb3e4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa6399be_7904d17d","line":7,"updated":"2016-10-11 20:48:28.000000000","message":"as best I can grep this change *is* hitting all relevant bash scripts in the repo...","commit_id":"19102c6e7f501241f36e5e40d27ab3ba5dcc6655"}],"doc/saio/bin/remakerings":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"593cd9ca9cc51f470bb700b4ee02051b901e89cf","unresolved":false,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"cd /etc/swift"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"swift-ring-builder object.builder create 10 3 1"},{"line_number":8,"context_line":"swift-ring-builder object.builder add r1z1-127.0.0.1:6010/sdb1 1"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"fa6399be_b7cf7fb2","side":"PARENT","line":5,"updated":"2016-10-11 01:09:54.000000000","message":"i had to double check that rm -f will still exit 0 if the file doesn\u0027t exist\n\n... this is correct as best I can tell","commit_id":"9be2a58576f391f5db8dfc393115b1fe6a660d8c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"593cd9ca9cc51f470bb700b4ee02051b901e89cf","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"set -e"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"cd /etc/swift"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"fa6399be_57daa379","line":4,"updated":"2016-10-11 01:09:54.000000000","message":"this seems like an improvement","commit_id":"51d53e1428c078be6aae33eb0674f532912009ad"}],"doc/saio/bin/resetswift":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"593cd9ca9cc51f470bb700b4ee02051b901e89cf","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"set -e"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"swift-init all stop"},{"line_number":6,"context_line":"# Remove the following line if you did not set up rsyslog for individual logging:"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"fa6399be_2417bb52","line":3,"updated":"2016-10-11 01:09:54.000000000","message":"this could be actively harmful if there\u0027s some sort of failure halfway through a teardown you probably still want to do the rest...","commit_id":"51d53e1428c078be6aae33eb0674f532912009ad"},{"author":{"_account_id":16896,"name":"Ondřej Nový","email":"novy@ondrej.org","username":"onovy"},"change_message_id":"194d3d0e5221851f7df57cdc6c48cfc8e2dd4ff5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"set -e"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"swift-init all stop"},{"line_number":6,"context_line":"# Remove the following line if you did not set up rsyslog for individual logging:"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"fa6399be_93942438","line":3,"in_reply_to":"fa6399be_2417bb52","updated":"2016-10-11 19:42:09.000000000","message":"my two cents:\n\nIf i can stop all swift services, I should not umount /mnt/sdb1. If I can\u0027t umount, i should not mkfs.xfs, dtto for rest.\n\nSo for me is correct to stop processing this \"reset script\" and exit \u003e 0 if i  can\u0027t reset swift env completly.","commit_id":"51d53e1428c078be6aae33eb0674f532912009ad"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b73744e05d7a2dc9e8f24bd827459d40c120bb59","unresolved":false,"context_lines":[{"line_number":4,"context_line":""},{"line_number":5,"context_line":"swift-init all kill"},{"line_number":6,"context_line":"# Remove the following line if you did not set up rsyslog for individual logging:"},{"line_number":7,"context_line":"sudo find /var/log/swift -type f -exec rm -f {} \\;"},{"line_number":8,"context_line":"if cut -d\u0027 \u0027 -f2 /proc/mounts | grep -q /mnt/sdb1 ; then"},{"line_number":9,"context_line":"    sudo umount /mnt/sdb1"},{"line_number":10,"context_line":"fi"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"fa6399be_59c62d68","line":7,"updated":"2016-10-11 20:48:28.000000000","message":"I think this line was benign before if you didn\u0027t configure the rsyslog stuff - with set -e you *have* to remove it\n\n... but the instructions already say to do that:\n\nhttp://docs.openstack.org/developer/swift/development_saio.html#setting-up-scripts-for-running-swift","commit_id":"19102c6e7f501241f36e5e40d27ab3ba5dcc6655"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b73744e05d7a2dc9e8f24bd827459d40c120bb59","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    sudo umount /mnt/sdb1"},{"line_number":10,"context_line":"fi"},{"line_number":11,"context_line":"# If you are using a loopback device set SAIO_BLOCK_DEVICE to \"/srv/swift-disk\""},{"line_number":12,"context_line":"sudo mkfs.xfs -f ${SAIO_BLOCK_DEVICE:-/dev/sdb1}"},{"line_number":13,"context_line":"sudo mount /mnt/sdb1"},{"line_number":14,"context_line":"sudo mkdir /mnt/sdb1/1 /mnt/sdb1/2 /mnt/sdb1/3 /mnt/sdb1/4"},{"line_number":15,"context_line":"sudo chown ${USER}:${USER} /mnt/sdb1/*"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"fa6399be_19e59508","line":12,"updated":"2016-10-11 20:48:28.000000000","message":"this all seems to work fine best I can tell with a custom SAIO_BLOCK_DEVICE","commit_id":"19102c6e7f501241f36e5e40d27ab3ba5dcc6655"}]}
