diff mbox series

[ovs-dev,v2] ci: ovn-kubernetes: Use official build instructions when preparing rpms.

Message ID 20230118183222.2001620-1-dceara@redhat.com
State Accepted
Headers show
Series [ovs-dev,v2] ci: ovn-kubernetes: Use official build instructions when preparing rpms. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes fail github build: failed

Commit Message

Dumitru Ceara Jan. 18, 2023, 6:32 p.m. UTC
Recently OVS enabled AF_XDP support by default and that broke our RPM
build because of missing dependencies.

Suggested-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
---
V2:
- Addressed Ilya's comments:
  - only install the minimal set of packages
- completely removed dnf clean as we don't really care about the builder
  image size.
---
 .ci/ovn-kubernetes/Dockerfile | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

Comments

Ilya Maximets Jan. 19, 2023, 11:34 a.m. UTC | #1
On 1/18/23 19:32, Dumitru Ceara wrote:
> Recently OVS enabled AF_XDP support by default and that broke our RPM
> build because of missing dependencies.
> 
> Suggested-by: Ilya Maximets <i.maximets@ovn.org>
> Signed-off-by: Dumitru Ceara <dceara@redhat.com>
> ---
> V2:
> - Addressed Ilya's comments:
>   - only install the minimal set of packages
> - completely removed dnf clean as we don't really care about the builder
>   image size.
> ---
>  .ci/ovn-kubernetes/Dockerfile | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)

I think, this patch also needs a Fixes tag.

Fixes: 2ca0a4b8f2fe ("utilities: Do not send 'set-db-change-aware' for non-daemon mode tools.")

Otherwise, the patch seem to work fine and looks good to me:

Acked-by: Ilya Maximets <i.maximets@ovn.org>

Control plane tests are still failing, but it's not an issue
of the current patch.  Someone needs to fix these tests though,
because CI in its current form is kind of useless.

Best regards, Ilya Maximets.

