Hammer tab-completion not working

when I try tab-completion in hammer I get this error:

environment command is deprecated and will be removed in one of the future versions. Please use puppet-environment command instead.
report command is deprecated and will be removed in one of the future versions. Please use config-report command instead.
Error: uninitialized constant HammerCLIKatello::LifecycleEnvironmentNameResolvable
Did you mean?  HammerCLIKatello::LifecycleEnvironmentNameMapping

Expected outcome:
hammer tab-completion works

Foreman and Proxy versions:


Distribution and version:

CentOS Linux release 7.8.2003 (Core)

Other relevant data:

As I only plan to use ansible I didn’t installed puppet. These are the specific options I used for the installer:


# create dummy puppet group to workaround this bug
# https://projects.theforeman.org/issues/16241
grep puppet /etc/group &> /dev/null  ||  groupadd --gid 5000 puppet

sudo foreman-installer \
--no-colors \
--tuning medium \
--puppet-server=false \
--puppet-server-ca=false \
--no-enable-puppet \
--enable-foreman-cli-ansible \
--enable-foreman-plugin-ansible \
--enable-foreman-proxy-plugin-ansible \
--foreman-proxy-manage-puppet-group=false \
--foreman-proxy-content-puppet=false \
--foreman-proxy-puppet=false \
--foreman-proxy-puppetca=false \
--foreman-proxy-tftp=false \
--foreman-email-smtp-address="my.smtp.com" \
--foreman-initial-admin-email="admin@email.com" \
--foreman-initial-admin-password="xXXXXxxxXXXX" \
--foreman-initial-organization="my_org" \
--foreman-initial-location="my_location" \
--scenario katello

I have found other similar bug reports (https://bugzilla.redhat.com/show_bug.cgi?id=1730026) and I also experience the same issue when executing hammer docker manifest list

I have also posted this bug report to Bug #29661: hammer tab-completion crash - Hammer CLI - Foreman but as there was no activity in some days I decided to also post it here. Please feel free to delete this post if it’s not allowed.


HI @Pablo_Escobar,

Which version of hammer-cli-foreman-docker do you use? You can run hammer --version to list installed plugins.

These are the versions I have:

# hammer --version
hammer (2.0.0)
 * hammer_cli_foreman (2.0.2)
 * hammer_cli_foreman_ansible (0.3.2)
 * hammer_cli_foreman_bootdisk (0.3.0)
 * hammer_cli_foreman_docker (unknown version)
 * hammer_cli_foreman_tasks (unknown version)
 * hammer_cli_katello (0.21.0)

As I see that hammer --version doesn’t provide the version details about docker and tasks plugins, these are the rpms that I have in my system:

# rpm -qa|grep -i docker
# rpm -qa|grep -i tasks

Oh, I see now. I’m afraid that released version of hammer-cli-foreman-docker is pretty outdated.

I’m going to release new version of hammer-cli-foreman-docker, which should have fix in it.

1 Like

thanks for looking into it :slight_smile:

if you let me know when the packages are ready I can test them and give feedback.

1 Like

Sorry for taking so long :frowning:

The new gem version (hammer_cli_foreman_docker 0.0.5) was released already, the rpm package is on the way :slight_smile:

thank you! I will test the packages as soon as they are available and I will report back

Is it normal that I cannot find the packages in yum yet? Do I have to update my repos? This is what I have installed now (I did a yum clean all first):

[root@katello-testing ~]# rpm -qa | egrep "foreman-release|katello-repos"

[root@katello-testing ~]# yum list --show-duplicates tfm-rubygem-hammer_cli_foreman_docker
Installed Packages
tfm-rubygem-hammer_cli_foreman_docker.noarch      0.0.4-4.el7     @foreman-plugins
Available Packages
tfm-rubygem-hammer_cli_foreman_docker.noarch      0.0.4-4.el7     foreman-plugins 

For now it’s only available in nightly: https://yum.theforeman.org/plugins/nightly/el7/x86_64/tfm-rubygem-hammer_cli_foreman_docker-0.0.5-1.el7.noarch.rpm

thank you. It seems that this package fixed the tab-completion issue.