)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16620,"name":"Alicja Kwasniewska","email":"alicja.kwasniewska@intel.com","username":"akwasnie"},"change_message_id":"1be7838399f22c2911c72f054e83294feabb6fb1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Thiago Gomes \u003cthiago.gomes@lsbd.ufc.br\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-03-01 14:28:04 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Cleanup-images with images with duplicate id"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"To remove this images is necessary force it."},{"line_number":10,"context_line":"If the image are been used, to use --force would not remove it."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I47f424ccb1f21be4d42bc286e0a16616cebf1f31"},{"line_number":13,"context_line":"Closes-Bug: #1551917"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7af24918_0b754597","line":10,"range":{"start_line":7,"start_character":0,"end_line":10,"end_character":63},"updated":"2016-03-02 08:24:28.000000000","message":"please improve commit message\n is it connected with images with duplicate id or with images that are used by some containers?","commit_id":"6463b6cd47322ba7a7ef07e19be6c04e257f3337"},{"author":{"_account_id":11105,"name":"Swapnil Kulkarni","email":"coolsvap@gmail.com","username":"coolsvap"},"change_message_id":"db92d049979b02bfedcc820e50e4abbd11534e51","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fix failed cleanup-images for images with"},{"line_number":10,"context_line":"duplicate id."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"To remove images with duplicate id is necessary force it."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I47f424ccb1f21be4d42bc286e0a16616cebf1f31"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"dab17558_6aaa32d6","line":11,"updated":"2016-05-06 17:53:49.000000000","message":"Please add Thiago Gomes as Co-Author","commit_id":"c38d9db19f532db239820ce5bae59d0381891ec3"}],"tools/cleanup-images":[{"author":{"_account_id":16233,"name":"Mauricio Lima","email":"mauriciolimab@gmail.com","username":"limamauricio"},"change_message_id":"a4e14adeec876553d413c63df735bdbb2ec0e9f7","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":". tools/validate-docker-execute"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"IMAGES\u003d`docker images -a -q`"},{"line_number":10,"context_line":"if [[ -z \"$IMAGES\" ]]; then"},{"line_number":11,"context_line":"    echo \"No images to cleanup, exit now.\""},{"line_number":12,"context_line":"    exit 0"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"7af24918_2c04b813","line":9,"updated":"2016-03-01 20:04:09.000000000","message":"Please, check it: bug/1551933","commit_id":"6463b6cd47322ba7a7ef07e19be6c04e257f3337"},{"author":{"_account_id":14967,"name":"Thiago Gomes","email":"fthiagogv@outlook.com","username":"fthiagogv"},"change_message_id":"6df56d167d30d2ee24fcd06f13c1db9cd395b771","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":". tools/validate-docker-execute"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"IMAGES\u003d`docker images -a -q`"},{"line_number":10,"context_line":"if [[ -z \"$IMAGES\" ]]; then"},{"line_number":11,"context_line":"    echo \"No images to cleanup, exit now.\""},{"line_number":12,"context_line":"    exit 0"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"7af24918_bf890ccd","line":9,"in_reply_to":"7af24918_0c4c5c6f","updated":"2016-03-01 20:34:25.000000000","message":"Done in https://review.openstack.org/#/c/286823/","commit_id":"6463b6cd47322ba7a7ef07e19be6c04e257f3337"},{"author":{"_account_id":16233,"name":"Mauricio Lima","email":"mauriciolimab@gmail.com","username":"limamauricio"},"change_message_id":"9961d4710bcaa4a26d14c3370ab717e2f2b9b0f2","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":". tools/validate-docker-execute"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"IMAGES\u003d`docker images -a -q`"},{"line_number":10,"context_line":"if [[ -z \"$IMAGES\" ]]; then"},{"line_number":11,"context_line":"    echo \"No images to cleanup, exit now.\""},{"line_number":12,"context_line":"    exit 0"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"7af24918_0c4c5c6f","line":9,"in_reply_to":"7af24918_2c04b813","updated":"2016-03-01 20:05:02.000000000","message":"https://bugs.launchpad.net/kolla/+bug/1551933","commit_id":"6463b6cd47322ba7a7ef07e19be6c04e257f3337"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"e0add06ebeb504746329408f4c6b22a0d9857f2e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"EOF"},{"line_number":10,"context_line":"}"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"if [ -n \"$2\" ]"},{"line_number":13,"context_line":"then"},{"line_number":14,"context_line":"    usage"},{"line_number":15,"context_line":"    exit 0"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"dab17558_0c8559ac","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":14},"updated":"2016-05-09 09:54:19.000000000","message":"Whats this test for?","commit_id":"0fa9a6bed65bb2a75fb65e73341488582031557f"},{"author":{"_account_id":11105,"name":"Swapnil Kulkarni","email":"coolsvap@gmail.com","username":"coolsvap"},"change_message_id":"dc6597e1042243ec9dd798876df0d6c9d3124ee4","unresolved":false,"context_lines":[{"line_number":9,"context_line":"EOF"},{"line_number":10,"context_line":"}"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"if [ -n \"$2\" ]"},{"line_number":13,"context_line":"then"},{"line_number":14,"context_line":"    usage"},{"line_number":15,"context_line":"    exit 0"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"dab17558_f0308703","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":14},"in_reply_to":"dab17558_0c8559ac","updated":"2016-05-10 02:58:53.000000000","message":"I think this is to if the user has supplied more than 1 argument.","commit_id":"0fa9a6bed65bb2a75fb65e73341488582031557f"},{"author":{"_account_id":11105,"name":"Swapnil Kulkarni","email":"coolsvap@gmail.com","username":"coolsvap"},"change_message_id":"05cf288cec0ade8cc12f4f0e097f0c5941f68f05","unresolved":false,"context_lines":[{"line_number":9,"context_line":"EOF"},{"line_number":10,"context_line":"}"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"if [ -n \"$2\" ]"},{"line_number":13,"context_line":"then"},{"line_number":14,"context_line":"    usage"},{"line_number":15,"context_line":"    exit 0"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"dab17558_e4ad4eea","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":14},"in_reply_to":"dab17558_4937cefe","updated":"2016-05-16 11:18:03.000000000","message":"There are more than one suggested throughout the review\n\n1. Paul suggest to use getopts se getopts or just check the length of \"$#\"\n\n2. Martin suggested, the $@ here means that all arguments passed to cleanup-images will also be passed to `docker rmi`\n\n3. Jeffrey suggested KOLLA_IMAGES\u003d$(docker images --filter \"label\u003dkolla_version\" | awk \u0027{if ($1\u003d\u003d\"\u003cnone\u003e\") print $3;else print $1\":\"$2}\u0027)","commit_id":"0fa9a6bed65bb2a75fb65e73341488582031557f"},{"author":{"_account_id":16233,"name":"Mauricio Lima","email":"mauriciolimab@gmail.com","username":"limamauricio"},"change_message_id":"b7a9173464e10427d5abcb38df533829992c2c1b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"EOF"},{"line_number":10,"context_line":"}"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"if [ -n \"$2\" ]"},{"line_number":13,"context_line":"then"},{"line_number":14,"context_line":"    usage"},{"line_number":15,"context_line":"    exit 0"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"dab17558_4937cefe","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":14},"in_reply_to":"dab17558_64dafe4d","updated":"2016-05-11 14:18:01.000000000","message":"Any suggestion?","commit_id":"0fa9a6bed65bb2a75fb65e73341488582031557f"},{"author":{"_account_id":11105,"name":"Swapnil Kulkarni","email":"coolsvap@gmail.com","username":"coolsvap"},"change_message_id":"d3a4bc1be08802237bab43c0320ad04ab3f61c21","unresolved":false,"context_lines":[{"line_number":9,"context_line":"EOF"},{"line_number":10,"context_line":"}"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"if [ -n \"$2\" ]"},{"line_number":13,"context_line":"then"},{"line_number":14,"context_line":"    usage"},{"line_number":15,"context_line":"    exit 0"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"dab17558_64dafe4d","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":14},"in_reply_to":"dab17558_a9703fdd","updated":"2016-05-10 12:04:16.000000000","message":"I think it can certainly be improved.","commit_id":"0fa9a6bed65bb2a75fb65e73341488582031557f"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"1ede183e9ed672fb5ddab0bde377c7206c679344","unresolved":false,"context_lines":[{"line_number":9,"context_line":"EOF"},{"line_number":10,"context_line":"}"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"if [ -n \"$2\" ]"},{"line_number":13,"context_line":"then"},{"line_number":14,"context_line":"    usage"},{"line_number":15,"context_line":"    exit 0"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"dab17558_a9703fdd","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":14},"in_reply_to":"dab17558_f0308703","updated":"2016-05-10 11:54:34.000000000","message":"I had a feeling that was the reason. But this is pretty poor, why not use getopts or just check the length of \"$#\"","commit_id":"0fa9a6bed65bb2a75fb65e73341488582031557f"},{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"6a9c25536046b476338966c62edcd1b42076f61a","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":". tools/validate-docker-execute.sh"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"KOLLA_IMAGES\u003d$(docker images -a --filter \"label\u003dkolla_version\" --format \"{{.ID}}\")"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"if [[ -z \"$KOLLA_IMAGES\" ]]; then"},{"line_number":38,"context_line":"    echo \"No images to cleanup, exit now.\""}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"dab17558_808ee4cd","line":35,"updated":"2016-05-10 14:48:38.000000000","message":"KOLLA_IMAGES\u003d$(docker images --filter \"label\u003dkolla_version\" | awk \u0027{if ($1\u003d\u003d\"\u003cnone\u003e\") print $3;else print $1\":\"$2}\u0027)\n\nI prefer to use this method to solve the issue.","commit_id":"0fa9a6bed65bb2a75fb65e73341488582031557f"},{"author":{"_account_id":13039,"name":"Martin André","email":"m.andre@redhat.com","username":"mandre"},"change_message_id":"4258274bafc8b72d22c11a2c1cfeba8156bdecc4","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    exit 0"},{"line_number":40,"context_line":"fi"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"docker rmi $force $@ $KOLLA_IMAGES"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"dab17558_548055c0","line":42,"updated":"2016-05-10 08:59:50.000000000","message":"The $@ here means that all arguments passed to cleanup-images will also be passed to `docker rmi`.\n\nSo you can already do cleanup-images --force as of today.","commit_id":"0fa9a6bed65bb2a75fb65e73341488582031557f"},{"author":{"_account_id":13039,"name":"Martin André","email":"m.andre@redhat.com","username":"mandre"},"change_message_id":"a37e2f00163de804be8a2b5da13c0b85965bfe8d","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    exit 0"},{"line_number":40,"context_line":"fi"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"docker rmi $force $@ $KOLLA_IMAGES"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"dab17558_24a9167c","line":42,"in_reply_to":"dab17558_09a6abad","updated":"2016-05-10 12:11:57.000000000","message":"You can catch the -h and --help switches and print a small message about what this script does (remove kolla docker images) and explain that the script is a wrapper to \u0027docker rmi\u0027 command. Then call \u0027docker rmi --help\u0027 to show the available options.\n\nPlease do not try to re-implement each of \u0027docker rmi\u0027 options.","commit_id":"0fa9a6bed65bb2a75fb65e73341488582031557f"},{"author":{"_account_id":16233,"name":"Mauricio Lima","email":"mauriciolimab@gmail.com","username":"limamauricio"},"change_message_id":"db5228c667a155a5441dcb6898e6556e61db1f3c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    exit 0"},{"line_number":40,"context_line":"fi"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"docker rmi $force $@ $KOLLA_IMAGES"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"dab17558_09a6abad","line":42,"in_reply_to":"dab17558_548055c0","updated":"2016-05-10 11:45:31.000000000","message":"Any suggestion?","commit_id":"0fa9a6bed65bb2a75fb65e73341488582031557f"},{"author":{"_account_id":13039,"name":"Martin André","email":"m.andre@redhat.com","username":"mandre"},"change_message_id":"d2dc529f9c60d1efee73cf6e8ba88773feaf83b1","unresolved":false,"context_lines":[{"line_number":12,"context_line":"while [ \"$#\" -gt 0 ]; do"},{"line_number":13,"context_line":"    case \"$1\" in"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"    (--force|-f)"},{"line_number":16,"context_line":"            FORCE\u003d\"--force\""},{"line_number":17,"context_line":"            shift"},{"line_number":18,"context_line":"            ;;"}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"bab6814e_fba5f8a1","line":15,"updated":"2016-05-20 06:36:29.000000000","message":"Do not implement a --force option of your own.\n\nThis script is a wrapper to `docker rmi` and all args you pass to it will be passed to `docker rmi`.\n\nNo code change is necessary apart from adding a proper help message to the script.","commit_id":"7c96aec995ab666c13f35d589c9fddf6a47021f5"},{"author":{"_account_id":16233,"name":"Mauricio Lima","email":"mauriciolimab@gmail.com","username":"limamauricio"},"change_message_id":"0d195670f24cc7aa290facdcf1854f4c126eee1c","unresolved":false,"context_lines":[{"line_number":12,"context_line":"while [ \"$#\" -gt 0 ]; do"},{"line_number":13,"context_line":"    case \"$1\" in"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"    (--force|-f)"},{"line_number":16,"context_line":"            FORCE\u003d\"--force\""},{"line_number":17,"context_line":"            shift"},{"line_number":18,"context_line":"            ;;"}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"bab6814e_a3f05768","line":15,"in_reply_to":"bab6814e_c8477a75","updated":"2016-05-20 13:02:16.000000000","message":"I don\u0027t see it as a big problem, i think that the $@  can can make that bug become invalid.","commit_id":"7c96aec995ab666c13f35d589c9fddf6a47021f5"},{"author":{"_account_id":16233,"name":"Mauricio Lima","email":"mauriciolimab@gmail.com","username":"limamauricio"},"change_message_id":"30cc30c1c4a3ba2a5ebcc0bc8d938edf946f5ec0","unresolved":false,"context_lines":[{"line_number":12,"context_line":"while [ \"$#\" -gt 0 ]; do"},{"line_number":13,"context_line":"    case \"$1\" in"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"    (--force|-f)"},{"line_number":16,"context_line":"            FORCE\u003d\"--force\""},{"line_number":17,"context_line":"            shift"},{"line_number":18,"context_line":"            ;;"}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"bab6814e_c338fb3f","line":15,"in_reply_to":"bab6814e_c8477a75","updated":"2016-05-20 12:59:13.000000000","message":"I know, i haven\u0027t any doubt about it. But i think that this script should use \"--force\" directly to avoid the errors. But I also think that this ps doesn\u0027t make sense if not to add \"--force\" directly, since the $@ already fix it. The fact is the error exists and wait the script raise an error for later solve it isn\u0027t something I like.","commit_id":"7c96aec995ab666c13f35d589c9fddf6a47021f5"},{"author":{"_account_id":13039,"name":"Martin André","email":"m.andre@redhat.com","username":"mandre"},"change_message_id":"0fb73cf67abfbe79971698e0f7cd0f4cf2bd8e2d","unresolved":false,"context_lines":[{"line_number":12,"context_line":"while [ \"$#\" -gt 0 ]; do"},{"line_number":13,"context_line":"    case \"$1\" in"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"    (--force|-f)"},{"line_number":16,"context_line":"            FORCE\u003d\"--force\""},{"line_number":17,"context_line":"            shift"},{"line_number":18,"context_line":"            ;;"}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"bab6814e_c8477a75","line":15,"in_reply_to":"bab6814e_c8a81ade","updated":"2016-05-20 12:42:12.000000000","message":"I\u0027m saying that calling `cleanup-images --force` already does `docker rmi --force`. That\u0027s the purpose of $@ on line 51.  Try it by yourself.","commit_id":"7c96aec995ab666c13f35d589c9fddf6a47021f5"},{"author":{"_account_id":16233,"name":"Mauricio Lima","email":"mauriciolimab@gmail.com","username":"limamauricio"},"change_message_id":"bc893cc0ca79d081f3e3486c58962b67dfe673fa","unresolved":false,"context_lines":[{"line_number":12,"context_line":"while [ \"$#\" -gt 0 ]; do"},{"line_number":13,"context_line":"    case \"$1\" in"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"    (--force|-f)"},{"line_number":16,"context_line":"            FORCE\u003d\"--force\""},{"line_number":17,"context_line":"            shift"},{"line_number":18,"context_line":"            ;;"}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"bab6814e_c8a81ade","line":15,"in_reply_to":"bab6814e_fba5f8a1","updated":"2016-05-20 12:24:15.000000000","message":"I prefer add \"--force\" directly on docker rmi to resolve this error. The command $(docker images -a --filter \"label\u003dkolla_version\" --format \"{{.ID}}\") will ensure that this script will remove only kolla images.","commit_id":"7c96aec995ab666c13f35d589c9fddf6a47021f5"}]}
