Hammer bootdisk subnet missing

Problem:
I have installed my bootdisk plugin with RPM method :

  1. yum install tfm-rubygem-foreman_bootdisk / tfm-rubygem-hammer_cli_foreman_bootdisk
  2. systemctl restart httpd
  3. foreman-rake db:migrate
  4. foreman-rake db:seed
    but subcommand hammer bootdisk subnet is missing.

We have satellite infrastructure too and on my satellite server I have subcommand subnet. The only difference is plugin bootdisk version (0.1.3.3)

Expected outcome:
I have a subcommand subnet like this :

# hammer bootdisk
Usage:
    hammer bootdisk [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 generic                       Download generic image
 host                          Download host image
 subnet                        Download subnet generic image

Options:
 -h, --help                    Print help

Foreman and Proxy versions:
1.20

Foreman and Proxy plugin versions:

# rpm -qa | grep hammer
tfm-rubygem-hammer_cli_foreman_docker-0.0.4-4.el7.noarch
tfm-rubygem-hammer_cli_foreman_virt_who_configure-0.0.3-3.el7.noarch
tfm-rubygem-hammer_cli_katello-0.15.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-7.el7.noarch
tfm-rubygem-hammer_cli-0.15.1-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.13-1.fm1_20.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.15.1-1.el7.noarch

Other relevant data:
On my foreman server :

# hammer bootdisk -h
Usage:
    hammer bootdisk [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 generic                       Download generic image
 host                          Download host image

Options:
 -h, --help                    Print help

@mbacovsky any idea?

The subnet subcommand seems to be present on git repository but not in RPM files :

RPM files :

# cat bootdisk.rb.save
module HammerCLIForemanBootdisk
  class Bootdisk < HammerCLIForeman::Command
    resource :disks

    class GenericCommand < HammerCLIForemanBootdisk::DownloadCommand
      action :generic

      command_name    'generic'
      success_message _('Successfully downloaded generic disk image to %s')
      failure_message _('Failed to download generic disk image')

      build_options
    end

    class HostCommand < HammerCLIForemanBootdisk::DownloadCommand
      action :host

      command_name    'host'
      success_message _('Successfully downloaded host disk image to %s')
      failure_message _('Failed to download host disk image')

      build_options
    end

    autoload_subcommands
  end
end

# cat version.rb
module HammerCLIForemanBootdisk
  def self.version
    @version ||= Gem::Version.new '0.1.3'
  end
end

There is one technical issue with this gem, we lost permissions to rubygems few years back. The changes were backported into Satellite but we are still unable to push changes there. I’ve created a request for the rubygems repository:

https://rubygems.org/gems/hammer_cli_foreman_bootdisk

Here it is:

https://help.rubygems.org/discussions/problems/36517-push-access-to-httpsrubygemsorggemshammer_cli_foreman_bootdisk

Thanks for your help. OK, I have to wait until the packages are updated ?

@lzap I’ve made sure our theforeman rubygems account has access to that gem. Ping me or others with that account (@tbrisker and @Ori_Rabin AFAIK) offline if your account needs push access as well.

Thanks. Well it does not work for me:

[lzap@box hammer-cli-foreman-bootdisk]$ gem push hammer_cli_foreman_bootdisk-0.3.0.gem
Pushing gem to https://rubygems.org...
You do not have permission to push to this gem. Ask an owner to add you with: gem owner hammer_cli_foreman_bootdisk --add lzap@redhat.com

Done

1 Like

Now it works. Thanks.

Thanks for all guys :heart:

And what about this repo ? https://yum.theforeman.org/plugins/1.22/el7/x86_64/

I guess it is not up to date?

We first update nightly and then cherry pick it into a release branch if appropriate. The nightly PR I just merged. It’ll be up to @lzap to request a cherry pick.

Can you just use RPM from nightlies @Julie? This is not fatal issue so we might save some extra effort in backporting this if you don’t mind.

Okey, no problem @lzap.

Tanks for your help.