Commit Graph

9 Commits

Author SHA1 Message Date
James E. Blair a160484a86 Add zuul-scheduler tenant-reconfigure
This is a new reconfiguration command which behaves like full-reconfigure
but only for a single tenant.  This can be useful after connection issues
with code hosting systems, or potentially with Zuul cache bugs.

Because this is the first command-socket command with an argument, some
command-socket infrastructure changes are necessary.  Additionally, this
includes some minor changes to make the services more consistent around
socket commands.

Change-Id: Ib695ab8e7ae54790a0a0e4ac04fdad96d60ee0c9
2022-02-08 14:14:17 -08:00
Jan Kubovy 45529cba28 Improve test output by using named queues
Change-Id: I2b61c1873b3434e5b94e810f73fc3cc09f580eed
2021-03-24 07:39:15 +01:00
Tobias Henkel df69892827
Ensure deletion of the command socket
The command socket class currently deletes the command socket after
joining its worker thread. Make this more safe by moving the deletion
at the end of the worker thread.

Change-Id: I5170cad933f465cd7ba0485d2add8699c20c6679
2020-04-14 11:18:10 +02:00
Paul Belanger 8f4f827ed3 Clean up command sockets on stop
This helps to avoid leaking domain sockets on the filesystem.

Change-Id: I767d66d1cee5e89e2f3c63158bc0cabfa2dd807e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-01-07 10:02:33 -05:00
Tobias Henkel 03b41eecd5 Close command socket after sending stop
After sending the stop signal to the command socket it should be
closed explicitly. Otherwise a resource warning [1] is emitted to
stderr.

[1]: Resource warning:

(...)/zuul/executor/server.py:644: ResourceWarning: unclosed <socket.socket fd=24, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, raddr=(...)/executor.socket>
  self.command_socket.stop()

Change-Id: I0e85ea9f5021e329abf825afbd8e29d134c08669
2017-09-05 11:43:51 +02:00
Monty Taylor b934c1a052
Remove use of six library
It exists only for py2/py3 compat. We do not need it any more.

This will explicitly break Zuul v3 for python2, which is different than
simply ceasing to test it and no longer declaring we support it. Since
we're not testing it any longer, it's bound to degrade overtime without
us noticing, so hopefully a clean and explicit break will prevent people
from running under python2 and it working for a minute, then breaking
later.

Change-Id: Ia16bb399a2869ab37a183f3f2197275bb3acafee
2017-06-19 10:34:57 -05:00
Clint Byrum f322fe2eee Encoding changes in tests for py3
In many cases we do need to be explicit about bytes vs. strings for
python 3 compatibility.

Change-Id: I9cbc5c73004d03f711f8a6e5752a0865ae55fb9f
2017-05-19 06:45:31 -07:00
Clint Byrum ff97edb615 fix imports in py3
Change-Id: I08ef8ec8fddf7f715a6f4b6aa8ee243cb9aad674
2017-05-19 06:39:15 -07:00
James E. Blair c4b2041cff Ansible launcher: use a socket for reconfiguration
Signals and multiprocessing don't mix well.  Instead of using
signals for things like stop and reconfiguration, use a socket
that accepts simple commands, and use the zuul-launcher
command to send them.

This implements reconfiguration and stopping.  Other commands
(eg, graceful stop, pause, etc) can be implemented later.

Change-Id: I14b1fdc5e3a20f4b1161dbc14705ad424ad13fbd
2016-06-01 11:46:52 -07:00