[Ubuntu][openvswitch][自分用メモ] Ubuntu 15.04で再起動後にOpenVswitchインターフェイスが作られない。その2

NetworkUbuntu

Ubuntu 15.04でOpen vSwitchインターフェイスがうまいことを作成されないという記事を書きましたが、スクリプトをゴリッと修正して起動する方法についてメモ。

とりあえず、networkingはデフォルトだとrcSで起動するので、そちらを通常のランレベルで起動するように変更。

$ diff /etc/init.d/networking{,.org}
6c6
> # Default-Start:     1 2 3 4 5
---
< # Default-Start:     S

openvswitch-nonetwork.serviceに以下の一行を追記し、起動順序を変更。

$ diff /lib/systemd/system/openvswitch-nonetwork.service{,.org}
5d4
< Before=networking.service

意図的にopenvswitch関連サービス>ネットワーク、の順に起動してやるようにしました。

こうすることで以前はovsdb-serverに接続できていなかったのが、出来るようになりました。

May 30 08:06:40 ubuntu-virt.kometch.local systemd[1]: Starting LSB: Raise network interfaces....
May 30 08:06:40 ubuntu-virt.kometch.local networking[2083]: * Configuring network interfaces...
May 30 08:06:40 ubuntu-virt.kometch.local ovs-vsctl[2175]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --may-exist add-br ovsbr0 --
May 30 08:06:40 ubuntu-virt.kometch.local ovs-vsctl[2299]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --fake-iface add-bond ovsbr0 ovsbond0 enp5s0f0 enp5s0f1 other_config:bond-detect-mode=miimon bond_mode=balance-slb bond_updelay=100 bond_downdelay=100 other_config:lacp-time=fast other_config:bond-miimon-interval=100 bond_fake_iface=true other_config:bond-detect-mode=miimon "other_config:bond-miimon-interval=\"100\"" --
May 30 08:06:42 ubuntu-virt.kometch.local networking[2083]: Waiting for DAD... Done
May 30 08:06:42 ubuntu-virt.kometch.local networking[2083]: ...done.
May 30 08:06:42 ubuntu-virt.kometch.local systemd[1]: Started LSB: Raise network interfaces..

ただまぁ実際にスクリプトをゴリッと修正してやる方法がスマートかどうかは分かりません。

これだとバージョンアップの際の改修の手間も増えますし。

なにかいい案がある方がいらっしゃいましたらご教授ください。

この記事を書いた人

kometchtech

うつ病を患いながら、IT業界の末席にいるおっさんエンジニア。科学計算をしたことがないのに、HPC分野にお邪魔している。興味のある分野で学習したことをblogにまとめつつ、うつ病の経過症状のメモも置いておく日々。じつはRouterboard User Group JPの中の人でもある。 Amazon欲しいものリスト / Arm板を恵んでくれる人募集中

kometchtechをフォローする
タイトルとURLをコピーしました