diff options
author | Antoine Musso <hashar@free.fr> | 2020-01-24 21:24:51 +0100 |
---|---|---|
committer | Antoine Musso <hashar@free.fr> | 2020-01-28 10:16:19 +0100 |
commit | 4aca407bd66a5f0768650dab6413ef5d041070a8 (patch) | |
tree | a7a208bfb8b407a44f6b398c5d7dbad88890b55a /zuul/cmd | |
parent | b33afa1b680b0c3df7cedf184348d080d7b12d2f (diff) | |
download | zuul-4aca407bd66a5f0768650dab6413ef5d041070a8.tar.gz |
Add client_id to RPC client
A Gearman client can set a client id which is then used on the server
side to identify the connection. Lack of a client_id makes it harder to
follow the flow when looking at logs:
gear.Connection.b'unknown' INFO Connected to 127.0.0.1 port 4730
gear.Server Accepted connection
<gear.ServerConnection ... name: None ...>
^^^^
In RPCClient, introduce a client_id argument which is passed to
gear.Client().
Update callers to set a meaningful client_id.
Change-Id: Idbd63f15b0cde3d77fe969c7650f4eb18aec1ef6
Diffstat (limited to 'zuul/cmd')
-rwxr-xr-x | zuul/cmd/client.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zuul/cmd/client.py b/zuul/cmd/client.py index 82487ff2a..6fc9128a3 100755 --- a/zuul/cmd/client.py +++ b/zuul/cmd/client.py @@ -149,7 +149,7 @@ class ZuulRESTClient(object): class Client(zuul.cmd.ZuulApp): app_name = 'zuul' - app_description = 'Zuul client.' + app_description = 'Zuul CLI client.' log = logging.getLogger("zuul.Client") def createParser(self): @@ -405,7 +405,8 @@ class Client(zuul.cmd.ZuulApp): ssl_ca = get_default(self.config, 'gearman', 'ssl_ca') client = zuul.rpcclient.RPCClient( server, port, ssl_key, - ssl_cert, ssl_ca) + ssl_cert, ssl_ca, + client_id=self.app_description) elif 'webclient' in conf_sections: self.log.debug('web section found in config, using REST client') server = get_default(self.config, 'webclient', 'url', None) |