Merge lp:~zyga/checkbox/fix-1413134 into lp:checkbox

Proposed by Zygmunt Krynicki
Status: Merged
Approved by: Maciej Kisielewski
Approved revision: 3539
Merged at revision: 3542
Proposed branch: lp:~zyga/checkbox/fix-1413134
Merge into: lp:checkbox
Diff against target: 24 lines (+6/-1)
1 file modified
providers/plainbox-provider-checkbox/bin/pm_test (+6/-1)
To merge this branch: bzr merge lp:~zyga/checkbox/fix-1413134
Reviewer Review Type Date Requested Status
Maciej Kisielewski Approve
Review via email: mp+247149@code.launchpad.net

Description of the change

04dc495 providers:checkbox: run {poweroff,reboot} in the foreground

This can be verified by running:

sudo ./providers/plainbox-provider-checkbox/bin/pm_test poweroff; echo 'FAILED' > ~/did-it-fail

And checking the contents of ~/did-it-fail after re-powering the machine.

To post a comment you must log in.
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

I've run a couple of tests to check how this change affects https://bugs.launchpad.net/plainbox/+bug/1403832
By making pm_test run comamnds serially (instead of forking) it solves the rebooting problem as well.

Revision history for this message
Maciej Kisielewski (kissiel) wrote :

+1, thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'providers/plainbox-provider-checkbox/bin/pm_test'
--- providers/plainbox-provider-checkbox/bin/pm_test 2014-12-07 22:46:56 +0000
+++ providers/plainbox-provider-checkbox/bin/pm_test 2015-01-21 14:22:07 +0000
@@ -7,6 +7,7 @@
7import shutil7import shutil
8import subprocess8import subprocess
9import sys9import sys
10import signal
1011
11from argparse import ArgumentParser, SUPPRESS12from argparse import ArgumentParser, SUPPRESS
12from calendar import timegm13from calendar import timegm
@@ -143,7 +144,11 @@
143 logging.info('Executing new {0!r} operation...'144 logging.info('Executing new {0!r} operation...'
144 .format(self.args.pm_operation))145 .format(self.args.pm_operation))
145 logging.debug('Executing: {0!r}...'.format(command_str))146 logging.debug('Executing: {0!r}...'.format(command_str))
146 subprocess.Popen(command_str, shell=True)147 # The PM operation is performed asynchronously so let's just wait
148 # indefinitely until it happens and someone comes along to kill us.
149 # This addresses LP: #1413134
150 subprocess.check_call(command_str, shell=True)
151 signal.pause()
147152
148 def summary(self):153 def summary(self):
149 """154 """

Subscribers

People subscribed via source and target branches