#708 cbs image-build fails on `Module or Group 'wrapper-rpm-build' is not available.`
Closed: Wrong tracker 2 years ago by zlopez. Opened 2 years ago by sbonazzo.

While building ovirt-node-ng-image, cbs image-build fails on

DEBUG util.py:444:  Module or Group 'wrapper-rpm-build' is not available.

logs showing the error: https://cbs.centos.org/kojifiles/work/tasks/1003/2721003/root.log
from task: https://cbs.centos.org/koji/taskinfo?taskID=2720969


Metadata Update from @arrfab:
- Issue tagged with: cbs, medium-gain, medium-trouble

2 years ago

Hi @sbonazzo, can you give us more information about how you are building it?

Just running cbs image-build --config build.cfg passing the build.cfg generated by running the build.sh script in https://github.com/oVirt/ovirt-node-ng-image/tree/master/cbs a sample here:

[image-build]
name: ovirt-node-ng-image
version: 4.5.0
release: 20220321152303.1
scratch: True
target: virt8s-ovirt-45-el8s
install_tree: http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/
arches: x86_64
# Note:
# - distro refers to the plugin name within oz, it's passed as command parameter to "cbs image-build"
distro: Fedora-29
# - ksversion refer to pykickstart handler
# Within CBS RHEL 9 is not supported and so F29 and later.
# Going with F28 head to having anaconda requiring inst prefix to all commands within the kickstart.
# Trying again without  metalink which is unsupported in F24
ksversion: F24
kickstart: ovirt-node-ng-image.ks
specfile: git+https://git.centos.org/rpms/ovirt-node-ng-image.git#b84d9c4366519b75de1041dd878c6ec7ed0ec16d
format: liveimg-squashfs
disk_size: 10
# assuming things built within CBS will be available
repo: http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/,http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/,http://mirror.centos.org/centos/8-stream/extras/x86_64/os/,http://mirror.centos.org/centos/8-stream/virt/x86_64/ovirt-45/,https://buildlogs.centos.org/centos/8-stream/virt/x86_64/ovirt-45/,http://mirror.centos.org/centos/8-stream/storage/x86_64/gluster-10/,https://buildlogs.centos.org/centos/8-stream/cloud/x86_64/openstack-yoga/,http://mirror.centos.org/centos/8-stream/cloud/x86_64/openstack-xena/,http://mirror.centos.org/centos/8-stream/opstools/x86_64/collectd-5/,http://mirror.centos.org/centos/8-stream/storage/x86_64/ceph-pacific/,http://mirror.centos.org/centos/8-stream/nfv/x86_64/openvswitch-2/,http://mirror.centos.org/centos/8-stream/PowerTools/x86_64/os/,https://buildlogs.centos.org/centos/8-stream/extras/x86_64/extras-common/

and kickstart like https://github.com/oVirt/ovirt-node-ng-image/blob/ovirt-4.5/cbs/sample/ovirt-node-ng-image.ks

#
# THIS KICKSTART IS ONLY USED FOR BUILDING OVIRT NODE
#
#              NOT FOR INSTALLATION
#

url --url=http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/


lang en_US.UTF-8
keyboard us
timezone --utc Etc/UTC
network --noipv6
auth --enableshadow --passalgo=sha512
selinux --enforcing
rootpw --lock
firstboot --reconfig
clearpart --all --initlabel
bootloader --timeout=1
part / --size=5120 --fstype=ext4 --fsoptions=discard
poweroff


%packages --excludedocs --ignoremissing --excludeWeakdeps
dracut-config-generic
-dracut-config-rescue
dracut-live
python36
centos-stream-repos
scap-security-guide
centos-release-ovirt45
cockpit
ovirt-release-host-node
ovirt-node-ng-image-update-placeholder
-ovirt-node-ng-image-update
%end


%post --erroronfail
set -x
mkdir -p /etc/yum.repos.d

# For build issues debugging purpose, looking for known repositories
dnf repolist

# And not enabled repositories!
dnf repolist disabled

# Adding upstream oVirt vdsm
# 1. Install oVirt release file with repositories
dnf config-manager --set-enabled powertools || true


yum -y --nogpgcheck --nodocs --setopt=install_weak_deps=False distro-sync



# Adds the latest cockpit bits
yum install --nogpgcheck --nodocs --setopt=install_weak_deps=False -y cockpit

# 1.a Ensure that we use baseurls to ensure we always pick
#     the most recent content (right after repo composes/releases)
sed -i "/^mirrorlist/ d ; s/^#baseurl/baseurl/" $(find /etc/yum.repos.d/*ovirt*.repo -type f ! -name "*dep*")

# Try to work around failure to sync repo
dnf clean all
rm -rf /var/cache/dnf

# 2. Install oVirt Node release and placeholder
# (exclude ovirt-node-ng-image-update to prevent the obsoletes logic)
yum install -y --nogpgcheck --nodocs --setopt=install_weak_deps=False \
  --exclude ovirt-node-ng-image-update \
  ovirt-release-host-node \
  ovirt-node-ng-image-update-placeholder

# let VDSM configure itself, but don't have the file owned by any package, so we pass 'rpm -V'
touch /var/lib/ngn-vdsm-need-configure

# Postprocess (always the last step)
imgbase --debug --experimental \
  image-build \
  --postprocess \
  --set-nvr=$(rpm -q --qf "ovirt-node-ng-%{version}-0.$(date +%Y%m%d).0" ovirt-release-host-node)
%end
%post
ver=$(rpm -qf /etc/yum.repos.d/ovirt* | grep ^ovirt-release | sort -u | sed 's/ovirt-release//' | cut -b1)
[[ $ver = "-" ]] && ver="m"
ln -sf /usr/share/xml/scap/ssg/content/{ssg-rhel8,ssg-onn$ver}-ds.xml

%end

Hi @sbonazzo : I think the undelying question was more about what you're trying to build and so why using "image-build" task. It seems there is no really useful doc at koji level for the "wrapper-rpm-build" group. At first sight, I'd say that it's a group or rpm packages that need to be installed in the buildroot, but my question is : to do what ?
I see the image task itself was ok, so what is the wrapperRPM task doing ? Any hint/info at koji side ?

Within oVirt we produce a firmware-like version of CentOS Stream, pre-installed in a read only squashfs which is installed on the system by flashing a LVM partition. Upgrades from one version to next one happens by flashing a new LVM while keeping the older one to be able to rollback to previous version.

This squashfs image is wrapped in a RPM so it can be used also for upgrading to next version by feeding imgbased system for allowing to upgrade oVirt Node from one version to next one.

The RPM is also used in the process of creating oVirt Node ISO (which will be next step once the wrapper rpm here is buildable) as we have a special flavor of anaconda configuration to allow this firmware-like installation.

The wrapper-rpm-build group seems to contain only a few packages (from a downstream equivalent build):

DEBUG util.py:636:  Installing group/module packages:
DEBUG util.py:636:   bash                        x86_64 4.4.20-2.el8                    build 1.5 M
DEBUG util.py:636:   coreutils                   x86_64 8.30-12.el8                     build 1.2 M
DEBUG util.py:636:   redhat-ca-certificate       noarch 1.1.0-2.el8eng                  build 8.2 k
DEBUG util.py:636:   redhat-release              x86_64 8.5-0.8.el8                     build  43 k
DEBUG util.py:636:   redhat-rpm-config           noarch 125-1.el8                       build  85 k
DEBUG util.py:636:   rhpkg-simple                noarch 1.17-1.el8eng                   build  11 k
DEBUG util.py:636:   rpm-build                   x86_64 4.14.3-19.el8_5.2               build 173 k
DEBUG util.py:636:   shadow-utils                x86_64 2:4.6-14.el8                    build 1.2 M
DEBUG util.py:636:   tar                         x86_64 2:1.30-5.el8                    build 837 k
DEBUG util.py:636:   unzip                       x86_64 6.0-45.el8                      build 194 k

which seems to be the bare minimum to generate a src.rpm . The next step will automatically fetch the src.rpm dependencies and build the final wrapper rpm.

Thanks for the info @sbonazzo , it helps understanding what that task is meant for :-)
So @phsmoura and myself have created the wrapper-rpm-build group, now attached to your virt8s-ovirt-45-el8s-build :

cbs show-groups virt8s-ovirt-45-el8s-build|grep displ
  'display_name': 'build',
  'display_name': 'srpm-build',
  'display_name': 'wrapper-rpm-build',

And we resubmitted your task and new taskID is the following one :
https://cbs.centos.org/koji/taskinfo?taskID=2732704

Let's see if that solves the issue and if does, we'll just update our doc and tag creation script to automatically add the wrapper-rpm-build group to new tags

Looks like it still failed on the missing group:

DEBUG util.py:444:  Module or Group 'wrapper-rpm-build' is not available.

https://cbs.centos.org/kojifiles/work/tasks/2728/2732728/root.log

Perhaps missing a regen repo?

yes, we kicked initially the resubmit task "too early" but after the regen-repo it's now different :

https://cbs.centos.org/koji/taskinfo?taskID=2732763

BuildError: no spec file template found at URL: git+https://git.centos.org/rpms/ovirt-node-ng-image.git#b84d9c4366519b75de1041dd878c6ec7ed0ec16d

So worth verifying which "template" it's expecting in the git repo. Do you have pointers to koji doc about this ?

I couldn't find documentation about it, but I changed the dist-git from spec to spec.tmpl and applied the same variable substitution we are using in downstream builds:
- https://git.centos.org/rpms/ovirt-node-ng-image/c/3f16f8c51b1ff9aa8666c657343d2d0875d5ba1b?branch=c8-sig-virt-8
- https://github.com/oVirt/ovirt-node-ng-image/commit/beace6fc59ed684d874840d885ae2f6aa9cb2f87

Testing the change here: https://cbs.centos.org/koji/taskinfo?taskID=2733684

Failed with error: Bad source: /builddir/build/SOURCES/ovirt-node-ng-image-4.5.0.tar.gz: No such file or directory, need to try dropping it from the spec.tmpl.

@sbonazzo : it seems you modified the .spec but now without Source0:
From https://cbs.centos.org/kojifiles/work/tasks/7125/2737125/build.log :

error: No "Source:" tag in the spec file

So wondering if the Source1 should become Source: or Source0: (and so be parsed by the rpm wrapper task). Having some kind of "doc" around that task would help though. Do you know someone from Koji team who can help ? and bonus point to have then online documentation about it ? :)

yes, my fault, fixing this.

[backlog refinement]
@sbonazzo Does ovirt still need this resolved?

[backlog refinement]
We don't think this issue is related to technical issue in CentOS Infra I'm closing this as an Invalid tracker.
If you think this is wrong, please reopen the issue.

Metadata Update from @zlopez:
- Issue close_status updated to: Wrong tracker
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata
Boards 1
CBS Status: Backlog