Invalid JSON in dynamic registration of minion

The JSON was invalid as passed via curl to dynamically register
minions.  This results in the magnum minions not being dynamically
registered.

Co-Authored-By: Andrew Melton <andrew.melton@rackspace.com>

Change-Id: Ia7fbaf10e36775ff77107afe5c384a0300b78348
Closes-bug: #1448313
Partially-Implements: blueprint python-k8sclient
changes/61/177461/3
Steven Dake 8 years ago
parent 107febd61a
commit 5b11908528
  1. 5
      magnum/templates/heat-kubernetes/fragments/configure-kubernetes-minion.sh

@ -35,6 +35,7 @@ cpu=$(expr $(nproc) \* 1000)
memory_kb=$(cat /proc/meminfo | awk '/MemTotal: /{print $2}')
memory=$(expr $memory_kb \* 1024)
curl -sf -X POST -H 'Content-Type: application/json' \
--data-binary "{'kind':'Minion','id':'$myip','apiVersion':'v1beta1',
'resources':{'capacity':{'cpu':$cpu,'memory':$memory}}}" \
--data-binary "{\"kind\":\"Minion\",\"id\":\"$myip\",\"apiVersion\":\"v1beta1\",
\"resources\":{\"capacity\":{\"cpu\":$cpu,\"memory\":$memory}}}" \
http://$KUBE_MASTER_IP:8080/api/v1beta1/minions

Loading…
Cancel
Save