Problem:
Warning: An error occured while loading module hammer_cli_foreman_remote_execution.
ERROR:
Could not create the repository:
nil smart_proxy passed to PulpSelector
Expected outcome:
Coulnot add repository for the product centos 8
Foreman and Proxy versions:
Foreman and Proxy plugin versions:
foreman 2.0.3
Katello 3.15
–name ‘CentOS 8 BaseOS’ --label ‘CentOS8_BaseOS’
–content-type ‘yum’ --download-policy ‘on_demand’
–gpg-key ‘RPM-GPG-KEY-CentOS-8’
–url ‘http://mirror.centos.org/centos-8/8.2.2004/BaseOS/x86_64/os/’
–mirror-on-sync ‘no’
Warning: An error occured while loading module hammer_cli_foreman_remote_execution.
Could not create the repository: nil smart_proxy passed to PulpSelector
Here you go for mt org list
[root@ansible ~]# hammer organization list
Warning: An error occured while loading module hammer_cli_foreman_remote_execution.
—|----------------------|----------------------|-------------|---------------------
The first thing that strikes me as wrong here is I think that Foreman automatically completes the Label field based on what you have entered for Name .
Edit: Perhaps that has nothing to do with it since it is happening through the UI also.
Thanks iballou.
Didn’t see any output while running /usr/sbin/foreman-rake.
instead ran the following not seeing any info about SmartProxy_pulp_primary
[root@ansible ~]# /usr/sbin/foreman-rake -v
rake aborted!
ActiveRecord::ProtectedEnvironmentError: You are attempting to run a destructive action against your ‘production’ database.
If you are sure you want to continue, run the same command with the environment variable:
DISABLE_DATABASE_ENVIRONMENT_CHECK=1
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/tasks/database_tasks.rb:61:in check_protected_environments!' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/railties/databases.rake:13:in block (2 levels) in <top (required)>’
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/railties/databases.rake:345:in block (3 levels) in <top (required)>' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in <top (required)>’
Tasks: TOP => db:test:load => db:test:purge => db:check_protected_environments
(See full trace by running task with --trace)
[root@ansible ~]# /usr/sbin/foreman-rake --execute
rake aborted!
OptionParser::MissingArgument: missing argument: --execute
which SmartProxy.pulp_primary
/usr/bin/which: no SmartProxy.pulp_primary in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-0.el7_8.x86_64/jre/bin:/root/bin)
What I meant was for you to open the Foreman Rails console by running:
sudo foreman-rake console
Once the interactive console launches, I’d like to see what pops up for:
SmartProxy.pulp_master
(I missed that you were on Katello 3.15, which is why I’m requesting for pulp_master now instead of pulp_primary. We had a name change recently in newer versions of Katello.)
If SmartProxy.pulp_master returns nil here, I’m suspecting that your main smart proxy isn’t set up properly.
after running i can able to add repositiories
Did the same thing while installing it didn’t configure as expected.
After re-ran:
[root@ansible ~]# ./repo-creation
Repository created.
Base OS REPO Created
Repository created.
APPSTREAM OS REPO Created
Repository created.
Powertoll REPO Created
Repository created.
CentOSPlus REPO Created
Repository created.
CentOS8_Extras REPO Created