~billy-olsen/+junk/virt-maas-deploy

« back to all changes in this revision

Viewing changes to vmaas/templates/config-maas.sh

  • Committer: Billy Olsen
  • Date: 2015-05-12 06:12:59 UTC
  • Revision ID: billy.olsen@canonical.com-20150512061259-lu5p7vzgcik9fz3u
Add setup.sh, fix a bug in the script, update deployment bundle

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
    
51
51
 
52
52
{% for iface in node_group_ifaces %}
53
 
maas maas node-group-interface update $node_group_uuid {{iface.dev}} \
54
 
    ip={{iface.ip}} interface={{iface.dev}} management=2 subnet_mask={{iface.subnet_mask}} \
55
 
    broadcast_ip={{iface.broadcast_ip}} router_ip={{iface.router_ip}} \
56
 
    ip_range_low={{iface.dynamic_range.low}} \
57
 
    ip_range_high={{iface.dynamic_range.high}} \
58
 
    static_ip_range_low={{iface.static_range.low}} \
59
 
    static_ip_range_high={{iface.static_range.high}}
 
53
attempts=0
 
54
rc=1
 
55
while [ $rc -ne 0 ] && [ $attempts -le 10 ]
 
56
do
 
57
    maas maas node-group-interface update $node_group_uuid {{iface.device}} \
 
58
        ip={{iface.ip}} interface={{iface.device}} management=2 subnet_mask={{iface.subnet_mask}} \
 
59
        broadcast_ip={{iface.broadcast_ip}} router_ip={{iface.router_ip}} \
 
60
        ip_range_low={{iface.dynamic_range.low}} \
 
61
        ip_range_high={{iface.dynamic_range.high}} \
 
62
        static_ip_range_low={{iface.static_range.low}} \
 
63
        static_ip_range_high={{iface.static_range.high}}
 
64
    rc=$?
 
65
    attempts=$((attempts+1))
 
66
    sleep 2
 
67
done
60
68
{% endfor %}
61
69
 
62
70