ceph is rebuilt although there is no change

Bug #1830130 reported by Lin Shuicheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Scott Little

Bug Description

Brief Description
-----------------
After sync latest code with new upgraded ceph. Although I have run build-pkgs successfully, if I run build-pkgs again, ceph will be rebuilt although there is no change. And ceph rebuild will cause about 1 hour.

Severity
--------
Minor.
This is just affect build time.

Steps to Reproduce
------------------
1. Sync clean latest code.
2. run "build-pkgs", ensure it could run successfully.
3. run "build-pkgs" again.

Expected Behavior
------------------
The 2nd "build-pkgs" should finish quickly, since only no srpm need be rebuilt.

Actual Behavior
----------------
ceph will be rebuilt in build-srpm stage, and lead to 1 hour build for build-rpm stage.
Here is the log
"
02:57:21 b2: ===== Build SRPM for 'ceph' =====
02:57:21 b2: PKG_BASE=/localdisk/designer/slin14/starlingx/cgcs-root/stx/stx-integ/ceph/ceph
02:57:21 b2: WORK_BASE=/localdisk/loadbuild/slin14/starlingx/std/inputs/stx/stx-integ/ceph/ceph
02:57:21 b2: RPMBUILD_BASE=/localdisk/loadbuild/slin14/starlingx/std/inputs/stx/stx-integ/ceph/ceph/rpmbuild
02:57:21 b2: Wrote: /localdisk/loadbuild/slin14/starlingx/std/rpmbuild/SOURCES/ceph/srpm_input.md5
02:57:21 b2: Rebuild required due to new or changed file: stx/git/ceph/src/.git_version
02:57:21 b2: MAKE_SRPM=centos/build_srpm
02:57:21 b2: DATA=centos/build_srpm.data
......
"

Reproducibility
---------------
100% with clean latest code.

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

Branch/Pull Time/Commit
-----------------------
N/A

Last Pass
---------
N/A

Timestamp/Logs
--------------
N/A

Test Activity
-------------
Developer Testing

Changed in starlingx:
assignee: nobody → Lin Shuicheng (shuicheng)
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/660867

Changed in starlingx:
status: New → In Progress
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Marking as low priority; build optimization; would be nice to fix, but does not gate any starlingx release.

tags: added: stx.build
Changed in starlingx:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on integ (master)

Change abandoned by Lin Shuicheng (<email address hidden>) on branch: master
Review: https://review.opendev.org/660867
Reason: Abandon it since there is another patch to track this issue: https://review.opendev.org/661297

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to integ (master)

Reviewed: https://review.opendev.org/661297
Committed: https://git.openstack.org/cgit/starlingx/integ/commit/?id=663edb4567ad869227fcd0b02f259cb7e71300e3
Submitter: Zuul
Branch: master

commit 663edb4567ad869227fcd0b02f259cb7e71300e3
Author: Scott Little <email address hidden>
Date: Wed May 22 16:48:06 2019 -0400

    Ceph build script improvements to prevent needless rebuilds

    Problem: The file $SRC_DIR/src/.git_version is created by the
    custom build script and is not cleaned upon exit. The presence
    of the new file under $SRC_DIR will trigger a rebuild on the
    next iteration.

    Solution: Add a cleanup of the file to cover the normal exit case.
    This means $SRC_DIR/src/.git_version will not be present at the
    start of the next build.

    Problem: A lot of tarballs are copied into the build by the
    build script, rather than being listed in the COPY_LIST. This
    breaks the md5 checksum mechanism used to determine if a rebuild
    is required. A change to a tarball will be ignored and not
    trigger a rebuild.

    Solution: Move the code that generates the list of input tarballs
    into build_srpm.data. The file is sourced, so COPY_LIST can
    be populated dynamically.

    Problem: Script returns success when rpmbuild fails.

    Solution: Propogate the error code to the final exit.

    Change-Id: I2e760c24ecd3ce2d237863b948863c2a876d24fa
    Closes-Bug: 1830130
    Co-authored-by: Shuicheng Lin <email address hidden>
    Signed-off-by: Scott Little <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Adding the stx.2.0 release tag since the fix was merged for that release.

tags: added: stx.2.0
Changed in starlingx:
assignee: Lin Shuicheng (shuicheng) → Scott Little (slittle1)
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.