bond-cni build errors seen on some build systems

Bug #1966728 reported by Scott Little
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Steven Webster

Bug Description

Brief Description
-----------------
bond-cni consistently fails to build on some build systems. Others are fine.
The issue appears to relate to explicit vs implicit go dependencies.

There might be two aspects to this bug.
1) address bond-cni itself. It should be explicit about all dependencies.
2) Why is the Mock build environment not delivering a consistent build result for all build hosts?

Severity
--------
Critical

Steps to Reproduce
------------------
Write down the steps to reproduce the issue

Expected Behavior
------------------
Write down what was expected after taking the steps written above

Actual Behavior
----------------
State what is the actual behavior

Reproducibility
---------------
100%

System Configuration
--------------------
N/A

Branch/Pull Time/Commit
-----------------------
March 28, 2022

Last Pass
---------
March 25, 2022

Timestamp/Logs
--------------
go: vendored module <email address hidden> should be required explicitly in go.mod
go: vendored module <email address hidden> should be required explicitly in go.mod
go: vendored module <email address hidden> should be required explicitly in go.mod
go: updates to go.mod needed, disabled by -mod=vendor
 (Go version in go.mod is at least 1.14 and vendor directory exists.)
 to update it:
 go mod tidy
error: Bad exit status from /var/tmp/rpm-tmp.IN2PlV (%build)
    Bad exit status from /var/tmp/rpm-tmp.IN2PlV (%build)
RPM build errors:
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 547, in do
    raise exception.Error("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
Error: Command failed. See logs for output.
 # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/bond-cni.spec

Test Activity
-------------
[Sanity, Feature Testing, Regression Testing, Developer Testing, Evaluation, Other - Please specify]

Workaround
----------
Describe workaround if available

Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: nobody → Steven Webster (swebster-wr)
tags: added: stx.build stx.networking
Changed in starlingx:
assignee: Steven Webster (swebster-wr) → nobody
Revision history for this message
Ghada Khalil (gkhalil) wrote :

From Scott:
The build passes if bond-cni compiles against golang 1.16.12, it fails if it compiled against golang 1.17.5 or higher. We build both, and under parallel build, it's non-deterministic which golang will complete first, an thereby become available to bond-cni.

bond-cni should add an explicit BuildRequires on golang >= 1.17.5, and then address the build issues.

tags: added: stx.7.0
Changed in starlingx:
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → Steven Webster (swebster-wr)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to integ (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/integ/+/837173

Changed in starlingx:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to integ (master)

Reviewed: https://review.opendev.org/c/starlingx/integ/+/837173
Committed: https://opendev.org/starlingx/integ/commit/d4c56d145fcbeacdbeb13f50bac0e97eb01049db
Submitter: "Zuul (22348)"
Branch: master

commit d4c56d145fcbeacdbeb13f50bac0e97eb01049db
Author: Steven Webster <email address hidden>
Date: Thu Apr 7 20:13:38 2022 -0400

    Enable bond-cni to build with golang 1.17

    This commit fixes an issue that was seen if golang 1.17
    was chosen as the toolchain to build the CNI package.

    The go 1.17.5 build complains that the following vendored
    modules should be explicitly required in the go.mod file:

    github.com/coreos/go-iptables v0.6.0
    github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1
    golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e

    If these are added to the go.mod file, a further complaint
    is given that it no longer matches the information in
    vendor/modules.txt

    The patch files were generated by running go mod tidy for
    the go.mod file, and go mod vendor for the vendor/modules.txt.

    Since the bond-cni uses go 1.17 in the go directive of its
    go.mod file, this commit locks down on this version to attempt
    to prevent other issues from arising from new or other golang
    versions.

    Testing:

    - CentOS build
    - Debian build
    - Spot check of bond-cni functionality on CentOS

    Closes-Bug: 1966728

    Signed-off-by: Steven Webster <email address hidden>
    Change-Id: I14638165db48cda9b89dd666b0c8b7c0a4e8e380

Changed in starlingx:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.