[ovs-dev,1/2,ovn] OVN: Fix container build.
diff mbox series

Message ID 20190912000634.64928-1-amginwal@gmail.com
State New
Headers show
Series
  • [ovs-dev,1/2,ovn] OVN: Fix container build.
Related show

Commit Message

aginwala aginwala Sept. 12, 2019, 12:06 a.m. UTC
From: Aliasgar Ginwala <aginwala@ebay.com>

Current code changes in ovs/ovn split replaced openvswitch with ovn and
caused container patches to break.
Also, as per ff4439d, one should build ovn specifying ovs source.
This patch fixes the same.
---
 utilities/docker/create_ovn_dbs.sh | 18 ------------------
 utilities/docker/debian/Dockerfile | 12 +++++-------
 utilities/docker/debian/build.sh   | 20 +++++++++++++++++---
 utilities/docker/start-ovn         | 26 +++++++++++++-------------
 4 files changed, 35 insertions(+), 41 deletions(-)
 delete mode 100755 utilities/docker/create_ovn_dbs.sh

Comments

0-day Robot Sept. 12, 2019, 12:58 a.m. UTC | #1
Bleep bloop.  Greetings aginwala aginwala, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
ERROR: Author Aliasgar Ginwala <aginwala@ebay.com> needs to sign off.
Lines checked: 157, Warnings: 0, Errors: 1


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
aginwala Sept. 12, 2019, 1:28 a.m. UTC | #2
Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com>

On Wed, Sep 11, 2019 at 6:00 PM 0-day Robot <robot@bytheb.org> wrote:

> Bleep bloop.  Greetings aginwala aginwala, I am a robot and I have tried
> out your patch.
> Thanks for your contribution.
>
> I encountered some error that I wasn't expecting.  See the details below.
>
>
> checkpatch:
> ERROR: Author Aliasgar Ginwala <aginwala@ebay.com> needs to sign off.
> Lines checked: 157, Warnings: 0, Errors: 1
>
>
> Please check this out.  If you feel there has been an error, please email
> aconole@redhat.com
>
> Thanks,
> 0-day Robot
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Numan Siddique Sept. 19, 2019, 6:15 p.m. UTC | #3
On Thu, Sep 12, 2019 at 7:00 AM aginwala <aginwala@asu.edu> wrote:

> Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com>
>
>
Hi Ali,

This patch is failing when I compile.

Can you please take a look.


 > utilities/ovn-lib.tmp
make[1]: *** No rule to make target 'utilities/docker/create_ovn_dbs.sh',
needed by 'all-am'.  Stop.
make[1]: *** Waiting for unfinished jobs....
mv controller-vtep/ovn-controller-vtep.8.tmp
controller-vtep/ovn-controller-vtep.8
mv controller/ovn-controller.8.tmp controller/ovn-controller.8
mv utilities/ovn-lib.tmp utilities/ovn-lib
mv northd/ovn-northd.8.tmp northd/ovn-northd.8


Thaks
Numan

On Wed, Sep 11, 2019 at 6:00 PM 0-day Robot <robot@bytheb.org> wrote:
>
> > Bleep bloop.  Greetings aginwala aginwala, I am a robot and I have tried
> > out your patch.
> > Thanks for your contribution.
> >
> > I encountered some error that I wasn't expecting.  See the details below.
> >
> >
> > checkpatch:
> > ERROR: Author Aliasgar Ginwala <aginwala@ebay.com> needs to sign off.
> > Lines checked: 157, Warnings: 0, Errors: 1
> >
> >
> > Please check this out.  If you feel there has been an error, please email
> > aconole@redhat.com
> >
> > Thanks,
> > 0-day Robot
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
aginwala Sept. 19, 2019, 8:45 p.m. UTC | #4
Thanks Numan for review:

The issue was create_ovn_dbs.sh needs to be deleted from automake.mk as per
new patch. While testing, my env var used master branch  vs my custom
branch ovn_docker_unix and hence it had create_ovn_dbs.sh and it built fine
as per new build scripts. I submitted v2
https://patchwork.ozlabs.org/patch/1164870/ to handle the same. PTAL.

On Thu, Sep 19, 2019 at 11:15 AM Numan Siddique <nusiddiq@redhat.com> wrote:

>
>
> On Thu, Sep 12, 2019 at 7:00 AM aginwala <aginwala@asu.edu> wrote:
>
>> Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com>
>>
>>
> Hi Ali,
>
> This patch is failing when I compile.
>
> Can you please take a look.
>
>
>  > utilities/ovn-lib.tmp
> make[1]: *** No rule to make target 'utilities/docker/create_ovn_dbs.sh',
> needed by 'all-am'.  Stop.
> make[1]: *** Waiting for unfinished jobs....
> mv controller-vtep/ovn-controller-vtep.8.tmp
> controller-vtep/ovn-controller-vtep.8
> mv controller/ovn-controller.8.tmp controller/ovn-controller.8
> mv utilities/ovn-lib.tmp utilities/ovn-lib
> mv northd/ovn-northd.8.tmp northd/ovn-northd.8
>
>
> Thaks
> Numan
>
> On Wed, Sep 11, 2019 at 6:00 PM 0-day Robot <robot@bytheb.org> wrote:
>>
>> > Bleep bloop.  Greetings aginwala aginwala, I am a robot and I have tried
>> > out your patch.
>> > Thanks for your contribution.
>> >
>> > I encountered some error that I wasn't expecting.  See the details
>> below.
>> >
>> >
>> > checkpatch:
>> > ERROR: Author Aliasgar Ginwala <aginwala@ebay.com> needs to sign off.
>> > Lines checked: 157, Warnings: 0, Errors: 1
>> >
>> >
>> > Please check this out.  If you feel there has been an error, please
>> email
>> > aconole@redhat.com
>> >
>> > Thanks,
>> > 0-day Robot
>> > _______________________________________________
>> > dev mailing list
>> > dev@openvswitch.org
>> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>> >
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>
>

Patch
diff mbox series

diff --git a/utilities/docker/create_ovn_dbs.sh b/utilities/docker/create_ovn_dbs.sh
deleted file mode 100755
index 43ab367d6..000000000
--- a/utilities/docker/create_ovn_dbs.sh
+++ /dev/null
@@ -1,18 +0,0 @@ 
-#!/bin/sh
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-ovsdb-tool create /etc/openvswitch/ovnnb_db.db \
-/usr/share/openvswitch/ovn-nb.ovsschema
-ovsdb-tool create /etc/openvswitch/ovnsb_db.db \
-/usr/share/openvswitch/ovn-sb.ovsschema
diff --git a/utilities/docker/debian/Dockerfile b/utilities/docker/debian/Dockerfile
index fe72c3a33..30504480d 100644
--- a/utilities/docker/debian/Dockerfile
+++ b/utilities/docker/debian/Dockerfile
@@ -9,14 +9,12 @@  ARG DISTRO
 copy $DISTRO/build.sh /build.sh
 RUN /build.sh $KERNEL_VERSION $OVN_BRANCH $GITHUB_SRC
 
-COPY create_ovn_dbs.sh /etc/openvswitch/create_ovn_dbs.sh
-RUN /etc/openvswitch/create_ovn_dbs.sh
-
-COPY ovn_default_nb_port /etc/openvswitch/ovn_default_nb_port
-COPY ovn_default_sb_port /etc/openvswitch/ovn_default_sb_port
-COPY ovn_default_northd_host /etc/openvswitch/ovn_default_northd_host
+COPY ovn_default_nb_port /etc/ovn/ovn_default_nb_port
+COPY ovn_default_sb_port /etc/ovn/ovn_default_sb_port
+COPY ovn_default_northd_host /etc/ovn/ovn_default_northd_host
 
 COPY start-ovn /bin/start-ovn
 VOLUME ["/var/log/openvswitch", \
-"/var/lib/openvswitch", "/var/run/openvswitch", "/etc/openvswitch"]
+"/var/lib/openvswitch", "/var/run/openvswitch", "/etc/openvswitch", \
+"/var/log/ovn", "/var/lib/ovn", "/var/run/ovn", "/etc/ovn"]
 ENTRYPOINT ["start-ovn"]
diff --git a/utilities/docker/debian/build.sh b/utilities/docker/debian/build.sh
index fd26a8aa8..3c404bc39 100755
--- a/utilities/docker/debian/build.sh
+++ b/utilities/docker/debian/build.sh
@@ -25,20 +25,34 @@  dh-autoreconf openssl"
 apt-get update
 apt-get install -y ${linux} ${build_deps}
 
