HammerCLI missing bootdisk eventhough it is installed

Problem:
unable to run hammer bootdisk commands and hammer --help does not list bootdisk
Expected outcome:
the ability to run bootdisk commands such as hammer bootdisk host --host node.example.com
Foreman and Proxy versions:
Foreman Version: 3.11.2
Foreman Smart Proxy Version: 3.11.2
Foreman and Proxy plugin versions:

Smart Proxies:

  1. Name:
    Version: 3.11.2
    Status: ok
    Features:
    1. Name: dynflow
      Version: 0.9.2
    2. Name: ansible
      Version: 3.5.5
    3. Name: discovery
      Version: 1.0.5
    4. Name: pulpcore
      Version: 3.3.0
    5. Name: script
      Version: 0.10.6
    6. Name: puppetca
      Version: 3.11.2
    7. Name: puppet
      Version: 3.11.2
    8. Name: logs
      Version: 3.11.2

Plugin versions:

Plugins:

  1. Name: foreman-tasks
    Version: 9.1.1
  2. Name: foreman_ansible
    Version: 14.0.0
  3. Name: foreman_bootdisk
    Version: 21.2.3
  4. Name: foreman_discovery
    Version: 24.0.1
  5. Name: foreman_fog_proxmox
    Version: 0.16.1
  6. Name: foreman_openscap
    Version: 8.0.2
  7. Name: foreman_puppet
    Version: 7.0.0
  8. Name: foreman_remote_execution
    Version: 13.1.0
  9. Name: foreman_templates
    Version: 9.4.0
    10)Name: katello
    Version: 4.13.1

Distribution and version:

Operating System: Red Hat Enterprise Linux 9.4 (Plow)
CPE OS Name: cpe:/o:redhat:enterprise_linux:9::baseos
Kernel: Linux 5.14.0-427.33.1.el9_4.x86_64
Architecture: x86-64

Other relevant data:
as shown in plugin version it does list foreman_bootdisk version 21.2.3 but i’m unable to access the module via hammer cli.

when checking /etc/hammer/cli.modules.d/ there is no mention of bootdisk
only the following

-rw-r--r--. 1 root root   41 Apr  8 20:38 foreman_ansible.yml
-rw-r--r--. 1 root root   40 Apr  9 02:43 foreman_puppet.yml
-rw-r--r--. 1 root root   50 Jan 16  2024 foreman_remote_execution.yml
-rw-r--r--. 1 root root   37 Jan 16  2024 foreman_ssh.yml
-rw-r--r--. 1 root root   39 Apr 17 17:19 foreman_tasks.yml
-rw-r--r--. 1 root root   42 Jan 16  2024 foreman_templates.yml
-rw-r--r--. 1 root root  578 Sep  8 15:11 foreman.yml
-rw-r--r--. 1 root root   35 May 18 00:07 katello.yml

when running hammer -d

i can see the following are loaded

[ INFO 2024-09-12T15:03:47 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2024-09-12T15:03:47 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2024-09-12T15:03:47 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_ansible.yml has been loaded
[ INFO 2024-09-12T15:03:47 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_puppet.yml has been loaded
[ INFO 2024-09-12T15:03:47 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_remote_execution.yml has been loaded
[ INFO 2024-09-12T15:03:47 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_ssh.yml has been loaded
[ INFO 2024-09-12T15:03:47 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_tasks.yml has been loaded
[ INFO 2024-09-12T15:03:47 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_templates.yml has been loaded
[ INFO 2024-09-12T15:03:47 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded

running dnf repoquery -l rubygem-foreman_bootdisk to confirm what files are part of the install there are no mentioned of it touching anything in /etc/hammer/cli.modules.d/.

Its my understanding that hammer loads further modules from cli.modules.d,
is likely to be the cause of the issue or perhaps just another side effect?

You need to install the rubygem-hammer_cli_foreman_bootdisk package for Hammer to work with Bootdisk. Do you have that?

Thank you for responding and apologies for not making that clear,
Yes, rubygem-hammer_cli_foreman_bootdisk is what is installed and was done so via the foreman-installer.

But the installer doesn’t support installing the Bootdisk CLI parts :thinking:

And the rubygem-hammer_cli_foreman_bootdisk package contains /etc/hammer/cli.modules.d/foreman_bootdisk.yml which is missing on your system as per the above paste.

So foreman_plugin_bootdisk isn’t installing rubygem-foreman_bootdisk?

I attempted to install rubygem-foreman_bootdisk today and it said it was already installed,
so i presumed it must have been installed by foreman_plugin_bootdisk.
due to this i made dnf reinstall before posting this issue.

I then proceeded to check what the package was installing using dnf repoquery -l rubygem-foreman_bootdisk and it doesn’t look to touch the module directory.

shouldn’t dnf repoquery -l rubygem-foreman_bootdisk return /etc/hammer/cli.modules.d/foreman_bootdisk.yml if it includes it?

Sure, and it does. That’s the Foreman plugin.

You say rubygem-foreman_bootdisk, that’s the Foreman (server) part of Bootdisk. But I wrote rubygem-hammer_cli_foreman_bootdisk (note the hammer_cli in the package name!), which is the Hammer/CLI part.

1 Like

Thank you,

Totally missed that.