Bug #35807
openregister_type exception trying to reinstall with new scenario
Description
I'm a brand new user trying to install foreman for the first time so this may be a dumb user error, but nonetheless I don't think any application should fail in this way. I'm left with no understanding about how to proceed.
I used the instructions at https://theforeman.org/manuals/3.4/quickstart_guide.html to perform an initial install on a RHEL 8.7 system, and not understanding anything about install scenarios I ran foreman-install
with no arguments. That finished without error, but I soon realized I really wanted to install katello as well. I didn't find any way to do that after the fact other than to follow the instructions at https://docs.theforeman.org/3.4/Installing_Server/index-katello.html, which doesn't talk about uninstalling or reinstalling. The first thing I tried was this:
# foreman-installer --scenario katello 2022-11-30 08:56:19 [ERROR ] [scenario_manager] <Array> ["You are trying to replace existing installation with different scenario. This may lead to unpredictable states. Use --force to override. You can use --compare-scenarios to see the differences"] 2022-11-30 08:56:19 [NOTICE] [scenario_manager] Log was be written to /var/log/foreman-installer/katello.log 2022-11-30 08:56:19 [NOTICE] [scenario_manager] Logs flushed
The ERROR didn't give me much confidence, but I proceeded with using the --force
option and this was the result:
# foreman-installer --scenario katello --force 2022-11-30 08:57:24 [NOTICE] [scenario_manager] <Array> ["Scenario /etc/foreman-installer/scenarios.d/katello.yaml was selected"] 2022-11-30 08:57:24 [NOTICE] [root] <Array> ["Due to scenario change the configuration (/etc/foreman-installer/scenarios.d/katello.yaml) was updated with /etc/foreman-installer/scenarios.d/foreman.yaml and reloaded."] 2022-11-30 08:57:24 [NOTICE] [root] Loading installer configuration. This will take some time. Traceback (most recent call last): 18: from /usr/sbin/foreman-installer:8:in `<main>' 17: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/kafo_configure.rb:50:in `run' 16: from /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run' 15: from /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `new' 14: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/kafo_configure.rb:157:in `initialize' 13: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/kafo_configure.rb:316:in `set_parameters' 12: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/scenario_manager.rb:217:in `load_and_setup_configuration' 11: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/configuration.rb:268:in `preset_defaults_from_puppet' 10: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/configuration.rb:258:in `params' 9: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/configuration.rb:132:in `modules' 8: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/configuration.rb:396:in `register_data_types' 7: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/configuration.rb:396:in `each' 6: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/configuration.rb:397:in `block in register_data_types' 5: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/configuration.rb:397:in `each' 4: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/configuration.rb:398:in `block (2 levels) in register_data_types' 3: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/data_type_parser.rb:20:in `register' 2: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/data_type_parser.rb:20:in `each' 1: from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/data_type_parser.rb:22:in `block in register' /usr/share/gems/gems/kafo-6.5.0/lib/kafo/data_type.rb:31:in `register_type': Data type Puppet::Custom_trusted_oid_mapping is already registered, cannot be re-registered (ArgumentError)
For an application to fail in this way is (in my mind) a bug that needs to be repaired. However, I would also appreciate some advice on how to undo the problem and proceed with the desired install scenario. Thanks.