All of lore.kernel.org
 help / color / mirror / Atom feed
* [bitbake][dunfell][1.46][PATCH 0/2] Patch review
@ 2020-07-28 22:58 Steve Sakoman
  2020-07-28 22:58 ` [bitbake][dunfell][1.46][PATCH 1/2] server/process: Fix UI first connection tracking Steve Sakoman
  2020-07-28 22:58 ` [bitbake][dunfell][1.46][PATCH 2/2] server/process: Account for xmlrpc connections Steve Sakoman
  0 siblings, 2 replies; 3+ messages in thread
From: Steve Sakoman @ 2020-07-28 22:58 UTC (permalink / raw)
  To: bitbake-devel

These patches cherry-picked from master should fix the toaster issue.

The following changes since commit cc11dfa4eb3616547a8a3909f89da0cc4f35dc57:

  cooker: Handle multiconfig name mappings correctly (2020-07-23 16:50:51 +0100)

are available in the Git repository at:

  git://git.openembedded.org/bitbake-contrib stable/1.46-nut
  http://cgit.openembedded.org/bitbake-contrib/log/?h=stable/1.46-nut

Richard Purdie (2):
  server/process: Fix UI first connection tracking
  server/process: Account for xmlrpc connections

 lib/bb/server/process.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bitbake][dunfell][1.46][PATCH 1/2] server/process: Fix UI first connection tracking
  2020-07-28 22:58 [bitbake][dunfell][1.46][PATCH 0/2] Patch review Steve Sakoman
@ 2020-07-28 22:58 ` Steve Sakoman
  2020-07-28 22:58 ` [bitbake][dunfell][1.46][PATCH 2/2] server/process: Account for xmlrpc connections Steve Sakoman
  1 sibling, 0 replies; 3+ messages in thread
From: Steve Sakoman @ 2020-07-28 22:58 UTC (permalink / raw)
  To: bitbake-devel

From: Richard Purdie <richard.purdie@linuxfoundation.org>

We're only meant to be doing UI connection timeouts on the first connection
but haveui changes for each connection. We need to add a specific variable
to track this correctly and get the intended behaviour.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e7c387c2e2fb2cc3ca1dc9d2029362909c326d72)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 lib/bb/server/process.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 9ec79f5b..5a87f082 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -47,6 +47,7 @@ class ProcessServer(multiprocessing.Process):
         self.next_heartbeat = time.time()
 
         self.event_handle = None
+        self.hadanyui = False
         self.haveui = False
         self.maxuiwait = 30
         self.xmlrpc = False
@@ -188,6 +189,7 @@ class ProcessServer(multiprocessing.Process):
                     self.command_channel_reply = writer
 
                     self.haveui = True
+                    self.hadanyui = True
 
                 except (EOFError, OSError):
                     disconnect_client(self, fds)
@@ -200,7 +202,7 @@ class ProcessServer(multiprocessing.Process):
             # If we don't see a UI connection within maxuiwait, its unlikely we're going to see
             # one. We have had issue with processes hanging indefinitely so timing out UI-less
             # servers is useful.
-            if not self.haveui and not self.timeout and (self.lastui + self.maxuiwait) < time.time():
+            if not self.hadanyui and not self.timeout and (self.lastui + self.maxuiwait) < time.time():
                 print("No UI connection within max timeout, exiting to avoid infinite loop.")
                 self.quit = True
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bitbake][dunfell][1.46][PATCH 2/2] server/process: Account for xmlrpc connections
  2020-07-28 22:58 [bitbake][dunfell][1.46][PATCH 0/2] Patch review Steve Sakoman
  2020-07-28 22:58 ` [bitbake][dunfell][1.46][PATCH 1/2] server/process: Fix UI first connection tracking Steve Sakoman
@ 2020-07-28 22:58 ` Steve Sakoman
  1 sibling, 0 replies; 3+ messages in thread
From: Steve Sakoman @ 2020-07-28 22:58 UTC (permalink / raw)
  To: bitbake-devel

From: Richard Purdie <richard.purdie@linuxfoundation.org>

UI control can happen via the xmlrpc connection. Account for this when timing
out UI connections. This was causing issues for toaster on systems where it
couldn't parse the metadata within the timeout.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit fa85a8263971c25e67fa3b421c686a90e46acd87)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 lib/bb/server/process.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 5a87f082..b66fbe0a 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -202,7 +202,7 @@ class ProcessServer(multiprocessing.Process):
             # If we don't see a UI connection within maxuiwait, its unlikely we're going to see
             # one. We have had issue with processes hanging indefinitely so timing out UI-less
             # servers is useful.
-            if not self.hadanyui and not self.timeout and (self.lastui + self.maxuiwait) < time.time():
+            if not self.hadanyui and not self.xmlrpc and not self.timeout and (self.lastui + self.maxuiwait) < time.time():
                 print("No UI connection within max timeout, exiting to avoid infinite loop.")
                 self.quit = True
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-28 22:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 22:58 [bitbake][dunfell][1.46][PATCH 0/2] Patch review Steve Sakoman
2020-07-28 22:58 ` [bitbake][dunfell][1.46][PATCH 1/2] server/process: Fix UI first connection tracking Steve Sakoman
2020-07-28 22:58 ` [bitbake][dunfell][1.46][PATCH 2/2] server/process: Account for xmlrpc connections Steve Sakoman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.