[ovs-dev,RFC] travis: Use container infrastructure.
diff mbox

Message ID 1443465397-4195-1-git-send-email-diproiettod@vmware.com
State Accepted
Headers show

Commit Message

Daniele Di Proietto Sept. 28, 2015, 6:36 p.m. UTC
Recently some testcases have been failing in travis because of a warning
related to the use of an L3 device (OpenVZ specific) inside the workers.

To get travis tests working again we can move to the newer container
infrastructure: this commit does that.

The disadvantage is that there's no sudo access anymore, but we can
install packages with the apt plugin, and we shouldn't use root for
anything else

Tested-at: https://travis-ci.org/ddiproietto/ovs/builds/81764972
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
CC: Joe Stringer <joestringer@nicira.com>
---
 .travis.yml        | 11 ++++++++++-
 .travis/prepare.sh |  9 +--------
 2 files changed, 11 insertions(+), 9 deletions(-)

Comments

Ben Pfaff Sept. 29, 2015, 3:27 a.m. UTC | #1
On Mon, Sep 28, 2015 at 07:36:37PM +0100, Daniele Di Proietto wrote:
> Recently some testcases have been failing in travis because of a warning
> related to the use of an L3 device (OpenVZ specific) inside the workers.
> 
> To get travis tests working again we can move to the newer container
> infrastructure: this commit does that.
> 
> The disadvantage is that there's no sudo access anymore, but we can
> install packages with the apt plugin, and we shouldn't use root for
> anything else
> 
> Tested-at: https://travis-ci.org/ddiproietto/ovs/builds/81764972
> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
> CC: Joe Stringer <joestringer@nicira.com>

Thanks for doing this!

This seems to stop installing libfuse-dev in the DPDK case.  Does that
break anything?

But since you work with DPDK I'll assume you know what you're doing:

Acked-by: Ben Pfaff <blp@nicira.com>
Daniele Di Proietto Sept. 29, 2015, 12:38 p.m. UTC | #2
On 29/09/2015 04:27, "Ben Pfaff" <blp@nicira.com> wrote:

>On Mon, Sep 28, 2015 at 07:36:37PM +0100, Daniele Di Proietto wrote:
>> Recently some testcases have been failing in travis because of a warning
>> related to the use of an L3 device (OpenVZ specific) inside the workers.
>> 
>> To get travis tests working again we can move to the newer container
>> infrastructure: this commit does that.
>> 
>> The disadvantage is that there's no sudo access anymore, but we can
>> install packages with the apt plugin, and we shouldn't use root for
>> anything else
>> 
>> Tested-at: 
>>https://urldefense.proofpoint.com/v2/url?u=https-3A__travis-2Dci.org_ddip
>>roietto_ovs_builds_81764972&d=BQIBAg&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihV
>>MNtXt-uEs&r=SmB5nZacmXNq0gKCC1s_Cw5yUNjxgD4v5kJqZ2uWLlE&m=QeUKoyj1YsLlESX
>>xWMv0xncsou1lw7ZLEXBukpfcZ78&s=OLVuPkawS-E2GCPE73jlN5INih9Y1uRyE3-NPzk150
>>c&e= 
>> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
>>
>
>Thanks for doing this!
>
>This seems to stop installing libfuse-dev in the DPDK case.  Does that
>break anything?

It was needed for vhost-cuse, but since we're building with vhost-user
it is not necessary anymore.

I've added an explanation in the commit message

>
>But since you work with DPDK I'll assume you know what you're doing:
>
>Acked-by: Ben Pfaff <blp@nicira.com>

Thanks for the review!

I pushed this to master
Joe Stringer Sept. 29, 2015, 5:47 p.m. UTC | #3
On 28 September 2015 at 20:27, Ben Pfaff <blp@nicira.com> wrote:
> On Mon, Sep 28, 2015 at 07:36:37PM +0100, Daniele Di Proietto wrote:
>> Recently some testcases have been failing in travis because of a warning
>> related to the use of an L3 device (OpenVZ specific) inside the workers.
>>
>> To get travis tests working again we can move to the newer container
>> infrastructure: this commit does that.
>>
>> The disadvantage is that there's no sudo access anymore, but we can
>> install packages with the apt plugin, and we shouldn't use root for
>> anything else
>>
>> Tested-at: https://travis-ci.org/ddiproietto/ovs/builds/81764972
>> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
>> CC: Joe Stringer <joestringer@nicira.com>
>
> Thanks for doing this!

+1 Appreciate you looking into this Daniele, keen to get back to stable CI :-)

There's a few failures remaining, mostly in backports at the moment.
This one looks different though:

https://travis-ci.org/openvswitch/ovs/jobs/82728444

