)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"805d3a333d7cf502b59e05e545852ac93429f409","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Annie Lezil \u003cannie.lezil@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-01-12 10:23:17 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Reboot and Poweroff fails with coreos IPA image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"SYSRQ commands are used to forcefully reboot or poweroff the coreos"},{"line_number":10,"context_line":"image."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"7a3c09a3_5193b6fa","line":7,"updated":"2017-01-12 21:24:10.000000000","message":"maybe:\nCommands reboor and poweroff fail with...?\n\nAlso - more info in the commit message would be awesome!","commit_id":"a84e687b9d97fbc0fa3a5383f300adbc8a5d4a7b"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"60d90e7b1d977da0019259e3315d5f1ec66df507","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Annie Lezil \u003cannie.lezil@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-01-12 10:23:17 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Reboot and Poweroff fails with coreos IPA image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"SYSRQ commands are used to forcefully reboot or poweroff the coreos"},{"line_number":10,"context_line":"image."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"7a3c09a3_115e8e45","line":7,"in_reply_to":"7a3c09a3_5193b6fa","updated":"2017-01-12 21:30:10.000000000","message":"Yes more info in the commit message please.","commit_id":"a84e687b9d97fbc0fa3a5383f300adbc8a5d4a7b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"b4615996be5f5b17fddd2f59fc46ab65a35e133b","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The coreOS IPA images does not poweroff/reboot in systemctl versions."},{"line_number":10,"context_line":"SYSRQ commands are used to forcefully reboot or poweroff the coreos"},{"line_number":11,"context_line":"image."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I75d68b6308beba299d043e43a5fa1671b6ef3ada"},{"line_number":14,"context_line":"Closes-Bug: #1628367"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"5a3905b3_b36d8e06","line":11,"updated":"2017-01-19 19:52:49.000000000","message":"Might be worth also indicating that this is in part because IPA runs in a chroot on coreos?","commit_id":"370172999607c2273185b98e95d69bf05fe6ddfe"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"959d8efb6743db4d7b18dea348e6ae6cc52ed6f4","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The coreOS IPA images does not poweroff/reboot in systemctl versions."},{"line_number":10,"context_line":"SYSRQ commands are used to forcefully reboot or poweroff the coreos"},{"line_number":11,"context_line":"image."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I75d68b6308beba299d043e43a5fa1671b6ef3ada"},{"line_number":14,"context_line":"Closes-Bug: #1628367"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"5a3905b3_5218db84","line":11,"in_reply_to":"5a3905b3_b36d8e06","updated":"2017-01-19 23:43:28.000000000","message":"Done","commit_id":"370172999607c2273185b98e95d69bf05fe6ddfe"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"c809660b8f470a89af43fe08511f9605149ac41a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Reboot and Poweroff fails with coreos IPA image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The coreOS IPA images does not poweroff/reboot in systemctl versions."},{"line_number":10,"context_line":"SYSRQ commands are used to forcefully reboot or poweroff the coreOS"},{"line_number":11,"context_line":"image. This occurs because IPA runs in a chroot on coreOS"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"5a3905b3_1de2b19f","line":9,"updated":"2017-01-20 19:17:42.000000000","message":"I\u0027m not sure what \u0027systemctl versions\u0027 means here, don\u0027t all versions of the CoreOS image use systemctl?","commit_id":"1df8f9fab70cf899310d2597aeef51d742022fea"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"7114989b7746c98bd9e90d5d73ea399444c0606d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Reboot and Poweroff fails with coreos IPA image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The coreOS IPA images does not poweroff/reboot in systemctl versions."},{"line_number":10,"context_line":"SYSRQ commands are used to forcefully reboot or poweroff the coreOS"},{"line_number":11,"context_line":"image. This occurs because IPA runs in a chroot on coreOS"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"5a3905b3_3dbdad68","line":9,"in_reply_to":"5a3905b3_1de2b19f","updated":"2017-01-20 19:21:02.000000000","message":"maybe \"The CoreOS IPA images do not support poweroff/reboot due to running in a chroot. For this case, we fall back to forcing poweroff or reboot via sysrq commands.\" would be clearer?","commit_id":"1df8f9fab70cf899310d2597aeef51d742022fea"}],"ironic_python_agent/extensions/standby.py":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"52f39e93f4d1bfd6d38a2d92ebef1dd33bce53d0","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                LOG.debug(\u0027Reboot and poweroff does not work\u0027)"},{"line_number":506,"context_line":"                if command \u003d\u003d \u0027poweroff\u0027:"},{"line_number":507,"context_line":"                    LOG.debug(\u0027Reboot trigger\u0027)"},{"line_number":508,"context_line":"                    utils.execute(\u0027echo \"o\" \u003e /proc/sysrq-trigger\u0027)"},{"line_number":509,"context_line":"                    LOG.debug(\u0027Reboot trigger success\u0027)"},{"line_number":510,"context_line":"                elif command \u003d\u003d \u0027reboot\u0027:"},{"line_number":511,"context_line":"                    utils.execute(\u0027echo \"b\" \u003e /proc/sysrq-trigger\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba5201f7_8b129055","line":508,"updated":"2017-01-05 23:52:36.000000000","message":"lets try this:\n\nutils.execute(\"echo o \u003e /proc/sysrq-trigger\", shell\u003dTrue)","commit_id":"64c62c1fffba6cacc300909e76cb563be72a1099"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4d7575d1e262035a46f5db816c358bb9030aadfc","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            LOG.warning(\u0027Failed to sync file system buffers: % s\u0027, e)"},{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            _, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"            LOG.debug(\u0027stderr \"%s\"\u0027, stderr)"},{"line_number":504,"context_line":"            if \u0027ignoring request.\u0027 in stderr:"},{"line_number":505,"context_line":"                if command \u003d\u003d \u0027poweroff\u0027:"},{"line_number":506,"context_line":"                    utils.execute(\"echo o \u003e /proc/sysrq-trigger\", shell\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a57fde8_5e93b9fa","line":503,"range":{"start_line":503,"start_character":12,"end_line":503,"end_character":44},"updated":"2017-01-12 10:10:43.000000000","message":"We need a more meaningful message for this, otherwise, when looks at the log people won\u0027t know from where/which command this \"stderr\" message is about.","commit_id":"4b21b340140f3f56a5b2c00ebd3672d213b11734"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"10db50762fe611393016af75ff198456caeb48a8","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            LOG.warning(\u0027Failed to sync file system buffers: % s\u0027, e)"},{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            _, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"            LOG.debug(\u0027stderr \"%s\"\u0027, stderr)"},{"line_number":504,"context_line":"            if \u0027ignoring request.\u0027 in stderr:"},{"line_number":505,"context_line":"                if command \u003d\u003d \u0027poweroff\u0027:"},{"line_number":506,"context_line":"                    utils.execute(\"echo o \u003e /proc/sysrq-trigger\", shell\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a57fde8_94adeb33","line":503,"range":{"start_line":503,"start_character":12,"end_line":503,"end_character":44},"in_reply_to":"9a57fde8_5e93b9fa","updated":"2017-01-12 18:02:21.000000000","message":"Done","commit_id":"4b21b340140f3f56a5b2c00ebd3672d213b11734"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4d7575d1e262035a46f5db816c358bb9030aadfc","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            _, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"            LOG.debug(\u0027stderr \"%s\"\u0027, stderr)"},{"line_number":504,"context_line":"            if \u0027ignoring request.\u0027 in stderr:"},{"line_number":505,"context_line":"                if command \u003d\u003d \u0027poweroff\u0027:"},{"line_number":506,"context_line":"                    utils.execute(\"echo o \u003e /proc/sysrq-trigger\", shell\u003dTrue)"},{"line_number":507,"context_line":"                elif command \u003d\u003d \u0027reboot\u0027:"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a57fde8_9eed2191","line":504,"range":{"start_line":504,"start_character":12,"end_line":504,"end_character":45},"updated":"2017-01-12 10:10:43.000000000","message":"We need to pass \"use_standard_locale\u003dTrue\" to the execute() method otherwise this will fail depending on which locale OS is configured to use by default.","commit_id":"4b21b340140f3f56a5b2c00ebd3672d213b11734"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"10db50762fe611393016af75ff198456caeb48a8","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            _, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"            LOG.debug(\u0027stderr \"%s\"\u0027, stderr)"},{"line_number":504,"context_line":"            if \u0027ignoring request.\u0027 in stderr:"},{"line_number":505,"context_line":"                if command \u003d\u003d \u0027poweroff\u0027:"},{"line_number":506,"context_line":"                    utils.execute(\"echo o \u003e /proc/sysrq-trigger\", shell\u003dTrue)"},{"line_number":507,"context_line":"                elif command \u003d\u003d \u0027reboot\u0027:"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a57fde8_d4a7734d","line":504,"range":{"start_line":504,"start_character":12,"end_line":504,"end_character":45},"in_reply_to":"9a57fde8_9eed2191","updated":"2017-01-12 18:02:21.000000000","message":"Done","commit_id":"4b21b340140f3f56a5b2c00ebd3672d213b11734"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"524a53c76723de8c670f6a5d9bcfdc87aa12536e","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            LOG.warning(\u0027Failed to sync file system buffers: % s\u0027, e)"},{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            _, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"            LOG.debug(\u0027Poweroff/Reboot command in chroot of systemd sevices \u0027"},{"line_number":504,"context_line":"                      \u0027throws error \"%s\"\u0027, stderr)"},{"line_number":505,"context_line":"            if \u0027ignoring request.\u0027 in stderr:"},{"line_number":506,"context_line":"                if command \u003d\u003d \u0027poweroff\u0027:"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a57fde8_8f9316a3","line":503,"updated":"2017-01-12 18:08:48.000000000","message":"This isn\u0027t exactly accurate. it may not always be running under a chroot or systemd (think: the tinyipa case).\n\nWhy not move this under the if statement, and make it more like:\n\n\"Poweroff/Reboot command failed with error %s, falling back to sysrq-trigger reboot\" or something more along those lines?","commit_id":"b8d31e9d39927c70ade9de53437e70080c5667d1"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"db314457eb300173cf40cd6848624560774a89e6","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            LOG.warning(\u0027Failed to sync file system buffers: % s\u0027, e)"},{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            _, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"            LOG.debug(\u0027Poweroff/Reboot command in chroot of systemd sevices \u0027"},{"line_number":504,"context_line":"                      \u0027throws error \"%s\"\u0027, stderr)"},{"line_number":505,"context_line":"            if \u0027ignoring request.\u0027 in stderr:"},{"line_number":506,"context_line":"                if command \u003d\u003d \u0027poweroff\u0027:"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a57fde8_8b81494d","line":503,"in_reply_to":"9a57fde8_8f9316a3","updated":"2017-01-12 18:25:48.000000000","message":"Done","commit_id":"b8d31e9d39927c70ade9de53437e70080c5667d1"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"37fc329e64dedbfadf04b1a4d16789da94ef64ff","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            _, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"            if \u0027ignoring request.\u0027 in stderr:"},{"line_number":504,"context_line":"                LOG.debug(\u0027Poweroff/Reboot command failed with error %s, \u0027"},{"line_number":505,"context_line":"                          \u0027falling back to sysrq-trigger poweroff/reboot\u0027,"},{"line_number":506,"context_line":"                          stderr)"},{"line_number":507,"context_line":"                if command \u003d\u003d \u0027poweroff\u0027:"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a3c09a3_b12f7af5","line":504,"range":{"start_line":504,"start_character":27,"end_line":504,"end_character":42},"updated":"2017-01-12 21:20:14.000000000","message":"nit: since the original command is poweroff or shutdown, I\u0027d change this to lower case in the debug message.","commit_id":"a84e687b9d97fbc0fa3a5383f300adbc8a5d4a7b"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"805d3a333d7cf502b59e05e545852ac93429f409","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            _, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"            if \u0027ignoring request.\u0027 in stderr:"},{"line_number":504,"context_line":"                LOG.debug(\u0027Poweroff/Reboot command failed with error %s, \u0027"},{"line_number":505,"context_line":"                          \u0027falling back to sysrq-trigger poweroff/reboot\u0027,"},{"line_number":506,"context_line":"                          stderr)"},{"line_number":507,"context_line":"                if command \u003d\u003d \u0027poweroff\u0027:"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a3c09a3_b1f21a6e","line":504,"range":{"start_line":504,"start_character":27,"end_line":504,"end_character":42},"in_reply_to":"7a3c09a3_b12f7af5","updated":"2017-01-12 21:24:10.000000000","message":"As we already know what the command is, and it can be only either poweroff or reboot, I think it can be %s set to command","commit_id":"a84e687b9d97fbc0fa3a5383f300adbc8a5d4a7b"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"0e9095a8ccfb923d4fe5bc5804725b276629eeee","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            _, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"            if \u0027ignoring request.\u0027 in stderr:"},{"line_number":504,"context_line":"                LOG.debug(\u0027Poweroff/Reboot command failed with error %s, \u0027"},{"line_number":505,"context_line":"                          \u0027falling back to sysrq-trigger poweroff/reboot\u0027,"},{"line_number":506,"context_line":"                          stderr)"},{"line_number":507,"context_line":"                if command \u003d\u003d \u0027poweroff\u0027:"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a3c09a3_91ed1e91","line":504,"range":{"start_line":504,"start_character":27,"end_line":504,"end_character":42},"in_reply_to":"7a3c09a3_b12f7af5","updated":"2017-01-12 21:23:00.000000000","message":"Or actually we could just sub in the proper command here.","commit_id":"a84e687b9d97fbc0fa3a5383f300adbc8a5d4a7b"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"1a771e1d49a6953f70372dd44abe3a7844b73006","unresolved":false,"context_lines":[{"line_number":499,"context_line":"        except errors.CommandExecutionError as e:"},{"line_number":500,"context_line":"            LOG.warning(\u0027Failed to sync file system buffers: % s\u0027, e)"},{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            _, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"            if \u0027ignoring request.\u0027 in stderr:"},{"line_number":504,"context_line":"                LOG.debug(\u0027%s command failed with error %s, \u0027"},{"line_number":505,"context_line":"                          \u0027falling back to sysrq-trigger.\u0027, command, stderr)"}],"source_content_type":"text/x-python","patch_set":20,"id":"5a3905b3_6fcb5773","line":502,"updated":"2017-01-19 10:49:04.000000000","message":"If we are going test the output message we need to pass the \"use_standard_locale\u003dTrue\" to the execute() method. Otherwise if running on a host with a non-english locale the \u0027ignoring request.\u0027 message might be translated and this code will fail.","commit_id":"c47bd9a1717f367ba7820ac32b35aba197a0506d"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"bf6355978786da0f22c67b806bdd011986257241","unresolved":false,"context_lines":[{"line_number":499,"context_line":"        except errors.CommandExecutionError as e:"},{"line_number":500,"context_line":"            LOG.warning(\u0027Failed to sync file system buffers: % s\u0027, e)"},{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            _, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"            if \u0027ignoring request.\u0027 in stderr:"},{"line_number":504,"context_line":"                LOG.debug(\u0027%s command failed with error %s, \u0027"},{"line_number":505,"context_line":"                          \u0027falling back to sysrq-trigger.\u0027, command, stderr)"}],"source_content_type":"text/x-python","patch_set":20,"id":"5a3905b3_724f9792","line":502,"in_reply_to":"5a3905b3_6fcb5773","updated":"2017-01-19 23:42:00.000000000","message":"Done","commit_id":"c47bd9a1717f367ba7820ac32b35aba197a0506d"}],"ironic_python_agent/tests/unit/extensions/test_standby.py":[{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"805d3a333d7cf502b59e05e545852ac93429f409","unresolved":false,"context_lines":[{"line_number":683,"context_line":"        execute_mock.assert_has_calls(calls)"},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":686,"context_line":"    def test_run_shutdown_command_valid_poweroff_sysrq(self, execute_mock):"},{"line_number":687,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027, \u0027\u0027)"},{"line_number":688,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027,"},{"line_number":689,"context_line":"                                     \u0027Running in chroot, ignoring request.\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a3c09a3_11020e3f","line":686,"updated":"2017-01-12 21:24:10.000000000","message":"I\u0027d like to see another test that will check negative cases","commit_id":"a84e687b9d97fbc0fa3a5383f300adbc8a5d4a7b"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c19080241af04b70dad4563c6c066db835bf6fb1","unresolved":false,"context_lines":[{"line_number":684,"context_line":""},{"line_number":685,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":686,"context_line":"    def test_run_shutdown_command_valid_poweroff_sysrq(self, execute_mock):"},{"line_number":687,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027, \u0027\u0027)"},{"line_number":688,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027,"},{"line_number":689,"context_line":"                                     \u0027Running in chroot, ignoring request.\u0027)"},{"line_number":690,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7a3c09a3_71efd2b0","line":687,"updated":"2017-01-12 21:17:39.000000000","message":"Why are there two lines here setting the same value?","commit_id":"a84e687b9d97fbc0fa3a5383f300adbc8a5d4a7b"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2579e214b922d4b03e5cdf4d41f3dda4c459b877","unresolved":false,"context_lines":[{"line_number":684,"context_line":""},{"line_number":685,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":686,"context_line":"    def test_run_shutdown_command_valid_poweroff_sysrq(self, execute_mock):"},{"line_number":687,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027, \u0027\u0027)"},{"line_number":688,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027,"},{"line_number":689,"context_line":"                                     \u0027Running in chroot, ignoring request.\u0027)"},{"line_number":690,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7a3c09a3_717432fd","line":687,"in_reply_to":"7a3c09a3_71efd2b0","updated":"2017-01-12 21:20:53.000000000","message":"+1, shouldn\u0027t be here","commit_id":"a84e687b9d97fbc0fa3a5383f300adbc8a5d4a7b"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"e08af1a3b2c353fe0433996e3c9644f4d1424ff4","unresolved":false,"context_lines":[{"line_number":684,"context_line":""},{"line_number":685,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":686,"context_line":"    def test_run_shutdown_command_valid_poweroff_sysrq(self, execute_mock):"},{"line_number":687,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027, \u0027\u0027)"},{"line_number":688,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027,"},{"line_number":689,"context_line":"                                     \u0027Running in chroot, ignoring request.\u0027)"},{"line_number":690,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7a3c09a3_9178befa","line":687,"in_reply_to":"7a3c09a3_71efd2b0","updated":"2017-01-12 21:19:29.000000000","message":"Nice catch, this should be removed +1","commit_id":"a84e687b9d97fbc0fa3a5383f300adbc8a5d4a7b"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"e08af1a3b2c353fe0433996e3c9644f4d1424ff4","unresolved":false,"context_lines":[{"line_number":697,"context_line":""},{"line_number":698,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":699,"context_line":"    def test_run_shutdown_command_valid_reboot_sysrq(self, execute_mock):"},{"line_number":700,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027, \u0027\u0027)"},{"line_number":701,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027,"},{"line_number":702,"context_line":"                                     \u0027Running in chroot, ignoring request.\u0027)"},{"line_number":703,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7a3c09a3_d18246c8","line":700,"updated":"2017-01-12 21:19:29.000000000","message":"same","commit_id":"a84e687b9d97fbc0fa3a5383f300adbc8a5d4a7b"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"c809660b8f470a89af43fe08511f9605149ac41a","unresolved":false,"context_lines":[{"line_number":686,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":687,"context_line":"    def test_run_shutdown_command_valid_poweroff_sysrq(self, execute_mock):"},{"line_number":688,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027,"},{"line_number":689,"context_line":"                                     \u0027Running in chroot, ignoring request.\u0027)"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"        self.agent_extension._run_shutdown_command(\u0027poweroff\u0027)"},{"line_number":692,"context_line":"        calls \u003d [mock.call(\u0027sync\u0027),"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_7d5bb587","line":689,"updated":"2017-01-20 19:17:42.000000000","message":"I know this works as is, but I\u0027d almost prefer to be explicit and give execute_mock.side_effect a list of return values, if we\u0027re spinning a new patch.","commit_id":"1df8f9fab70cf899310d2597aeef51d742022fea"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"c9fc42ea072d718f47f9ee1296d1f48733999864","unresolved":false,"context_lines":[{"line_number":686,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":687,"context_line":"    def test_run_shutdown_command_valid_poweroff_sysrq(self, execute_mock):"},{"line_number":688,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027,"},{"line_number":689,"context_line":"                                     \u0027Running in chroot, ignoring request.\u0027)"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"        self.agent_extension._run_shutdown_command(\u0027poweroff\u0027)"},{"line_number":692,"context_line":"        calls \u003d [mock.call(\u0027sync\u0027),"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_606ea502","line":689,"in_reply_to":"5a3905b3_4b09cfdc","updated":"2017-01-20 21:44:48.000000000","message":"Copying this from IRC in case you missed it:\n\n20:00:49 \u003cJayF\u003e soliosg: so basically if you want a mock to return a different value each time it\u0027s called, you can use mock_object.side_effect \u003d [], where the array is taken as the return codes in order, i.e. [0] is the return value first time it\u0027s called, [1] is the return value the second time, and so on","commit_id":"1df8f9fab70cf899310d2597aeef51d742022fea"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"9a4b5fd5006ae6a687f59850b007c58fc31df407","unresolved":false,"context_lines":[{"line_number":686,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":687,"context_line":"    def test_run_shutdown_command_valid_poweroff_sysrq(self, execute_mock):"},{"line_number":688,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027,"},{"line_number":689,"context_line":"                                     \u0027Running in chroot, ignoring request.\u0027)"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"        self.agent_extension._run_shutdown_command(\u0027poweroff\u0027)"},{"line_number":692,"context_line":"        calls \u003d [mock.call(\u0027sync\u0027),"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_4b09cfdc","line":689,"in_reply_to":"5a3905b3_7d5bb587","updated":"2017-01-20 19:50:53.000000000","message":"Disclaimer: I\u0027m new to mock :). What would be the side effect when utils.execute(command, ...) doesn\u0027t raise ProcessExecutionError exception?\n\nhttps://review.openstack.org/#/c/412594/22/ironic_python_agent/extensions/standby.py@502","commit_id":"1df8f9fab70cf899310d2597aeef51d742022fea"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"de24a4b08ec81dce28ea8c29b367b6ddfc39f339","unresolved":false,"context_lines":[{"line_number":686,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":687,"context_line":"    def test_run_shutdown_command_valid_poweroff_sysrq(self, execute_mock):"},{"line_number":688,"context_line":"        execute_mock.side_effect \u003d [(\u0027\u0027, \u0027\u0027), (\u0027\u0027,"},{"line_number":689,"context_line":"                                    \u0027Running in chroot, ignoring request.\u0027),"},{"line_number":690,"context_line":"                                    (\u0027\u0027, \u0027\u0027)]"},{"line_number":691,"context_line":""},{"line_number":692,"context_line":"        self.agent_extension._run_shutdown_command(\u0027poweroff\u0027)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5a3905b3_a3fa57bb","line":689,"updated":"2017-01-20 21:59:43.000000000","message":"style nit: I\u0027d put each group of () on its own line.","commit_id":"20dc04e5e2b23f888ff79a3873d35fd4c170c8d8"}],"releasenotes/notes/coreos_ipa_image_poweroff_reboot_in_chroot_by_sysrq-42447fc4cdd7dafe.yaml":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"c809660b8f470a89af43fe08511f9605149ac41a","unresolved":false,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - The coreOS IPA images could now poweroff/reboot in systemctl versions (IPA"},{"line_number":4,"context_line":"    runs in chroot on coreos). SYSRQ commands are used to forcefully reboot or"},{"line_number":5,"context_line":"    poweroff the coreOS IPA image."}],"source_content_type":"text/x-yaml","patch_set":22,"id":"5a3905b3_1dc1d12e","line":5,"updated":"2017-01-20 19:17:42.000000000","message":"This has some typos and reads a bit odd. How about:\n\nFixes a bug in the CoreOS IPA images (where IPA runs in a chroot), where IPA could not power off or reboot properly. In this case, it will now use SYSRQ commands to forcefully reboot or power off.","commit_id":"1df8f9fab70cf899310d2597aeef51d742022fea"}]}
