Upgrade from 1.24.2 to 2.0 with Katello fails

Problem:
After following the usual instructions to update the RPMs from Foreman 1.24.2 to 2.0 and Katello 3.14. to 3.15 (https://www.theforeman.org/plugins/katello/3.15/upgrade/index.html).
I get the Error “Failed to verify available disk space” in the upgrade-step.

foreman-installer --scenario katello --upgrade -v
[ INFO 2020-05-11T18:30:19 verbose] Executing hooks in group pre_migrations
[ INFO 2020-05-11T18:30:19 verbose] All hooks in group pre_migrations finished
[ INFO 2020-05-11T18:30:19 verbose] Executing hooks in group boot
[ INFO 2020-05-11T18:30:19 verbose] All hooks in group boot finished
[ INFO 2020-05-11T18:30:19 verbose] Executing hooks in group init
[ INFO 2020-05-11T18:30:19 verbose] All hooks in group init finished
[ INFO 2020-05-11T18:30:19 verbose] Loading default values from puppet modules...
[ INFO 2020-05-11T18:30:19 verbose] ... finished
[ INFO 2020-05-11T18:30:19 verbose] Executing hooks in group pre_values
[ INFO 2020-05-11T18:30:19 verbose] All hooks in group pre_values finished
[ INFO 2020-05-11T18:30:19 verbose] Running installer with args [["--scenario", "katello", "--upgrade", "-v"]]
[ INFO 2020-05-11T18:30:19 verbose] Executing hooks in group pre_validations
Failed to verify available disk space
[ERROR 2020-05-11T18:30:21 verbose] Failed to verify available disk space
[ INFO 2020-05-11T18:30:21 verbose] Installer finished in 11.876826966 seconds

At the moment the installation uses 42GB and 54GB are free.

Expected outcome:
Upgrade to Foreman 2.0 and Katello 3.15

Foreman and Proxy versions:
foreman-2.0.0-2.el7.noarch

Foreman and Proxy plugin versions:
foreman-proxy-2.0.0-1.el7.noarch

Distribution and version:
CentOS 7.8

Could you change the fail_and_exit line here:

I think this would work:

  rescue StandardError => e
    logger.fatal(e)
    fail_and_exit 'Failed to verify available disk space'
  end

Now I get the following dump:

[FATAL 2020-05-11T19:52:04 fatal] <NoMethodError> undefined method `[]' for nil:NilClass
	/usr/share/foreman-installer/hooks/pre_validations/30-el7_upgrade_postgresql.rb:21:in `available_space'
	/usr/share/foreman-installer/hooks/pre_validations/30-el7_upgrade_postgresql.rb:9:in `check_postgresql_storage'
	/usr/share/foreman-installer/hooks/pre_validations/30-el7_upgrade_postgresql.rb:28:in `block (4 levels) in load'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/hooking.rb:34:in `instance_eval'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/hooking.rb:34:in `block (4 levels) in load'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/hook_context.rb:16:in `instance_exec'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/hook_context.rb:16:in `execute'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/hooking.rb:51:in `block in execute'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/hooking.rb:49:in `each'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/hooking.rb:49:in `execute'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/kafo_configure.rb:139:in `execute'
	/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/kafo_configure.rb:118:in `run'
	/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/kafo_configure.rb:162:in `run'
	/usr/sbin/foreman-installer:8:in `<main>'
[FATAL 2020-05-11T19:52:04 verbose] <NoMethodError> undefined method `[]' for nil:NilClass
	/usr/share/foreman-installer/hooks/pre_validations/30-el7_upgrade_postgresql.rb:21:in `available_space'
	/usr/share/foreman-installer/hooks/pre_validations/30-el7_upgrade_postgresql.rb:9:in `check_postgresql_storage'
	/usr/share/foreman-installer/hooks/pre_validations/30-el7_upgrade_postgresql.rb:28:in `block (4 levels) in load'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/hooking.rb:34:in `instance_eval'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/hooking.rb:34:in `block (4 levels) in load'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/hook_context.rb:16:in `instance_exec'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/hook_context.rb:16:in `execute'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/hooking.rb:51:in `block in execute'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/hooking.rb:49:in `each'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/hooking.rb:49:in `execute'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/kafo_configure.rb:139:in `execute'
	/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/kafo_configure.rb:118:in `run'
	/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
	/usr/share/gems/gems/kafo-4.0.1/lib/kafo/kafo_configure.rb:162:in `run'
	/usr/sbin/foreman-installer:8:in `<main>'
Failed to verify available disk space
[ERROR 2020-05-11T19:52:04 verbose] Failed to verify available disk space

What’s the result of facter --version? This suggests it uses Facter 2 which lacks the modern fact we need to determine this, but don’t handle well.

That was it.
There is a facter under /usr/local/bin with version 2.5.1.
At the moment I don’t know from where it originates, as it does not belong to a rpm package.
If I rename that one, it works.

Thanks for the quick help.