[oe-commits] [openembedded-core] branch master-next updated: qemurunner.py: add try/except for pid handling race

git at git.openembedded.org git at git.openembedded.org
Fri Feb 7 13:54:38 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

The following commit(s) were added to refs/heads/master-next by this push:
     new ae07f69  qemurunner.py: add try/except for pid handling race
ae07f69 is described below

commit ae07f694e490302a4c2b20fa0f1c6d91cba61be8
Author: Trevor Gamblin <trevor.gamblin at windriver.com>
AuthorDate: Fri Feb 7 08:46:52 2020 -0500

    qemurunner.py: add try/except for pid handling race
    
    In some instances, attempts to remove the qemu pidfile within the
    stop() method fail despite the os.path.exists() call immediately
    before implying that the file is present. Add a try/except block
    to log a warning if this occurs, rather than failing outright,
    since the process simply appears to be exiting at an inconvenient
    time.
    
    [YOCTO #13675]
    
    Signed-off-by: Trevor Gamblin <trevor.gamblin at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/utils/qemurunner.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 2cada35..4704422 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -406,7 +406,10 @@ class QemuRunner:
         self.qemupid = None
         self.ip = None
         if os.path.exists(self.qemu_pidfile):
-            os.remove(self.qemu_pidfile)
+            try:
+                os.remove(self.qemu_pidfile)
+            except FileNotFoundError as e:
+                self.logger.warning('qemu pidfile is no longer present')
         if self.monitorpipe:
             self.monitorpipe.close()
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list