Thomas Vachuska
Committed by Gerrit Code Review

Added support for bits proxy, where ONOS bits can survive borrow/return cycles.

Change-Id: I0ab9bac26bd88a246925750d26baaab228a37136
...@@ -14,7 +14,7 @@ shift ...@@ -14,7 +14,7 @@ shift
14 echo "Pushing to proxy $node..." 14 echo "Pushing to proxy $node..."
15 onos-push-bits $node 15 onos-push-bits $node
16 16
17 -others=$(env | sort | egrep "OC[0-9]+" | cut -d= -f2 | grep -v $OCT) 17 +others=$(env | sort | egrep "OC[0-9]+" | cut -d= -f2 | grep -vE "^$OCT\$")
18 18
19 for other in $others; do 19 for other in $others; do
20 echo "Pushing to $other..." 20 echo "Pushing to $other..."
......
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
8 8
9 -for node in $OCN $(env | sort | egrep "OC[0-9]+" | cut -d= -f2); do 9 +for node in $OCT $OCN $(env | sort | egrep "OC[0-9]+" | cut -d= -f2); do
10 printf "%s: " $node; ssh -n -o StrictHostKeyChecking=no -o PasswordAuthentication=no $ONOS_USER@$node hostname 10 printf "%s: " $node; ssh -n -o StrictHostKeyChecking=no -o PasswordAuthentication=no $ONOS_USER@$node hostname
11 done 11 done
......
...@@ -24,5 +24,7 @@ ...@@ -24,5 +24,7 @@
24 <step name="Check-Passwordless-Login-${#}" 24 <step name="Check-Passwordless-Login-${#}"
25 exec="ssh -n -o ConnectTimeout=3 -o PasswordAuthentication=no ${ONOS_USER}@${OC#} date"/> 25 exec="ssh -n -o ConnectTimeout=3 -o PasswordAuthentication=no ${ONOS_USER}@${OC#} date"/>
26 </parallel> 26 </parallel>
27 + <step name="Check-Passwordless-Login-Proxy" if="${OCT}"
28 + exec="ssh -n -o ConnectTimeout=3 -o PasswordAuthentication=no ${ONOS_USER}@${OCT} date"/>
27 </group> 29 </group>
28 </scenario> 30 </scenario>
......
...@@ -11,6 +11,6 @@ sudo lxc-ls -F "name,ipv4" --fancy | grep $name | \ ...@@ -11,6 +11,6 @@ sudo lxc-ls -F "name,ipv4" --fancy | grep $name | \
11 sed "s/^$name-/OC/" | tr "[:lower:]" "[:upper:]" | \ 11 sed "s/^$name-/OC/" | tr "[:lower:]" "[:upper:]" | \
12 sed -r 's/[ ]+/\=/;s/^/export /' 12 sed -r 's/[ ]+/\=/;s/^/export /'
13 13
14 -echo "export OCT=\"\$OC1\"" 14 +echo "export OCT=\"10.128.11.1\""
15 echo "export ONOS_USE_SSH=true" 15 echo "export ONOS_USE_SSH=true"
16 echo "export ONOS_APPS=${apps}" 16 echo "export ONOS_APPS=${apps}"
......
...@@ -26,4 +26,3 @@ sudo lxc-start -d -n $name ...@@ -26,4 +26,3 @@ sudo lxc-start -d -n $name
26 sudo lxc-attach -n $name -- ping -c1 8.8.8.8 26 sudo lxc-attach -n $name -- ping -c1 8.8.8.8
27 sudo lxc-attach -n $name -- bash -c "echo $key >> /home/sdn/.ssh/authorized_keys" 27 sudo lxc-attach -n $name -- bash -c "echo $key >> /home/sdn/.ssh/authorized_keys"
28 sudo lxc-attach -n $name -- bash -c "sed -i \"s/127.0.1.1.*/127.0.1.1 $name/\" /etc/hosts" 28 sudo lxc-attach -n $name -- bash -c "sed -i \"s/127.0.1.1.*/127.0.1.1 $name/\" /etc/hosts"
29 -sudo lxc-ls --fancy
......
...@@ -8,6 +8,8 @@ key="$@" ...@@ -8,6 +8,8 @@ key="$@"
8 8
9 cd $(dirname $0) 9 cd $(dirname $0)
10 10
11 +sudo lxc-attach -n bit-proxy -- bash -c "grep -qF \"$key\" /home/sdn/.ssh/authorized_keys || echo $key >> /home/sdn/.ssh/authorized_keys"
12 +
11 ./clone-node base-mininet ${ipx/x/0} $name-n "$key" 13 ./clone-node base-mininet ${ipx/x/0} $name-n "$key"
12 14
13 for n in {1..3}; do 15 for n in {1..3}; do
......