Seems that we're using 'bc' somewhere, but this isn't installed by
default in the travis environment. Perhaps should either figure out an
alternative way to do whatever we're using bc for, or install bc as
well.
Ben Pfaff Sept. 29, 2015, 5:51 p.m. UTC | #4
On Tue, Sep 29, 2015 at 10:47:56AM -0700, Joe Stringer wrote:
> On 28 September 2015 at 20:27, Ben Pfaff <blp@nicira.com> wrote:
> > On Mon, Sep 28, 2015 at 07:36:37PM +0100, Daniele Di Proietto wrote:
> >> Recently some testcases have been failing in travis because of a warning
> >> related to the use of an L3 device (OpenVZ specific) inside the workers.
> >>
> >> To get travis tests working again we can move to the newer container
> >> infrastructure: this commit does that.
> >>
> >> The disadvantage is that there's no sudo access anymore, but we can
> >> install packages with the apt plugin, and we shouldn't use root for
> >> anything else
> >>
> >> Tested-at: https://travis-ci.org/ddiproietto/ovs/builds/81764972
> >> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
> >> CC: Joe Stringer <joestringer@nicira.com>
> >
> > Thanks for doing this!
> 
> +1 Appreciate you looking into this Daniele, keen to get back to stable CI :-)
> 
> There's a few failures remaining, mostly in backports at the moment.
> This one looks different though:
> 
> https://travis-ci.org/openvswitch/ovs/jobs/82728444
> 
> Seems that we're using 'bc' somewhere, but this isn't installed by
> default in the travis environment. Perhaps should either figure out an
> alternative way to do whatever we're using bc for, or install bc as
> well.

Based on the log, my guess is that that is happening somewhere in the
kernel build system, so it's probably easiest to add bc to the packages
we install.

I don't see use of "bc" inside the OVS build system or tests.
Daniele Di Proietto Sept. 29, 2015, 6:02 p.m. UTC | #5
On 29/09/2015 18:51, "Ben Pfaff" <blp@nicira.com> wrote:

>On Tue, Sep 29, 2015 at 10:47:56AM -0700, Joe Stringer wrote:
>> On 28 September 2015 at 20:27, Ben Pfaff <blp@nicira.com> wrote:
>> > On Mon, Sep 28, 2015 at 07:36:37PM +0100, Daniele Di Proietto wrote:
>> >> Recently some testcases have been failing in travis because of a
>>warning
>> >> related to the use of an L3 device (OpenVZ specific) inside the
>>workers.
>> >>
>> >> To get travis tests working again we can move to the newer container
>> >> infrastructure: this commit does that.
>> >>
>> >> The disadvantage is that there's no sudo access anymore, but we can
>> >> install packages with the apt plugin, and we shouldn't use root for
>> >> anything else
>> >>
>> >> Tested-at: 
>>https://urldefense.proofpoint.com/v2/url?u=https-3A__travis-2Dci.org_ddip
>>roietto_ovs_builds_81764972&d=BQIBAg&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihV
>>MNtXt-uEs&r=SmB5nZacmXNq0gKCC1s_Cw5yUNjxgD4v5kJqZ2uWLlE&m=kX6-y5h7zFnf0oq
>>XM0FwXDLDIyXS2_aY3aYfGXIGabE&s=Nv-s5jWvXQ4qwG47DtljWH_eRLqLgbDH5K-AFdf_f9
>>A&e= 
>> >> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
>> >> CC: Joe Stringer <joestringer@nicira.com>
>> >
>> > Thanks for doing this!
>> 
>> +1 Appreciate you looking into this Daniele, keen to get back to stable
>>CI :-)
>> 
>> There's a few failures remaining, mostly in backports at the moment.

Yep, seems like one more function is needed.

>> This one looks different though:
>> 
>> 
>>https://urldefense.proofpoint.com/v2/url?u=https-3A__travis-2Dci.org_open
>>vswitch_ovs_jobs_82728444&d=BQIBAg&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMN
>>tXt-uEs&r=SmB5nZacmXNq0gKCC1s_Cw5yUNjxgD4v5kJqZ2uWLlE&m=kX6-y5h7zFnf0oqXM
>>0FwXDLDIyXS2_aY3aYfGXIGabE&s=fGe217kY6orUy8l-mAH7drH5BoJ7TqHjGWI5kbZSl_U&
>>e= 
>> 
>> Seems that we're using 'bc' somewhere, but this isn't installed by
>> default in the travis environment. Perhaps should either figure out an
>> alternative way to do whatever we're using bc for, or install bc as
>> well.
>
>Based on the log, my guess is that that is happening somewhere in the
>kernel build system, so it's probably easiest to add bc to the packages
>we install.
>
>I don't see use of "bc" inside the OVS build system or tests.

I agree, we can install bc. I've sent a patch:

http://openvswitch.org/pipermail/dev/2015-September/060563.html

Sorry for all the noise.

Daniele

Patch
diff mbox

diff --git a/.travis.yml b/.travis.yml
index c721f53..f3a9329 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,9 +3,18 @@  compiler:
   - gcc
   - clang
 
+addons:
+  apt:
+    packages:
+      - libssl-dev
+      - llvm-dev
+      - gcc-multilib
+
 before_install: ./.travis/prepare.sh
 
-sudo: true
+before_script: export PATH=$PATH:$HOME/bin
+
+sudo: false
 
 env:
   - OPTS="--disable-ssl"
diff --git a/.travis/prepare.sh b/.travis/prepare.sh
index 0fd6c28..cfc1b17 100755
--- a/.travis/prepare.sh
+++ b/.travis/prepare.sh
@@ -1,11 +1,4 @@ 
 #!/bin/bash
 
-sudo -E apt-get update -qq
-sudo -E apt-get install -qq libssl-dev llvm-dev
-sudo -E apt-get install -qq gcc-multilib
-if [ "$DPDK" ]; then
-    sudo -E apt-get install -qq libfuse-dev
-fi
-
 git clone git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git
-cd sparse && make && sudo -E make install PREFIX=/usr && cd ..
+cd sparse && make && make install && cd ..