> 
> diff --git a/.ci/ovn-kubernetes/Dockerfile b/.ci/ovn-kubernetes/Dockerfile
> index 1cb26d0d0e..722af78709 100644
> --- a/.ci/ovn-kubernetes/Dockerfile
> +++ b/.ci/ovn-kubernetes/Dockerfile
> @@ -8,21 +8,16 @@ USER root
>  ENV PYTHONDONTWRITEBYTECODE yes
>  
>  # install needed rpms - openvswitch must be 2.10.4 or higher
> -RUN INSTALL_PKGS=" \
> -    python3-pyyaml bind-utils procps-ng openssl numactl-libs firewalld-filesystem \
> -    libpcap hostname desktop-file-utils \
> -    python3-openvswitch python3-pyOpenSSL \
> -    autoconf automake libtool g++ gcc fedora-packager rpmdevtools \
> -    unbound unbound-devel groff python3-sphinx graphviz openssl openssl-devel \
> -    checkpolicy libcap-ng-devel selinux-policy-devel" && \
> -    dnf install --best --refresh -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
> -    dnf clean all && rm -rf /var/cache/dnf/*
> +RUN INSTALL_PKGS=" rpm-build dnf-plugins-core" && \
> +    dnf install --best --refresh -y --setopt=tsflags=nodocs $INSTALL_PKGS
>  
>  # Build OVS and OVN rpms from current folder
>  RUN mkdir /tmp/ovn
>  COPY . /tmp/ovn
>  WORKDIR /tmp/ovn/ovs
>  
> +RUN sed -e 's/@VERSION@/0.0.1/' rhel/openvswitch-fedora.spec.in > /tmp/ovs.spec
> +RUN dnf builddep -y /tmp/ovs.spec
>  RUN ./boot.sh
>  RUN ./configure -v
>  RUN make rpm-fedora
> @@ -30,6 +25,8 @@ RUN rm rpm/rpmbuild/RPMS/x86_64/*debug*
>  RUN rm rpm/rpmbuild/RPMS/x86_64/*devel*
>  
>  WORKDIR /tmp/ovn
> +RUN sed -e 's/@VERSION@/0.0.1/' rhel/ovn-fedora.spec.in > /tmp/ovn.spec
> +RUN dnf builddep -y /tmp/ovn.spec
>  RUN ./boot.sh
>  RUN ./configure
>  RUN make rpm-fedora
Dumitru Ceara Jan. 19, 2023, 12:32 p.m. UTC | #2
On 1/19/23 12:34, Ilya Maximets wrote:
> On 1/18/23 19:32, Dumitru Ceara wrote:
>> Recently OVS enabled AF_XDP support by default and that broke our RPM
>> build because of missing dependencies.
>>
>> Suggested-by: Ilya Maximets <i.maximets@ovn.org>
>> Signed-off-by: Dumitru Ceara <dceara@redhat.com>
>> ---
>> V2:
>> - Addressed Ilya's comments:
>>   - only install the minimal set of packages
>> - completely removed dnf clean as we don't really care about the builder
>>   image size.
>> ---
>>  .ci/ovn-kubernetes/Dockerfile | 15 ++++++---------
>>  1 file changed, 6 insertions(+), 9 deletions(-)
> 
> I think, this patch also needs a Fixes tag.
> 
> Fixes: 2ca0a4b8f2fe ("utilities: Do not send 'set-db-change-aware' for non-daemon mode tools.")
> 
> Otherwise, the patch seem to work fine and looks good to me:
> 
> Acked-by: Ilya Maximets <i.maximets@ovn.org>
> 

Thanks, I added the tags and pushed it to main.

> Control plane tests are still failing, but it's not an issue
> of the current patch.  Someone needs to fix these tests though,
> because CI in its current form is kind of useless.
> 

I know, I already reached out on a different thread to ovnkube folks for
some help to investigate the failures.  I think it's just a setup issue
and I'd like to avoid just disabling tests if we can actually make them
pass.

I'll give it a few days before disabling the failing ones.

But thanks for reporting this!

Regards,
Dumitru
diff mbox series

Patch

diff --git a/.ci/ovn-kubernetes/Dockerfile b/.ci/ovn-kubernetes/Dockerfile
index 1cb26d0d0e..722af78709 100644
--- a/.ci/ovn-kubernetes/Dockerfile
+++ b/.ci/ovn-kubernetes/Dockerfile
@@ -8,21 +8,16 @@  USER root
 ENV PYTHONDONTWRITEBYTECODE yes
 
 # install needed rpms - openvswitch must be 2.10.4 or higher
-RUN INSTALL_PKGS=" \
-    python3-pyyaml bind-utils procps-ng openssl numactl-libs firewalld-filesystem \
-    libpcap hostname desktop-file-utils \
-    python3-openvswitch python3-pyOpenSSL \
-    autoconf automake libtool g++ gcc fedora-packager rpmdevtools \
-    unbound unbound-devel groff python3-sphinx graphviz openssl openssl-devel \
-    checkpolicy libcap-ng-devel selinux-policy-devel" && \
-    dnf install --best --refresh -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
-    dnf clean all && rm -rf /var/cache/dnf/*
+RUN INSTALL_PKGS=" rpm-build dnf-plugins-core" && \
+    dnf install --best --refresh -y --setopt=tsflags=nodocs $INSTALL_PKGS
 
 # Build OVS and OVN rpms from current folder
 RUN mkdir /tmp/ovn
 COPY . /tmp/ovn
 WORKDIR /tmp/ovn/ovs
 
+RUN sed -e 's/@VERSION@/0.0.1/' rhel/openvswitch-fedora.spec.in > /tmp/ovs.spec
+RUN dnf builddep -y /tmp/ovs.spec
 RUN ./boot.sh
 RUN ./configure -v
 RUN make rpm-fedora
@@ -30,6 +25,8 @@  RUN rm rpm/rpmbuild/RPMS/x86_64/*debug*
 RUN rm rpm/rpmbuild/RPMS/x86_64/*devel*
 
 WORKDIR /tmp/ovn
+RUN sed -e 's/@VERSION@/0.0.1/' rhel/ovn-fedora.spec.in > /tmp/ovn.spec
+RUN dnf builddep -y /tmp/ovn.spec
 RUN ./boot.sh
 RUN ./configure
 RUN make rpm-fedora