Conversation
|
Errors are Unable to load ticket data |
f31fa70 to
db5ee07
Compare
|
Test stage Build on EL 9 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-19016/2/execution/node/442/log |
|
Test stage Build on EL 9 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-19016/3/execution/node/493/log |
a6ee981 to
b423038
Compare
|
Test stage Functional Hardware Medium Verbs Provider MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-19016/10/execution/node/858/log |
e0cbb87 to
32eb1f3
Compare
6deddc7 to
93864f9
Compare
Consolidate dependency installation, dependency builds, DAOS builds, package generation, and RPM verification under utils/build. Use these entry points consistently from Jenkins, Docker builds, and bare-host workflows while retaining support for custom scons options. By default, generate dependency and DAOS RPMs directly under <repo_root>/rpms/deps and <repo_root>/rpms/daos, respectively, and create repository metadata under <repo_root>/rpms/repodata. Allow RPM_OUTPUT_DIR to override the repository root. Add distro auto-detection, optional external dependency repositories, and configurable package-verification severity. Remove the superseded wrappers from ci/rpm and utils/rpms. Update Jenkins to copy dependency RPMs produced in the Docker build image into the workspace repository so that dependency and DAOS RPMs are included in the artifact upload. skip-cancel-previous-builds: true skip-python-bandit-check: true skip-unit-tests: true skip-test: true skip-test-hardware: true skip-functional-on-leap-15: false Priority: 2 Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com>
Document the shared scripts for installing dependencies, building DAOS, generating packages, and creating a complete RPM repository. Update Docker examples and packaging script paths to match the new layout. Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com> skip-cancel-previous-builds: true skip-python-bandit-check: true skip-unit-tests: true skip-test: true skip-test-hardware: true skip-functional-on-leap-15: false
Move distro detection from build_packages.sh to build_utils.sh so it can also be reused by install_deps.sh. Propagate detection failures explicitly from command substitutions and avoid importing variables from /etc/os-release into the calling shell. Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com> Priority: 2
93864f9 to
9d48806
Compare
Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com> Priority: 2
| ARG DAOS_TARGET_TYPE= | ||
| ARG DEPS_JOBS= | ||
|
|
||
| ARG DAOS_BUILD_TYPE=$DAOS_TARGET_TYPE |
There was a problem hiding this comment.
Why these arguments are named differently by mean the same thing? 😕
| utils/build/build_deps.sh \ | ||
| ${DEPS_JOBS:+--jobs "$DEPS_JOBS"} \ | ||
| ${DAOS_BUILD_TYPE:+BUILD_TYPE="$DAOS_BUILD_TYPE"} \ | ||
| ${DAOS_TARGET_TYPE:+TARGET_TYPE="$DAOS_TARGET_TYPE"} && \ |
There was a problem hiding this comment.
Does truely the cleanup step depend on the build step hence you need && ?
There was a problem hiding this comment.
It is not about cleanup it is about failing the whole Docker step.
| [ "$DAOS_KEEP_BUILD" != "no" ] || { \ | ||
| rm -rf .sconf_temp .sconsign.dblite config.log && \ | ||
| ([ "$DAOS_KEEP_BUILD" != "no" ] || /bin/rm -rf build *.gz); \ | ||
| /bin/rm -rf build *.gz; \ |
There was a problem hiding this comment.
- Indentation.
/bin/rmseriously?- You can probably combine both calls.
| /bin/rm -rf build *.gz; \ | |
| rm -rf .sconf_temp .sconsign.dblite config.log build *.gz; |
| ARG DAOS_DEPS_BUILD | ||
| ARG DAOS_BUILD=$DAOS_DEPS_BUILD | ||
| ARG DAOS_JAVA_BUILD=$DAOS_BUILD | ||
| ARG DAOS_JAVA_BUILD=no |
There was a problem hiding this comment.
Redundant?
| ARG DAOS_JAVA_BUILD=no | |
| ARG DAOS_JAVA_BUILD |
| mkdir -p /home/daos/daos/src && \ | ||
| cp -r /tmp/daos-src/. /home/daos/daos/src && \ |
There was a problem hiding this comment.
Indentation.
| mkdir -p /home/daos/daos/src && \ | |
| cp -r /tmp/daos-src/. /home/daos/daos/src && \ | |
| mkdir -p /home/daos/daos/src && \ | |
| cp -r /tmp/daos-src/. /home/daos/daos/src && \ |
|
Test stage Functional Hardware Medium Verbs Provider MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-19016/36/execution/node/1869/log |
Replace positional build and verification modes with named options: --build-range, --rpm-suffix, -Werror, and -Wno-error. Make the package output directory optional and update all Jenkins and Docker callers accordingly. Update dependency and verification script usage documentation, support command-line BUILD_TYPE cleanup with --force, fix Docker ownership and RPM output path handling, and synchronize the development guide with the new interfaces. Address review comments. Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com>
Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com> Doc-only: true Priority: 2 skip-cancel-previous-builds: true
|
Test stage Functional Hardware Medium Verbs Provider MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-19016/37/execution/node/1745/log |
knard38
left a comment
There was a problem hiding this comment.
Mostly looks good to me.
Some points to clarify and/or fix.
| BUILD_TYPE=*) | ||
| build_type="${arg#BUILD_TYPE=}" | ||
| ;; |
There was a problem hiding this comment.
From my understanding scons prefers TARGET_TYPE over BUILD_TYPE for naming the real prereq directory whenever TARGET_TYPE is set to anything other than default (site_scons/prereq_tools/base.py's _setup_build_type()), and this script has no TARGET_TYPE=* case at all.
If I am correct, this is what it should looks like in practice:
$ utils/build/build_deps.sh --force TARGET_TYPE=debug
Removing "/opt/daos/prereq/release" # untouched artifacts, wiped anyway
Removing "build/external/release" # same
...
# scons then builds with TARGET_TYPE=debug, i.e. into
# prereq/debug/ -- the one directory --force never cleaned
So --force wipes the wrong (release) tree and leaves the one that's actually about to be (re)built (debug) alone -- the opposite of what -f/--force promises.
A possible fix could be to mirroring scons's own precedence (prefer TARGET_TYPE when given, else fall back to BUILD_TYPE):
target_type=""
build_type=release
for arg in "$@"; do
case "$arg" in
...
BUILD_TYPE=*)
build_type="${arg#BUILD_TYPE=}"
;;
TARGET_TYPE=*)
target_type="${arg#TARGET_TYPE=}"
;;
esac
done
ttype="${target_type:-$build_type}"
# ... then use "${ttype}" instead of "${build_type}" in
# both rm -rf lines below| ;; | ||
| esac | ||
| done | ||
| verify_mode="${verify_mode:--Werror}" |
There was a problem hiding this comment.
From my understanding, the Jenkins bare-host "Build DAOS RPMs" step calls with no -Werror/-Wno-error flag (line 853 and 919 of the Jenkinsfile), so it runs with the script's own default (-Werror, strict).
Meanwhile both Docker-image RPM-build steps explicitly do:
set -- --build-range=daos /home/daos/rpms;
[ "$DAOS_PACKAGES_VERIFY" = "yes" ] || set -- "$@" -Wno-error;
Thus, they stay lenient by default unless DAOS_PACKAGES_VERIFY=yes is explicitly set. From my investigation, I was not able to find usage of this last variable. If I am correct, the rpm used by the Jenkins bare host and the one from the docker image are not consistent.
Should the bare-host call also pass -Wno-error for parity, or is stricter-by-default intentional here?
There was a problem hiding this comment.
The goal is to let Dockerfile user to disable RPMs validation.
The default behavior is to verify RPMs and the way to disable it (but still get warnings is something is wrong) is to use --build-arg DAOS_PACKAGES_VERIFY=no
|
|
||
|
|
||
| # The script can be used only on el9 and leap/sles 15 | ||
| validate_rpm_suffix() { |
There was a problem hiding this comment.
Could we put this function in build_utils.sh and replace equivalent inline code in verify_packages.sh and build_packages.sh ?
There was a problem hiding this comment.
Do You mean install_deps.sh?
The build_package.sh script can also be used for Debian/Ubuntu:
OUTPUT_TYPE=deb ./utils/build/build_packages.sh --build-range=deps
validate_rpm_suffix() has been moved to build_utils.sh -> c88d6fe
| case "$arg" in | ||
| -c) | ||
| scons -c | ||
| exit 0 | ||
| ;; |
There was a problem hiding this comment.
| case "$arg" in | |
| -c) | |
| scons -c | |
| exit 0 | |
| ;; | |
| -c) | |
| scons -c | |
| rm -rf .sconf_temp .sconsign.dblite config.log build .build_vars.sh .build_vars.json | |
| exit 0 | |
| ;; | |
| --full-clean) | |
| scons -c | |
| rm -rf .sconf_temp .sconsign.dblite config.log build .build_vars.sh .build_vars.json daos.conf | |
| exit 0 | |
| ;; |
From my experience, the scons -c is not fully reliable. To have a proper cleanup, I have to remove some files generated by the build process. Most of the time, I am doing a full cleanup with removing the daos.conf file generated: without this it reuse the initial setting even if I redefine it on the command line.
However, I am not sure of the exact goal behind the -c that you aim ?
| make sure the file is referenced by the | ||
| `RPM_CHANGELOG="<component>.changelog"` variable in `utils/rpms/<component>.sh`. | ||
|
|
||
| ## Unified DAOS Build Procedure |
There was a problem hiding this comment.
From my understanding, most of these new scripts are not yet supporting Debian like distribution.
It should be valuable, to clearly to define the status of the support of such distribution.
From my side, I am still able to build Debian package as before and thus I have not detected regression.
- Align build and dependency script usage messages. - Handle help and clean options directly in each script. - Validate supported RPM suffixes through shared helpers. - Use SCons defaults for build_daos dependency handling. - Improve dependency cleanup for BUILD_TYPE and TARGET_TYPE. - Reuse build_daos cleanup in the EL9 and Leap Dockerfiles. - Clarify supported distributions and build-script behavior in the docs. - improving the help content - usage() Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com>
- Add full-clean support to build_daos.sh while preserving build metadata for the regular clean path. - Keep Docker dependency-stage cleanup independent of the full DAOS source tree and preserve build variables required for RPM packaging. - Suppress unnecessary RPM packaging xtrace output. - Improve usage formatting for build and dependency scripts. - Clarify RPM suffix, dependency installation, verification, and cleanup documentation. - Make read-only site_scons cache cleanup non-fatal. Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com>
Summary
Consolidate dependency installation, dependency builds, DAOS builds,
package generation, and RPM verification under utils/build. Use these
entry points consistently from Jenkins, Docker builds, and bare-host
workflows while retaining support for custom scons options.
By default, generate dependency and DAOS RPMs directly under
<repo_root>/rpms/deps and <repo_root>/rpms/daos, respectively, and
create repository metadata under <repo_root>/rpms/repodata. Allow
RPM_OUTPUT_DIR to override the repository root.
Add distro auto-detection, optional external dependency repositories,
and configurable package-verification severity. Remove the superseded
wrappers from ci/rpm and utils/rpms.
Update Jenkins to copy dependency RPMs produced in the Docker build
image into the workspace repository so that dependency and DAOS RPMs
are included in the artifact upload.
Changes
utils/buildscripts for:ci/rpmandutils/rpms/build_packages.shwrappers.DAOS_DEPS_EXT_REPOfor theinstall_deps.shscript (to be used mainly as bare-host builds pre-step).sconsinbuild_daos.shandbuild_deps.shscripts.Package verification
Package verification runs automatically after each nonempty RPM group.
verify=yestreats validation findings as errors.verify=noreports validation findings as warnings.Requires:
Steps for the author:
After all prior steps are complete: