Error during Foreman/Katello installation using Forklift

Problem:
I am trying to install Foreman/Katello using the Forklift Ansible scripts.

The installation ends with an error.

[ ... ]
    [ WARN 2020-12-02T03:25:08 verbose]  /Package[tfm-rubygem-smart_proxy_pulp]: Skipping because of failed dependencies
    [ WARN 2020-12-02T03:25:08 verbose]  /Stage[main]/Foreman_proxy::Plugin::Pulp/Foreman_proxy::Settings_file[pulp3]/File[/etc/foreman-proxy/settings.d/pulp3.yml]: Skipping because of failed dependencies
    [ WARN 2020-12-02T03:25:08 verbose]  /Stage[main]/Foreman_proxy::Plugin::Pulp/Foreman_proxy::Module[pulp]/Foreman_proxy::Feature[Pulp]/Datacat_fragment[foreman_proxy::enabled_features::Pulp]: Skipping because of failed dependencies
    [ WARN 2020-12-02T03:25:08 verbose]  /Stage[main]/Foreman_proxy::Plugin::Pulp/Foreman_proxy::Module[pulp]/Foreman_proxy::Settings_file[pulp]/File[/etc/foreman-proxy/settings.d/pulp.yml]: Skipping because of failed dependencies
    [ WARN 2020-12-02T03:25:08 verbose]  /Stage[main]/Foreman_proxy::Plugin::Pulp/Foreman_proxy::Module[pulpnode]/Foreman_proxy::Settings_file[pulpnode]/File[/etc/foreman-proxy/settings.d/pulpnode.yml]: Skipping because of failed dependencies
    [ WARN 2020-12-02T03:25:08 verbose]  /Stage[main]/Foreman_proxy::Plugin::Pulp/Foreman_proxy::Module[pulpcore]/Foreman_proxy::Feature[Pulpcore]/Datacat_fragment[foreman_proxy::enabled_features::Pulpcore]: Skipping because of failed dependencies
    [ WARN 2020-12-02T03:25:08 verbose]  /Stage[main]/Foreman_proxy::Plugin::Pulp/Foreman_proxy::Module[pulpcore]/Foreman_proxy::Settings_file[pulpcore]/File[/etc/foreman-proxy/settings.d/pulpcore.yml]: Skipping because of failed dependencies
    [ INFO 2020-12-02T03:25:08 verbose]  Class[Foreman_proxy::Service]: Unscheduling all events on Class[Foreman_proxy::Service]
    [ WARN 2020-12-02T03:25:08 verbose]  /Service[foreman-proxy]: Skipping because of failed dependencies
    [ INFO 2020-12-02T03:25:08 verbose]  /Service[foreman-proxy]: Unscheduling all events on Service[foreman-proxy]
    [ WARN 2020-12-02T03:25:08 verbose]  /Stage[main]/Foreman_proxy::Register/Datacat_collector[foreman_proxy::enabled_features]: Skipping because of failed dependencies
    [ WARN 2020-12-02T03:25:08 verbose]  /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[cent-mgmt2.feric.ch]: Skipping because of failed dependencies
    [ INFO 2020-12-02T03:25:08 verbose]  Class[Foreman_proxy]: Unscheduling all events on Class[Foreman_proxy]
    [ WARN 2020-12-02T03:25:08 verbose]  /Service[puppet]: Skipping because of failed dependencies
    [ INFO 2020-12-02T03:25:08 verbose]  /Service[puppet]: Unscheduling all events on Service[puppet]
    [ WARN 2020-12-02T03:25:08 verbose]  /Service[puppet-run.timer]: Skipping because of failed dependencies
    [ INFO 2020-12-02T03:25:08 verbose]  /Service[puppet-run.timer]: Unscheduling all events on Service[puppet-run.timer]
    [ WARN 2020-12-02T03:25:08 verbose]  /Stage[main]/Puppet::Agent::Service::Systemd/File[/etc/systemd/system/puppet-run.timer]: Skipping because of failed dependencies
    [ WARN 2020-12-02T03:25:08 verbose]  /Stage[main]/Puppet::Agent::Service::Systemd/File[/etc/systemd/system/puppet-run.service]: Skipping because of failed dependencies
    [ WARN 2020-12-02T03:25:08 verbose]  /Stage[main]/Puppet::Agent::Service::Systemd/Exec[systemctl-daemon-reload-puppet]: Skipping because of failed dependencies
    [ INFO 2020-12-02T03:25:08 verbose]  /Stage[main]/Puppet::Agent::Service::Systemd/Exec[systemctl-daemon-reload-puppet]: Unscheduling all events on Exec[systemctl-daemon-reload-puppet]
    [ WARN 2020-12-02T03:25:08 verbose]  /Stage[main]/Puppet::Agent::Service::Cron/Cron[puppet]: Skipping because of failed dependencies
    [ INFO 2020-12-02T03:25:08 verbose]  Class[Puppet]: Unscheduling all events on Class[Puppet]
    [ INFO 2020-12-02T03:25:08 verbose]  Stage[main]: Unscheduling all events on Stage[main]
    [ WARN 2020-12-02T03:25:08 verbose]  Applied catalog in 339.32 seconds
    [ INFO 2020-12-02T03:25:10 verbose] Puppet has finished, bye!
    [ INFO 2020-12-02T03:25:10 verbose] Executing hooks in group post
      Something went wrong! Check the log for ERROR-level output
      The full log is at /var/log/foreman-installer/katello.log
    [ INFO 2020-12-02T03:25:10 verbose] All hooks in group post finished
    [ INFO 2020-12-02T03:25:10 verbose] Installer finished in 442.793562332 seconds
  stdout_lines: <omitted>

