• R/O
  • HTTP
  • SSH
  • HTTPS

Fulcon: コミット

Fulconのソース管理


コミットメタ情報

リビジョン0ce332ae21a9fbe536b2648cca357d0d31c11c00 (tree)
日時2016-04-10 15:18:29
作者niwa-hideyuki <niwa.niwa@nift...>
コミッターniwa-hideyuki

ログメッセージ

Improvement of the network function of OpenvSwitch.

変更サマリ

差分

--- a/src/Makefile
+++ b/src/Makefile
@@ -174,6 +174,7 @@ install-driver-docker : install-dockerfile
174174 install -m 755 driver/LinuxBridge/br-check $(DESTDIR)$(libdir)/fulcon/driver/LinuxBridge/br-check
175175 install -m 755 driver/LinuxBridge/br-emptylist $(DESTDIR)$(libdir)/fulcon/driver/LinuxBridge/br-emptylist
176176 install -m 755 driver/LinuxBridge/br-if-list $(DESTDIR)$(libdir)/fulcon/driver/LinuxBridge/br-if-list
177+ install -m 755 driver/LinuxBridge/br-del-all $(DESTDIR)$(libdir)/fulcon/driver/LinuxBridge/br-del-all
177178 mkdir -p $(DESTDIR)$(libdir)/fulcon/driver/OpenvSwitch
178179 install -m 755 driver/OpenvSwitch/br-addbr $(DESTDIR)$(libdir)/fulcon/driver/OpenvSwitch/br-addbr
179180 install -m 755 driver/OpenvSwitch/br-delbr $(DESTDIR)$(libdir)/fulcon/driver/OpenvSwitch/br-delbr
@@ -185,6 +186,7 @@ install-driver-docker : install-dockerfile
185186 install -m 755 driver/OpenvSwitch/br-check $(DESTDIR)$(libdir)/fulcon/driver/OpenvSwitch/br-check
186187 install -m 755 driver/OpenvSwitch/br-emptylist $(DESTDIR)$(libdir)/fulcon/driver/OpenvSwitch/br-emptylist
187188 install -m 755 driver/OpenvSwitch/br-if-list $(DESTDIR)$(libdir)/fulcon/driver/OpenvSwitch/br-if-list
189+ install -m 755 driver/OpenvSwitch/br-del-all $(DESTDIR)$(libdir)/fulcon/driver/OpenvSwitch/br-del-all
188190
189191 install-dockerfile :
190192 mkdir -p $(DESTDIR)/$(localstatedir)/lib/fulcon/driver/dockerfile
--- a/src/cmd/fulcond
+++ b/src/cmd/fulcond
@@ -3,20 +3,16 @@
33 # Copyright (C) 2016 NIWA Hideyuki
44
55 FULCONDRIVER=`fulcon driver-name`
6-PATH=/usr/lib/fulcon/driver/$FULCONDRIVER:/usr/lib/fulcon/lib:$PATH
6+BRIDGEDRIVER=`fulcon bridge-name`
7+PATH=/usr/lib/fulcon/driver/$BRIDGEDRIVER:/usr/lib/fulcon/driver/$FULCONDRIVER:/usr/lib/fulcon/lib:$PATH
78 FULCONDIR=/var/lib/fulcon
89
910 lsdir() {
1011 ls -f --ind=none $1 | sed '/^\.\{1,2\}$/d'
1112 }
1213
13-# auto start fulcon container
14-for i in `lsdir $FULCONDIR/container`
15-do
16- if [ -f $FULCONDIR/container/$i/autostart ]; then
17- fulcon start $i
18- fi
19-done
14+# delete all bridge
15+br-del-all
2016
2117 # auto setup fulcon bridge
2218 mkdir -p $FULCONDIR/br
@@ -27,6 +23,14 @@ do
2723 fi
2824 done
2925
26+# auto start fulcon container
27+for i in `lsdir $FULCONDIR/container`
28+do
29+ if [ -f $FULCONDIR/container/$i/autostart ]; then
30+ fulcon start $i
31+ fi
32+done
33+
3034 while :
3135 do
3236 sleep 1
--- /dev/null
+++ b/src/driver/LinuxBridge/br-del-all
@@ -0,0 +1,19 @@
1+#!/bin/bash
2+
3+# Copyright (C) 2016 NIWA Hideyuki
4+
5+BR=`brctl show | sed -e 's/"//g' | \
6+ awk '{ \
7+ if((NF==3 || NF==4)&&($1~/^fulcon/))print $1 \
8+ }'`
9+
10+if [ x"$BR" != x"" ]; then
11+ for i in $BR
12+ do
13+ ip link set $i down
14+ brctl delbr $i
15+ done
16+fi
17+
18+
19+
--- /dev/null
+++ b/src/driver/OpenvSwitch/br-del-all
@@ -0,0 +1,18 @@
1+#!/bin/bash
2+
3+# Copyright (C) 2016 NIWA Hideyuki
4+
5+BR=`ovs-vsctl show | sed -e 's/"//g' | \
6+ awk '{ \
7+ if($1=="Bridge" && $2~/^fulcon/)print $2 \
8+ }'`
9+
10+if [ x"$BR" != x"" ]; then
11+ for i in $BR
12+ do
13+ ovs-vsctl del-br $i
14+ done
15+fi
16+
17+
18+
旧リポジトリブラウザで表示