Comment 8 for bug 1679301

Revision history for this message
Javier Castillo (javcasalc) wrote :

Hi, this bugs still afects swarm clusters (Ocata and Master trunks)

for example:

 - https://github.com/openstack/magnum/blob/master/magnum/drivers/common/templates/swarm/fragments/network-config-service.sh#L50

 - https://github.com/openstack/magnum/blob/master/magnum/drivers/common/templates/swarm/fragments/network-config-service.sh#L57

I think this should be something similar to:

if [ -z "$FLANNEL_ETCD_ENDPOINTS" ] || [ -z "$FLANNEL_ETCD_PREFIX" ]; then
  echo "ERROR: missing required configuration" >&2
  exit 1
fi
echo "creating flanneld config in etcd"
while ! curl -sf -L $ETCD_CURL_OPTIONS \
        $FLANNEL_ETCD_ENDPOINTS/v2/keys${FLANNEL_ETCD_PREFIX}/config \
        -X PUT --data-urlencode value@${FLANNEL_JSON}; do
    echo "waiting for etcd"
    sleep 1
done