-# get the source
+# get ovs source always from master as its needed as dependency
 mkdir /build; cd /build
+git clone --depth 1 -b master https://github.com/openvswitch/ovs.git
+cd ovs;
+mkdir _gcc;
+
+# build and install
+./boot.sh
+cd _gcc
+../configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \
+--with-linux=/lib/modules/$KERNEL_VERSION/build --enable-ssl
+cd ..; make -C _gcc install; cd ..
+
+
+# get ovn source
 git clone --depth 1 -b $OVN_BRANCH $GITHUB_SRC
 cd ovn
 
 # build and install
 ./boot.sh
 ./configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \
---with-linux=/lib/modules/$KERNEL_VERSION/build --enable-ssl
+--with-linux=/lib/modules/$KERNEL_VERSION/build --enable-ssl \
+--with-ovs-source=/build/ovs/ --with-ovs-build=/build/ovs/_gcc
 make -j8; make install
 
 # remove deps to make the container light weight.
 apt-get remove --purge -y ${build_deps}
 apt-get autoremove -y --purge
-cd ..; rm -rf ovn
+cd ..; rm -rf ovn; rm -rf ovs
 basic_utils="vim kmod net-tools uuid-runtime iproute2"
 apt-get install -y ${basic_utils}
diff --git a/utilities/docker/start-ovn b/utilities/docker/start-ovn
index 7f87e65a3..7457836fe 100755
--- a/utilities/docker/start-ovn
+++ b/utilities/docker/start-ovn
@@ -13,28 +13,28 @@ 
 # limitations under the License.
 
 case $1 in
-        "ovn-nb-tcp") source /etc/openvswitch/ovn_default_nb_port
-                      /usr/share/openvswitch/scripts/ovn-ctl start_ovsdb
+        "ovn-nb-tcp") source /etc/ovn/ovn_default_nb_port
+                      /usr/share/ovn/scripts/ovn-ctl start_ovsdb
                       ovn-nbctl set-connection ptcp:$nb_db_port
-                      /usr/share/openvswitch/scripts/ovn-ctl stop_ovsdb
-                      /usr/share/openvswitch/scripts/ovn-ctl run_nb_ovsdb
+                      /usr/share/ovn/scripts/ovn-ctl stop_ovsdb
+                      /usr/share/ovn/scripts/ovn-ctl run_nb_ovsdb
         ;;
-        "ovn-sb-tcp") source /etc/openvswitch/ovn_default_sb_port
-                      /usr/share/openvswitch/scripts/ovn-ctl start_ovsdb
+        "ovn-sb-tcp") source /etc/ovn/ovn_default_sb_port
+                      /usr/share/ovn/scripts/ovn-ctl start_ovsdb
                       ovn-sbctl set-connection ptcp:$sb_db_port
-                      /usr/share/openvswitch/scripts/ovn-ctl stop_ovsdb
-                      /usr/share/openvswitch/scripts/ovn-ctl run_sb_ovsdb
+                      /usr/share/ovn/scripts/ovn-ctl stop_ovsdb
+                      /usr/share/ovn/scripts/ovn-ctl run_sb_ovsdb
         ;;
-        "ovn-northd-tcp") source /etc/openvswitch/ovn_default_northd_host
-                          source /etc/openvswitch/ovn_default_nb_port
-                          source /etc/openvswitch/ovn_default_sb_port
+        "ovn-northd-tcp") source /etc/ovn/ovn_default_northd_host
+                          source /etc/ovn/ovn_default_nb_port
+                          source /etc/ovn/ovn_default_sb_port
                           ovn-northd --pidfile \
                           --ovnnb-db="tcp:$northd_host:$nb_db_port" \
                           --ovnsb-db="tcp:$northd_host:$sb_db_port" \
-                          --log-file=/var/log/openvswitch/ovn-northd.log
+                          --log-file=/var/log/ovn/ovn-northd.log
         ;;
         "ovn-controller") ovn-controller --pidfile \
-                          --log-file=/var/log/openvswitch/ovn-controller.log
+                          --log-file=/var/log/ovn/ovn-controller.log
         ;;
         *) echo "$0 [ovn-nb-tcp|ovn-sb-tcp|ovn-northd-tcp|ovn-controller]"
 esac