Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-77651

[openshift-4.22] hermetic build failure - node-feature-discovery

    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • All
    • Rejected
    • None
    • In Progress
    • Release Note Not Required
    • Release Note Not Required
    • None
    • None
    • None
    • None

      Description of problem:

        Node Feature Discovery build fails in hermetic mode due to non-deterministic binary path handling in Dockerfile. The build uses "go install" command which places binaries in unpredictable GOPATH locations, and the Dockerfile copies from multiple inconsistent paths causing binary path conflicts.
        

      Version-Release number of selected component (if applicable):

        OpenShift Container Platform 4.19+
        node-feature-discovery component across all affected versions
        

      How reproducible:

        Always - when building node-feature-discovery in hermetic mode
        

      Steps to Reproduce:

        1. Build node-feature-discovery container in hermetic mode
        2. Dockerfile copies binaries from multiple paths: /go/bin/* and /go/node-feature-discovery/bin/*
        3. "go install" command places binaries in non-deterministic GOPATH locations during hermetic build process
        

      Actual results:

        Build fails because binaries are placed in unpredictable locations by "go install" and Dockerfile attempts to copy from multiple conflicting paths
      
        Error: Inconsistent binary placement causing copy failures during Docker image build process when switching from "go install" to "go build" in
        hermetic mode
        

      Expected results:

        Build succeeds using deterministic binary paths. Should use "go build" with explicit output paths instead of "go install" and copy binaries from single consistent location in Dockerfile.
        

      Additional info:

        Root cause: "go install" command places binaries in GOPATH-dependent locations that are not deterministic in hermetic builds, unlike "go build"
         which allows explicit output path control.
      
        Fix implemented: Remove redundant /go/bin/* copy command from Dockerfile and keep only the specific /go/node-feature-discovery/bin/* path. This
         ensures consistent binary placement and eliminates path conflicts during hermetic builds.
      
        Reference upstream work: https://github.com/openshift/node-feature-discovery/pull/163/changes
        Related hermetic conversion tracking: ART-14586
        

              yshnaidm Yevgeny Shnaidman
              lgarciaac Luis GarcĂ­a Acosta
              Wei Duan Wei Duan
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: