openvswtich: start openvswitch at the boot time
PATCH 1/1 openvswtich: start openvswitch at the boot time
From: Lei Yang <[email protected]>
When I define the bridge, I get below error
root@intel_5500_server:~# ovs-vsctl add-br ovsbr0 Jan 25 17:34:07|00002|stream_unix|ERR|/tmp/stream-unix.1487.0: connection to /var/run/openvswitch/db.sock failed: No such file or directory ........ ........
This is becasue openvswitch isn't running,so we'd better start it at the boot time. Since openvswtich depends on openvswtich module,so auto load the kernel module too.
--- recipes-kernel/linux/linux-yocto_3.4.bbappend | 2 +- .../openvswitch/openvswitch_1.4.3.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
recipes-kernel/linux/linux-yocto_3.4.bbappend +1 -1
@@ -5,4 +5,4 @@ SRC_URI += "file://xt-checksum.scc \ file://vswitch.scc \ file://lxc.scc \ " - +module_autoload_openvswitch = "openvswitch"
recipes-networking/openvswitch/openvswitch_1.4.3.bb +1 -1
@@ -7,7 +7,7 @@ LICENSE = "Apache-2" DEPENDS += "bridge-utils openssl python perl" RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid \ - python perl perl-module-strict" + python perl perl-module-strict ${PN}-switch ${PN}-controller" RDEPENDS_${PN}-controller = "${PN} lsb ${PN}-pki" RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" RDEPENDS_${PN}-pki = "${PN}"
Signature · 1 line
1.7.1
Quoted 11 lines · On Mon, Jan 28, 2013 at 6:01 AM, <[email protected]> wrote:
From: Lei Yang <[email protected]>
When I define the bridge, I get below error
root@intel_5500_server:~# ovs-vsctl add-br ovsbr0 Jan 25 17:34:07|00002|stream_unix|ERR|/tmp/stream-unix.1487.0: connection to /var/run/openvswitch/db.sock failed: No such file or directory ........ ........
Quoted 3 lines
This is becasue openvswitch isn't running,so we'd better start it at the boot time.
s/becasue/because/
Can you elaborate on this a bit more as well. What you are actually doing in the
patch is adding to the RDEPENDS of openvswitch and it's the dependencies that
you are adding, that once installed are starting the switch at runtime .. right ? The
reason I'd like it clarified is that when I read your patch, I expected to see an initscript
update, or inherit rc.d, but found the RDEPENDS update instead.
Quoted 18 lines
Since openvswtich depends on openvswtich module,so auto load the kernel module too.
Signed-off-by Lei Yang <[email protected]>Tested-by Lei Yang <[email protected]>--- recipes-kernel/linux/linux-yocto_3.4.bbappend | 2 +- .../openvswitch/openvswitch_1.4.3.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)recipes-kernel/linux/linux-yocto_3.4.bbappend +0
-0
recipes-kernel/linux/linux-yocto_3.4.bbappend SRC_URI += "file://xt-checksum.scc \ · line 8
Quoted 5 lines
recipes-kernel/linux/linux-yocto_3.4.bbappend +1
-1@@ -5,4 +5,4 @@ SRC_URI += "file://xt-checksum.scc \ file://vswitch.scc \ file://lxc.scc \ " - +module_autoload_openvswitch = "openvswitch"
This looks fine. I double checked that the vswitch kernel fragment enables the module,
so our autoload is fine.
Bruce
Quoted 23 lines
(quoted diff) +0
-0openvswitch_1.4.3.bb
index 88f0114..6764073 100644recipes-networking/openvswitch/openvswitch_1.4.3.bb +1
-1@@ -7,7 +7,7 @@ LICENSE = "Apache-2" DEPENDS += "bridge-utils openssl python perl" RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid \ - python perl perl-module-strict" + python perl perl-module-strict ${PN}-switch${PN}-controller"
RDEPENDS_${PN}-controller = "${PN} lsb ${PN}-pki" RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" RDEPENDS_${PN}-pki = "${PN}"
--
1.7.1_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Quoted 57 lines · On Mon, Jan 28, 2013 at 6:01 AM, <[email protected]> wrote:
From: Lei Yang <[email protected]>
When I define the bridge, I get below error
root@intel_5500_server:~# ovs-vsctl add-br ovsbr0 Jan 25 17:34:07|00002|stream_unix|ERR|/tmp/stream-unix.1487.0: connection to /var/run/openvswitch/db.sock failed: No such file or directory ........ ........This is becasue openvswitch isn't running,so we'd better start it at the boot time.
Since openvswtich depends on openvswtich module,so auto load the kernel module too.Signed-off-by Lei Yang <[email protected]>Tested-by Lei Yang <[email protected]>--- recipes-kernel/linux/linux-yocto_3.4.bbappend | 2 +- .../openvswitch/openvswitch_1.4.3.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)recipes-kernel/linux/linux-yocto_3.4.bbappend +1
-1@@ -5,4 +5,4 @@ SRC_URI += "file://xt-checksum.scc \ file://vswitch.scc \ file://lxc.scc \ " - +module_autoload_openvswitch = "openvswitch"(quoted diff) +0
-0openvswitch_1.4.3.bb
index 88f0114..6764073 100644recipes-networking/openvswitch/openvswitch_1.4.3.bb +1
-1@@ -7,7 +7,7 @@ LICENSE = "Apache-2" DEPENDS += "bridge-utils openssl python perl" RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid \ - python perl perl-module-strict" + python perl perl-module-strict ${PN}-switch${PN}-controller"
RDEPENDS_${PN}-controller = "${PN} lsb ${PN}-pki" RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" RDEPENDS_${PN}-pki = "${PN}"
--
1.7.1_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Quoted 20 lines · Bruce Ashfield
On Mon, Jan 28, 2013 at 6:01 AM, <[email protected] <mailto:[email protected]>> wrote:
From: Lei Yang <[email protected]
<mailto:[email protected]>>When I define the bridge, I get below error
root@intel_5500_server:~# ovs-vsctl add-br ovsbr0 Jan 25 17:34:07|00002|stream_unix|ERR|/tmp/stream-unix.1487.0:
connection to/var/run/openvswitch/db.sock
failed: No such file or directory
........
........This is becasue openvswitch isn't running,so we'd better start it at the boot time.
Quoted 7 lines
s/becasue/because/
Can you elaborate on this a bit more as well. What you are actually doing in the patch is adding to the RDEPENDS of openvswitch and it's the dependencies that you are adding, that once installed are starting the switch at runtime .. right ? The reason I'd like it clarified is that when I read your patch, I expected to see an initscript update, or inherit rc.d, but found the RDEPENDS update instead.
because : those tow packages used rc.d. so we only need to install them
inherit autotools update-rc.d
INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-controller" INITSCRIPT_NAME_${PN}-switch = "openvswitch-switch" INITSCRIPT_PARAMS_${PN}-switch = "defaults 71"
INITSCRIPT_NAME_${PN}-controller = "openvswitch-controller" INITSCRIPT_PARAMS_${PN}-controller = "defaults 72"
I will send V2 tomorrow
LeI
Quoted 140 lines
Since openvswtich depends on openvswtich module,so auto load the kernel module too. Signed-off-by: Lei Yang <[email protected] <mailto:[email protected]>> Tested-by: Lei Yang <[email protected] <mailto:[email protected]>> --- recipes-kernel/linux/linux-yocto_3.4.bbappend | 2 +- .../openvswitch/openvswitch_1.4.3.bb <http://openvswitch_1.4.3.bb> | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend b/recipes-kernel/linux/linux-yocto_3.4.bbappend index 5b163ff..918302a 100644 --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend @@ -5,4 +5,4 @@ SRC_URI += "file://xt-checksum.scc \ file://vswitch.scc \ file://lxc.scc \ " - +module_autoload_openvswitch = "openvswitch"This looks fine. I double checked that the vswitch kernel fragment enables the module, so our autoload is fine.
Bruce
diff --git a/recipes-networking/openvswitch/openvswitch_1.4.3.bb <http://openvswitch_1.4.3.bb> b/recipes-networking/openvswitch/openvswitch_1.4.3.bb <http://openvswitch_1.4.3.bb> index 88f0114..6764073 100644 --- a/recipes-networking/openvswitch/openvswitch_1.4.3.bb <http://openvswitch_1.4.3.bb> +++ b/recipes-networking/openvswitch/openvswitch_1.4.3.bb <http://openvswitch_1.4.3.bb> @@ -7,7 +7,7 @@ LICENSE = "Apache-2" DEPENDS += "bridge-utils openssl python perl" RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid \ - python perl perl-module-strict" + python perl perl-module-strict ${PN}-switch ${PN}-controller" RDEPENDS_${PN}-controller = "${PN} lsb ${PN}-pki" RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" RDEPENDS_${PN}-pki = "${PN}" -- 1.7.1 _______________________________________________ meta-virtualization mailing list [email protected] <mailto:[email protected]> https://lists.yoctoproject.org/listinfo/meta-virtualizationSignature · 1 line
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"On Mon, Jan 28, 2013 at 6:01 AM, <[email protected] <mailto:[email protected]>> wrote:
From: Lei Yang <[email protected] <mailto:[email protected]>> When I define the bridge, I get below error root@intel_5500_server:~# ovs-vsctl add-br ovsbr0 Jan 25 17:34:07|00002|stream_unix|ERR|/tmp/stream-unix.1487.0: connection to /var/run/openvswitch/db.sock failed: No such file or directory ........ ........ This is becasue openvswitch isn't running,so we'd better start it at the boot time. Since openvswtich depends on openvswtich module,so auto load the kernel module too. Signed-off-by: Lei Yang <[email protected] <mailto:[email protected]>> Tested-by: Lei Yang <[email protected] <mailto:[email protected]>> --- recipes-kernel/linux/linux-yocto_3.4.bbappend | 2 +- .../openvswitch/openvswitch_1.4.3.bb <http://openvswitch_1.4.3.bb> | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend b/recipes-kernel/linux/linux-yocto_3.4.bbappend index 5b163ff..918302a 100644 --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend @@ -5,4 +5,4 @@ SRC_URI += "file://xt-checksum.scc \ file://vswitch.scc \ file://lxc.scc \ " - +module_autoload_openvswitch = "openvswitch" diff --git a/recipes-networking/openvswitch/openvswitch_1.4.3.bb <http://openvswitch_1.4.3.bb> b/recipes-networking/openvswitch/openvswitch_1.4.3.bb <http://openvswitch_1.4.3.bb> index 88f0114..6764073 100644 --- a/recipes-networking/openvswitch/openvswitch_1.4.3.bb <http://openvswitch_1.4.3.bb> +++ b/recipes-networking/openvswitch/openvswitch_1.4.3.bb <http://openvswitch_1.4.3.bb> @@ -7,7 +7,7 @@ LICENSE = "Apache-2" DEPENDS += "bridge-utils openssl python perl" RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid \ - python perl perl-module-strict" + python perl perl-module-strict ${PN}-switch ${PN}-controller" RDEPENDS_${PN}-controller = "${PN} lsb ${PN}-pki" RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" RDEPENDS_${PN}-pki = "${PN}" -- 1.7.1 _______________________________________________ meta-virtualization mailing list [email protected] <mailto:[email protected]> https://lists.yoctoproject.org/listinfo/meta-virtualizationSignature · 1 line
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Quoted 40 lines · lei yang
Quoted 24 lines · Bruce Ashfield
On Mon, Jan 28, 2013 at 6:01 AM, <[email protected] <mailto:
[email protected]**>> wrote:From: Lei Yang <[email protected]
<mailto:[email protected]**>>When I define the bridge, I get below error
root@intel_5500_server:~# ovs-vsctl add-br ovsbr0
Jan 25 17:34:07|00002|stream_unix|**ERR|/tmp/stream-unix.1487.0:
connection to/var/run/openvswitch/db.sock
failed: No such file or directory
........
........This is becasue openvswitch isn't running,so we'd better start it at the boot time.
s/becasue/because/
Quoted 10 lines
Can you elaborate on this a bit more as well. What you are actually doing in the
patch is adding to the RDEPENDS of openvswitch and it's the dependencies that
you are adding, that once installed are starting the switch at runtime .. right ? The
reason I'd like it clarified is that when I read your patch, I expected to see an initscript
update, or inherit rc.d, but found the RDEPENDS update instead.because : those tow packages used rc.d. so we only need to install them
Quoted 11 lines
inherit autotools update-rc.d
INITSCRIPT_PACKAGES= "${PN}-switch ${PN}-controller" INITSCRIPT_NAME_${PN}-switch = "openvswitch-switch" INITSCRIPT_PARAMS_${PN}-switch = "defaults 71"INITSCRIPT_NAME_${PN}-**controller = "openvswitch-controller" INITSCRIPT_PARAMS_${PN}-**controller = "defaults 72"
Exactly, that's what I saw when I checked .. but it's worth being clear in the
message.
Bruce
Quoted 168 lines
I will send V2 tomorrow
LeI
Since openvswtich depends on openvswtich module,so auto load the
Quoted 157 lines
kernel module too. Signed-off-by: Lei Yang <[email protected] <mailto:[email protected]**>> Tested-by: Lei Yang <[email protected] <mailto:[email protected]**>> --- recipes-kernel/linux/linux-**yocto_3.4.bbappend | 2 +- .../openvswitch/openvswitch_1.**4.3.bb <http://openvswitch_1.4.3.bb> <http://openvswitch_1.4.3.bb> | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-kernel/linux/linux-**yocto_3.4.bbappend b/recipes-kernel/linux/linux-**yocto_3.4.bbappend index 5b163ff..918302a 100644 --- a/recipes-kernel/linux/linux-**yocto_3.4.bbappend +++ b/recipes-kernel/linux/linux-**yocto_3.4.bbappend @@ -5,4 +5,4 @@ SRC_URI += "file://xt-checksum.scc \ file://vswitch.scc \ file://lxc.scc \ " - +module_autoload_openvswitch = "openvswitch"This looks fine. I double checked that the vswitch kernel fragment enables the module,
so our autoload is fine.Bruce
diff --git a/recipes-networking/**openvswitch/openvswitch_1.4.3.**bb<http://openvswitch_1.4.3.bb> <http://openvswitch_1.4.3.bb> b/recipes-networking/**openvswitch/openvswitch_1.4.3.**bb<http://openvswitch_1.4.3.bb> <http://openvswitch_1.4.3.bb> index 88f0114..6764073 100644 --- a/recipes-networking/**openvswitch/openvswitch_1.4.3.**bb<http://openvswitch_1.4.3.bb> <http://openvswitch_1.4.3.bb> +++ b/recipes-networking/**openvswitch/openvswitch_1.4.3.**bb<http://openvswitch_1.4.3.bb> <http://openvswitch_1.4.3.bb> @@ -7,7 +7,7 @@ LICENSE = "Apache-2" DEPENDS += "bridge-utils openssl python perl" RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid \ - python perl perl-module-strict" + python perl perl-module-strict ${PN}-switch ${PN}-controller" RDEPENDS_${PN}-controller = "${PN} lsb ${PN}-pki" RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" RDEPENDS_${PN}-pki = "${PN}" -- 1.7.1 ______________________________**_________________ meta-virtualization mailing list meta-virtualization@**yoctoproject.org<[email protected]> <mailto:meta-virtualization@**yoctoproject.org<[email protected]>Quoted 1 line
https://lists.yoctoproject.**org/listinfo/meta-**virtualization<https://lists.yoctoproject.org/listinfo/meta-virtualization>
--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"On Mon, Jan 28, 2013 at 6:01 AM, <[email protected] <mailto:
[email protected]**>> wrote:From: Lei Yang <[email protected] <mailto:[email protected]**>> When I define the bridge, I get below error root@intel_5500_server:~# ovs-vsctl add-br ovsbr0 Jan 25 17:34:07|00002|stream_unix|**ERR|/tmp/stream-unix.1487.0: connection to /var/run/openvswitch/db.sock failed: No such file or directory ........ ........ This is becasue openvswitch isn't running,so we'd better start it at the boot time. Since openvswtich depends on openvswtich module,so auto load the kernel module too. Signed-off-by: Lei Yang <[email protected] <mailto:[email protected]**>> Tested-by: Lei Yang <[email protected] <mailto:[email protected]**>> --- recipes-kernel/linux/linux-**yocto_3.4.bbappend | 2 +- .../openvswitch/openvswitch_1.**4.3.bb <http://openvswitch_1.4.3.bb> <http://openvswitch_1.4.3.bb> | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-kernel/linux/linux-**yocto_3.4.bbappend b/recipes-kernel/linux/linux-**yocto_3.4.bbappend index 5b163ff..918302a 100644 --- a/recipes-kernel/linux/linux-**yocto_3.4.bbappend +++ b/recipes-kernel/linux/linux-**yocto_3.4.bbappend @@ -5,4 +5,4 @@ SRC_URI += "file://xt-checksum.scc \ file://vswitch.scc \ file://lxc.scc \ " - +module_autoload_openvswitch = "openvswitch" diff --git a/recipes-networking/**openvswitch/openvswitch_1.4.3.**bb<http://openvswitch_1.4.3.bb> <http://openvswitch_1.4.3.bb> b/recipes-networking/**openvswitch/openvswitch_1.4.3.**bb<http://openvswitch_1.4.3.bb> <http://openvswitch_1.4.3.bb> index 88f0114..6764073 100644 --- a/recipes-networking/**openvswitch/openvswitch_1.4.3.**bb<http://openvswitch_1.4.3.bb> <http://openvswitch_1.4.3.bb> +++ b/recipes-networking/**openvswitch/openvswitch_1.4.3.**bb<http://openvswitch_1.4.3.bb> <http://openvswitch_1.4.3.bb> @@ -7,7 +7,7 @@ LICENSE = "Apache-2" DEPENDS += "bridge-utils openssl python perl" RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid \ - python perl perl-module-strict" + python perl perl-module-strict ${PN}-switch ${PN}-controller" RDEPENDS_${PN}-controller = "${PN} lsb ${PN}-pki" RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" RDEPENDS_${PN}-pki = "${PN}" -- 1.7.1 ______________________________**_________________ meta-virtualization mailing list meta-virtualization@**yoctoproject.org<[email protected]> <mailto:meta-virtualization@**yoctoproject.org<[email protected]>Quoted 1 line
https://lists.yoctoproject.**org/listinfo/meta-**virtualization<https://lists.yoctoproject.org/listinfo/meta-virtualization>
--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"