mirror of
https://github.com/zulip/zulip.git
synced 2026-06-12 21:00:58 +08:00
If `zulip-puppet-apply` is run during an upgrade, it will immediately
try to re-`stop-server` before running migrations; if the last step in
the puppet application was to restart `supervisor`, it may not be
listening on its UNIX socket yet. In such cases, `socket.connect()`
throws a `FileNotFoundError`:
```
Traceback (most recent call last):
File "./scripts/stop-server", line 53, in <module>
services = list_supervisor_processes(services, only_running=True)
File "./scripts/lib/supervisor.py", line 34, in list_supervisor_processes
processes = rpc().supervisor.getAllProcessInfo()
File "/usr/lib/python3.9/xmlrpc/client.py", line 1116, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python3.9/xmlrpc/client.py", line 1456, in __request
response = self.__transport.request(
File "/usr/lib/python3.9/xmlrpc/client.py", line 1160, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python3.9/xmlrpc/client.py", line 1172, in single_request
http_conn = self.send_request(host, handler, request_body, verbose)
File "/usr/lib/python3.9/xmlrpc/client.py", line 1285, in send_request
self.send_content(connection, request_body)
File "/usr/lib/python3.9/xmlrpc/client.py", line 1315, in send_content
connection.endheaders(request_body)
File "/usr/lib/python3.9/http/client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.9/http/client.py", line 1010, in _send_output
self.send(msg)
File "/usr/lib/python3.9/http/client.py", line 950, in send
self.connect()
File "./scripts/lib/supervisor.py", line 10, in connect
self.sock.connect(self.host)
FileNotFoundError: [Errno 2] No such file or directory
```
Catch the `FileNotFoundError` and retry twice more, with backoff. If
it fails repeatedly, point to `service supervisor status` for further
debugging, as `FileNotFoundError` is rather misleading -- the file
exists, it simply is not accepting connections.
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| build-pgroonga | ||
| check_rabbitmq_queue.py | ||
| check-database-compatibility | ||
| clean_emoji_cache.py | ||
| clean_node_cache.py | ||
| clean_unused_caches.py | ||
| clean_venv_cache.py | ||
| create-production-venv | ||
| email-mirror-postfix | ||
| fix-standalone-certbot | ||
| hash_reqs.py | ||
| install | ||
| install-node | ||
| node_cache.py | ||
| puppet_cache.py | ||
| pythonrc.py | ||
| queue_workers.py | ||
| setup_path.py | ||
| setup_venv.py | ||
| setup-apt-repo | ||
| setup-yum-repo | ||
| sharding.py | ||
| supervisor.py | ||
| unpack-zulip | ||
| update-git-upstream | ||
| upgrade-zulip | ||
| upgrade-zulip-from-git | ||
| upgrade-zulip-stage-2 | ||
| warn-rabbitmq-nodename-change | ||
| zulip_tools.py | ||