When I look at the installation log file, I can see the following Traceback and ERROR:

[ INFO 2020-12-02T03:21:06 main]  Pulpcore::Admin[collectstatic --noinput]: Scheduling refresh of Exec[pulpcore-manager collectstatic --noinput]
[DEBUG 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]: 'pulpcore-manager collectstatic --noinput' won't be executed because of failed check 'refreshonly'
[DEBUG 2020-12-02T03:21:06 main]  Exec[pulpcore-manager collectstatic --noinput](provider=posix): Executing 'pulpcore-manager collectstatic --noinput'
[DEBUG 2020-12-02T03:21:06 main]  Executing with uid=pulp: 'pulpcore-manager collectstatic --noinput'
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns: Traceback (most recent call last):
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/bin/pulpcore-manager", line 11, in <module>
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     load_entry_point('pulpcore==3.6.3', 'console_scripts', 'pulpcore-manager')()
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/pulpcore/app/manage.py", line 11, in manage
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     execute_from_command_line(sys.argv)
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     utility.execute()
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/django/core/management/__init__.py", line 325, in execute
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     settings.INSTALLED_APPS
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     self._setup(name)
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/django/conf/__init__.py", line 66, in _setup
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     self._wrapped = Settings(settings_module)
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/django/conf/__init__.py", line 157, in __init__
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     mod = importlib.import_module(self.SETTINGS_MODULE)
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     return _bootstrap._gcd_import(name[level:], package, level)
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/pulpcore/app/settings.py", line 240, in <module>
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     ENVVAR_FOR_DYNACONF="PULP_SETTINGS",
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/dynaconf/contrib/django_dynaconf_v2.py", line 76, in load
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     lazy_settings.populate_obj(django_settings_module)
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/dynaconf/utils/parse_conf.py", line 206, in evaluate
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     value = f(settings, *args, **kwargs)
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/dynaconf/base.py", line 142, in __getattr__
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     self._setup()
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/dynaconf/base.py", line 184, in _setup
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     default_settings.reload(self._kwargs.get("load_dotenv"))
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/dynaconf/default_settings.py", line 71, in reload
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     start_dotenv(*args, **kwargs)
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/dynaconf/default_settings.py", line 57, in start_dotenv
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     or _find_file(".env", project_root=root_path)
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/dynaconf/utils/files.py", line 60, in find_file
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     search_tree.extend(_walk_to_root(work_dir))
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:   File "/usr/lib/python3.6/site-packages/dynaconf/utils/files.py", line 13, in _walk_to_root
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns:     raise IOError("Starting path not found")
[ WARN 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]/returns: OSError: Starting path not found
[ERROR 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]: Failed to call refresh: 'pulpcore-manager collectstatic --noinput' returned 1 instead of one of [0]
[ERROR 2020-12-02T03:21:06 main]  /Stage[main]/Pulpcore::Static/Pulpcore::Admin[collectstatic --noinput]/Exec[pulpcore-manager collectstatic --noinput]: 'pulpcore-manager collectstatic --noinput' returned 1 instead of one of [0]

katello.log (2.9 MB)

It’s unclear to me what exactly is causing the problem.

Am I missing something?

Kind regards
Toni Feric

The error message that stands out from the katello.log file is:

@ToniF which vagrant command did you run / which katello box were you starting up?

Hi
This is what I ran:

yum install ansible
git clone https://github.com/theforeman/forklift.git
cd forklift
ansible-playbook -l localhost playbooks/katello.yml -e foreman_repositories_version=1.17 -e katello_repositories_version=3.6

I don’t think I ran any vagrant commands.
Neither do I want to. I don’t need vagrant at all.

I have provisioned the VM for foreman already, and only need ansible to install foreman/katello on top of it, running ansible against the localhost.

Is it safer to refrain from using the ansible installer, and install the components “by hand”, i.e. running the commands on the shell individually?
I was hoping that ansible would automate just that process.

Forklift is mostly useful for development setup or POCs. For a production environment, I would recommend using the regular foreman installer and following the instructions in the Katello manual and Foreman manual

1 Like

Many thanks @tbrisker
I will follow your advice.

It seems that I got fooled by the 1st line of Forklift’s README.md:
Forklift provides tools to create Foreman/Katello environments for development, testing and production configurations.

And this: