Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPEC file in git produces uninstallable RPM on RHEL/Rocky 9 #3655

Open
cinnion opened this issue Mar 9, 2024 · 4 comments
Open

SPEC file in git produces uninstallable RPM on RHEL/Rocky 9 #3655

cinnion opened this issue Mar 9, 2024 · 4 comments
Labels
3.3.4 Release 3.3.4 Bug Report Reporting a bug

Comments

@cinnion
Copy link

cinnion commented Mar 9, 2024

Describe the bug

The SPEC file found in the repository produces a RPM file which cannot be used on RHEL 9 or Rocky Linux 9. There is no longer any package which provides fence-agents, either as a real package or the metapackage it was. The result is as follows:

[root@host rpm-build]# dnf install cobbler-3.3.4-1.el9.noarch.rpm 
Last metadata expiration check: 1:59:17 ago on Sat 09 Mar 2024 01:32:17 PM EST.
Error: 
 Problem: conflicting requests
  - nothing provides fence-agents needed by cobbler-3.3.4-1.el9.noarch from @commandline
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Inspecting the differences between the SPEC file used for the RPM in the EPEL 9 repository and what is in git reveals that what is in git has no resemblance to what is in git. This should be resolved so that the same file is found in both places.

Steps to reproduce

  1. Build the RPMs from git by doing make rpms
  2. Attempt to install the rpm using dnf using the command dnf install cobbler-3.3.4-1.el9.noarch.rpm

Expected behavior

The RPM should install, along with its missing dependencies.

Cobbler version

[root@pell rpm-build]# cobbler version
Cobbler 3.3.4
  source: ?, ?
  build time: Mon Feb 26 00:00:00 2024

(from the EPEL RPM)

Operating system

Verified on the following:
Red Hat Enterprise Linux release 9.2 (Plow)
Red Hat Enterprise Linux release 9.3 (Plow)
Rocky Linux release 9.3 (Blue Onyx)

Cobbler log

Screenshots

Additional information

@cinnion cinnion added the Bug Report Reporting a bug label Mar 9, 2024
@opoplawski
Copy link
Contributor

Some notes:

  • Cobbler and Fedora/EPEL are completely different projects with different requirements and so it is likely that the spec files will be different. Cobbler upstream may want to support many different RPM based distros. That said, cobbler's spec file should produce usable RPMs where supported.
  • It looks like cobbler check explicitly looks for /usr/bin/fence_ilo which is provided by the fence-agents-ilo2 package on Fedora Rawhide.
  • In Fedora fence-agents is provided by fence-agents-all which brings in all of the fence-agents sub-packages.
  • get_power_types() looks for all of the installed /usr/bin/fence_* binaries, and validate_power_type() will complain if the power type is not installed and suggest installing fence-agents if none are.
  • RHEL9 only ships a few fence agents and not the fence-agents-all package. EPEL ships a few more, but not a fence-agents-all package as well.
  • I don't know how other distros package the fence agents.

So, what to do? I think it's futile to refer to package names in the cobbler code - they can change too much. I think the cobbler messages should be changed to something like:

  • validate_power_types(): Excecutable fence_TYPE was not found. Installed power management types are: ... Other power management types may be available, check your distribution repositories.
  • cobbler check: Check for all fence_* - report as available power types. If none found Warning: no fencing tools were found and are required to use the (optional) power management features. install the desired fence_* executables from your distribution repositories.

As for the spec file file, we dropped the Requires: fence-agents a long time ago in the Fedora package. Im not sure a Suggests` is particularly warranted either, except perhaps on some very commonly used and universally available agents.

@SchoolGuy
Copy link
Member

I agree with most of what @opoplawski said, sadly I would like to note that fence-agents is one of those packages that if not available the whole power management makes no sense. Also, the validation that we perform will cause Cobbler to not function if a package is for example removed during an update.

Moving the Power Management into a plugin doesn't make much sense in my eyes as without power management the PXE workflow is - in an automated manner - impossible. If needed by the community I can link the fence-agents that openSUSE/SLES ships and build them for RHEL/Rocky as well but they won't be maintained very well as I can't do all the things.

@opoplawski
Copy link
Contributor

cobbler definitely shouldn't be shipping the fence agents. In EPEL we can work on having cobbler pull in the fence agents that are available.

@SchoolGuy SchoolGuy added the 3.3.4 Release 3.3.4 label Mar 15, 2024
@SchoolGuy
Copy link
Member

@cinnion I do agree that this bug is unfortunate for you but as long as you don't do any power operations this shouldn't have an effect on your Cobbler instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.3.4 Release 3.3.4 Bug Report Reporting a bug
Projects
Status: Todo
Development

No branches or pull requests

3 participants