Page MenuHomePhabricator

Make varnish-frontend-restart work on Beta Cluster
Open, LowPublic

Description

The script varnish-frontend-restart currently fails as follows in Beta:

root@deployment-cache-text06:~# varnish-frontend-restart 
ERROR:etcd.client:Could not discover the etcd hosts from conftool.deployment-prep.eqiad.wmflabs: None of DNS query names exist: _etcd._tcp.conftool.deployment-prep.eqiad.wmflabs., _etcd._tcp.conftool.deployment-prep.eqiad.wmflabs.deployment-prep.eqiad.wmflabs., _etcd._tcp.conftool.deployment-prep.eqiad.wmflabs.deployment-prep.eqiad1.wikimedia.cloud., _etcd._tcp.conftool.deployment-prep.eqiad.wmflabs.eqiad.wmflabs.
/usr/lib/python3/dist-packages/urllib3/connection.py:362: SubjectAltNameWarning: Certificate for deployment-etcd02.deployment-prep.eqiad1.wikimedia.cloud has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SubjectAltNameWarning
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/conftool/drivers/etcd.py", line 114, in _ls
    res = self.client.read(key, recursive=recursive)
  File "/usr/lib/python3/dist-packages/etcd/client.py", line 597, in read
    timeout=timeout)
  File "/usr/lib/python3/dist-packages/etcd/client.py", line 907, in wrapper
    return self._handle_server_response(response)
  File "/usr/lib/python3/dist-packages/etcd/client.py", line 987, in _handle_server_response
    etcd.EtcdError.handle(r)
  File "/usr/lib/python3/dist-packages/etcd/__init__.py", line 306, in handle
    raise exc(msg, payload)
etcd.EtcdKeyNotFound: Key not found : /conftool/v1/pools

Although actually depooling the service makes little sense in Beta (the node is not behind LVS), it would be good if the script could Just Work and effectively fall back to systemctl restart varnish-frontend to ensure uniformity of procedure when upgrading Varnish in Beta and in Prod.