I created a bay today and it threw an error in etcd on the m8s master:
Sep 01 22:32:37 k8-hkkfgoddp4-0-ku73jhlbrqbs-kube-master-zcnp3icurtsp.novalocal systemd[1]: Started Etcd Server.
Sep 01 22:32:37 k8-hkkfgoddp4-0-ku73jhlbrqbs-kube-master-zcnp3icurtsp.novalocal etcd[2120]: 2015/09/01 22:32:37 etcd: listening for peers on http://10.0.0.5:2380
Sep 01 22:32:37 k8-hkkfgoddp4-0-ku73jhlbrqbs-kube-master-zcnp3icurtsp.novalocal etcd[2120]: 2015/09/01 22:32:37 etcd: listening for client requests on http://0.0.0.0:2379
Sep 01 22:32:37 k8-hkkfgoddp4-0-ku73jhlbrqbs-kube-master-zcnp3icurtsp.novalocal etcd[2120]: 2015/09/01 22:32:37 etcdserver: datadir is valid for the 2.0.1 format
Sep 01 22:32:37 k8-hkkfgoddp4-0-ku73jhlbrqbs-kube-master-zcnp3icurtsp.novalocal etcd[2120]: 2015/09/01 22:32:37 etcd: stopping listening for client requests on http://0.0.0.0:2379
Sep 01 22:32:37 k8-hkkfgoddp4-0-ku73jhlbrqbs-kube-master-zcnp3icurtsp.novalocal etcd[2120]: 2015/09/01 22:32:37 etcd: stopping listening for peers on http://10.0.0.5:2380
Sep 01 22:32:37 k8-hkkfgoddp4-0-ku73jhlbrqbs-kube-master-zcnp3icurtsp.novalocal etcd[2120]: 2015/09/01 22:32:37 etcd: 10.0.0.5 has different advertised URLs in the cluster and advertised peer URLs list
Sep 01 22:32:37 k8-hkkfgoddp4-0-ku73jhlbrqbs-kube-master-zcnp3icurtsp.novalocal systemd[1]: etcd.service: main process exited, code=exited, status=1/FAILURE
Sep 01 22:32:37 k8-hkkfgoddp4-0-ku73jhlbrqbs-kube-master-zcnp3icurtsp.novalocal systemd[1]: Unit etcd.service entered failed state.
Sep 01 22:32:37 k8-hkkfgoddp4-0-ku73jhlbrqbs-kube-master-zcnp3icurtsp.novalocal systemd[1]: etcd.service failed.
The conf file showed the ETCD_DISCOVERY url to be empty:
[minion@k8-hkkfgoddp4-0-ku73jhlbrqbs-kube-master-zcnp3icurtsp ~]$ cat /etc/etcd/etcd.conf
ETCD_NAME="10.0.0.5"
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379"
ETCD_LISTEN_PEER_URLS="http://10.0.0.5:2380"
ETCD_ADVERTISE_CLIENT_URLS="http://10.0.0.5:2379"
ETCD_INITIAL_ADVERTISE_PEER_URLS="http://10.0.0.5:2380"
ETCD_DISCOVERY=""
This was also seen in magnum bay-show and the debug logs ("discovery_url": "")
In magnum/conductor/template_definition.py:375 there is a check for this. If the discovery_url attribute does not exist OR the attribute is empty further processing is done to get the URL via requests.get(discovery_endpoint).text. However, if that fails and returns an empty string no further checking or retrying is performed.
This call should fail explicitly if the URL is empty (possibly after retrying), so as to not create a bay without a discovery_url.
Fix proposed to branch: master /review. openstack. org/219786
Review: https:/