Description of problem: Remove warning messages when executing rake scripts/foreman-rake console to improve user experience. Version-Release number of selected component (if applicable): Satellite 6.4 snap 17 How reproducible: [root@mdekan-sat64 ~]# foreman-rake console /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here Loading production environment (Rails 5.1.6) Failed to load console gems, starting anyway irb(main):001:0> Actual results: Also during the upgrade step, console is flooded with same kind of messages [root@mdekan-sat64 ~]# satellite-installer --upgrade .... .... .... Upgrade Step: import_distributions (this may take a while) ... /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here Importing distribution data into repositories foreman-rake katello:upgrades:2.4:import_distributions finished successfully! Upgrade Step: import_puppet_modules (this may take a while) ... /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here Importing Puppet Modules foreman-rake katello:upgrades:2.4:import_puppet_modules finished successfully! Upgrade Step: import_subscriptions (this may take a while) ... /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here Importing Subscriptions foreman-rake katello:import_subscriptions finished successfully! Upgrade Step: import_product_content (this may take a while) ... /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here foreman-rake katello:upgrades:3.6:import_product_content finished successfully! Upgrade Step: add_export_distributor (this may take a while) ... /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here Refreshing existing repositories to add export distributor foreman-rake katello:upgrades:3.0:add_export_distributor finished successfully! Upgrade Step: remove_docker_v1_content (this may take a while) ... /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here Deleting repositories that only contain Docker v1 content....Done Orphaned content deletion started in background. foreman-rake katello:upgrades:3.0:delete_docker_v1_content finished successfully! Upgrade Step: update_puppet_repository_distributors (this may take a while) ... /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here Updating Puppet Repository Distributors Updating Content View Puppet Environment Distributors foreman-rake katello:upgrades:3.0:update_puppet_repository_distributors finished successfully! Upgrade Step: update_subscription_facet_backend_data (this may take a while) ... /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here Updating backend data for subscription facets foreman-rake katello:upgrades:3.0:update_subscription_facet_backend_data finished successfully! Upgrade Step: remove_event_queue... Upgrade Step: set_virt_who_on_pools (this may take a while) ... /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here Importing Subscriptions foreman-rake katello:import_subscriptions finished successfully! .... .... .... Expected results: No warning messages.
This is a known issue, and it's actually on my own to do list, however I'm not yet sure it will be for the following GA.
Same here: /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24605 has been resolved.
Verified Verified on: Satellite 6.6.0 snap 7 Observation: Warning messages not produced anymore on both the commands: 1. foreman-rake console 2. satellite-installer --upgrade Terminal Output: -bash-4.2# foreman-rake console Loading production environment (Rails 5.2.1) irb(main):001:0> -bash-4.2# satellite-installer --upgrade Upgrading, to monitor the progress on all related services, please do: foreman-tail | tee upgrade-$(date +%Y-%m-%d-%H%M).log Upgrade Step: stop_services... Running Stop Services ================================================================================ Check if command is run as root user: [OK] -------------------------------------------------------------------------------- Stop applicable services: Stopping the following service(s): rh-mongodb34-mongod, postgresql, qdrouterd, qpidd, squid, pulp_celerybeat, pulp_resource_manager, pulp_streamer, pulp_workers, smart_proxy_dynflow_core, tomcat, dynflowd, httpd, puppetserver, foreman-proxy \ All services stopped [OK] -------------------------------------------------------------------------------- foreman-maintain service stop finished successfully! Upgrade Step: start_postgresql... systemctl start postgresql finished successfully! Upgrade Step: upgrade_qpid_paths... Upgrade Step: migrate_pulp... systemctl start rh-mongodb34-mongod finished successfully! Attempting to connect to localhost:27017 Attempting to connect to localhost:27017 Write concern for Mongo connection: {} Loading content types. Loading type descriptors [] Parsing type descriptors Validating type descriptor syntactic integrity Validating type descriptor semantic integrity Loading unit model: modulemd_defaults = pulp_rpm.plugins.db.models:ModulemdDefaults Loading unit model: erratum = pulp_rpm.plugins.db.models:Errata Loading unit model: distribution = pulp_rpm.plugins.db.models:Distribution Loading unit model: srpm = pulp_rpm.plugins.db.models:SRPM Loading unit model: package_group = pulp_rpm.plugins.db.models:PackageGroup Loading unit model: package_category = pulp_rpm.plugins.db.models:PackageCategory Loading unit model: iso = pulp_rpm.plugins.db.models:ISO Loading unit model: package_environment = pulp_rpm.plugins.db.models:PackageEnvironment Loading unit model: drpm = pulp_rpm.plugins.db.models:DRPM Loading unit model: package_langpacks = pulp_rpm.plugins.db.models:PackageLangpacks Loading unit model: modulemd = pulp_rpm.plugins.db.models:Modulemd Loading unit model: rpm = pulp_rpm.plugins.db.models:RPM Loading unit model: yum_repo_metadata_file = pulp_rpm.plugins.db.models:YumMetadataFile Loading unit model: docker_manifest = pulp_docker.plugins.models:Manifest Loading unit model: docker_blob = pulp_docker.plugins.models:Blob Loading unit model: docker_manifest_list = pulp_docker.plugins.models:ManifestList Loading unit model: docker_image = pulp_docker.plugins.models:Image Loading unit model: docker_tag = pulp_docker.plugins.models:Tag Loading unit model: puppet_module = pulp_puppet.plugins.db.models:Module Loading unit model: ostree = pulp_ostree.plugins.db.model:Branch Loading auxiliary model: erratum_pkglists = pulp_rpm.plugins.db.models:ErratumPkglist Updating the database with types [] Found the following type definitions that were not present in the update collection [puppet_module, docker_tag, ostree, modulemd_defaults, package_langpacks, erratum, docker_blob, docker_manifest, yum_repo_metadata_file, package_group, package_category, iso, package_environment, drpm, distribution, modulemd, rpm, srpm, docker_image, docker_manifest_list] Updating the database with types [puppet_module, docker_tag, ostree, modulemd_defaults, package_langpacks, erratum, docker_blob, docker_manifest, yum_repo_metadata_file, package_group, package_category, iso, package_environment, drpm, distribution, modulemd, rpm, srpm, docker_image, docker_manifest_list] Content types loaded. Ensuring the admin role and user are in place. Admin role and user are in place. Beginning database migrations. Loading unit model: modulemd_defaults = pulp_rpm.plugins.db.models:ModulemdDefaults Loading unit model: erratum = pulp_rpm.plugins.db.models:Errata Loading unit model: distribution = pulp_rpm.plugins.db.models:Distribution Loading unit model: srpm = pulp_rpm.plugins.db.models:SRPM Loading unit model: package_group = pulp_rpm.plugins.db.models:PackageGroup Loading unit model: package_category = pulp_rpm.plugins.db.models:PackageCategory Loading unit model: iso = pulp_rpm.plugins.db.models:ISO Loading unit model: package_environment = pulp_rpm.plugins.db.models:PackageEnvironment Loading unit model: drpm = pulp_rpm.plugins.db.models:DRPM Loading unit model: package_langpacks = pulp_rpm.plugins.db.models:PackageLangpacks Loading unit model: modulemd = pulp_rpm.plugins.db.models:Modulemd Loading unit model: rpm = pulp_rpm.plugins.db.models:RPM Loading unit model: yum_repo_metadata_file = pulp_rpm.plugins.db.models:YumMetadataFile Loading unit model: docker_manifest = pulp_docker.plugins.models:Manifest Loading unit model: docker_blob = pulp_docker.plugins.models:Blob Loading unit model: docker_manifest_list = pulp_docker.plugins.models:ManifestList Loading unit model: docker_image = pulp_docker.plugins.models:Image Loading unit model: docker_tag = pulp_docker.plugins.models:Tag Loading unit model: puppet_module = pulp_puppet.plugins.db.models:Module Loading unit model: ostree = pulp_ostree.plugins.db.model:Branch Loading auxiliary model: erratum_pkglists = pulp_rpm.plugins.db.models:ErratumPkglist Migration package pulp.server.db.migrations is up to date at version 500 Migration package pulp_docker.plugins.migrations is up to date at version 500 Migration package pulp_ostree.plugins.migrations is up to date at version 1 Migration package pulp_puppet.plugins.migrations is up to date at version 5 Migration package pulp_rpm.plugins.migrations is up to date at version 504 Database migrations complete. su - apache -s /bin/bash -c pulp-manage-db finished successfully! Upgrade Step: mark_qpid_cert_for_update... Marking certificate /root/ssl-build/lenovo-st550-01.ml3.eng.bos.redhat.com/lenovo-st550-01.ml3.eng.bos.redhat.com-qpid-broker for update Upgrade Step: migrate_candlepin... Configuring PostgreSQL with JDBC URL: jdbc:postgresql://localhost/candlepin Migrating Candlepin database --driver=org.postgresql.Driver --classpath=/var/lib/tomcat/webapps/candlepin/WEB-INF/lib/postgresql-42.2.2.jar:/var/lib/tomcat/webapps/candlepin/WEB-INF/classes/ --changeLogFile=db/changelog/changelog-update.xml --url=jdbc:postgresql://localhost/candlepin --username=$DBUSERNAME --password=$DBPASSWORD --logLevel=severe Liquibase Update Successful /usr/share/candlepin/cpdb --update --database '//localhost/candlepin' --user 'candlepin' --password 'tJ6Pqtos4bobx62p5j7xzPqAsam6erad' finished successfully! Upgrade Step: migrate_foreman... foreman-rake db:migrate finished successfully! Upgrade Step: mongo_mmapv1_check... Upgrade Step: remove_legacy_mongo... Upgrade Step: Running installer... Installing Done [100%] The full log is at /var/log/foreman-installer/satellite.log ============================================= Upgrade Step 1/9: katello:correct_repositories. This may take a long while. Processing Repository 1/60: Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.6 (1) Processing Repository 2/60: Red Hat Enterprise Linux 6 Server Kickstart x86_64 6.10 (2) Processing Repository 3/60: Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server (3) Processing Repository 4/60: Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server (4) Processing Repository 5/60: Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server (5) Processing Repository 6/60: Red Hat Satellite Maintenance 6 for RHEL 7 Server RPMs x86_64 (6) Processing Repository 7/60: Red Hat Ansible Engine 2 RPMs for Red Hat Enterprise Linux 7 Server x86_64 (7) Processing Repository 8/60: sat6tool6 (8) Processing Repository 9/60: sat6tool7 (9) Processing Repository 10/60: capsule7 (10) Processing Repository 11/60: maintain7 (11) Processing Repository 12/60: Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server (12) Processing Repository 13/60: Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server (13) Processing Repository 14/60: Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.6 (14) Processing Repository 15/60: Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.6 (15) Processing Repository 16/60: sat6tool7 (16) Processing Repository 17/60: sat6tool7 (17) Processing Repository 18/60: sat6tool7 (18) Processing Repository 19/60: Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.6 (19) Processing Repository 20/60: Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server (20) Processing Repository 21/60: Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server (21) Processing Repository 22/60: Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server (22) Processing Repository 23/60: Red Hat Enterprise Linux 6 Server Kickstart x86_64 6.10 (23) Processing Repository 24/60: Red Hat Enterprise Linux 6 Server Kickstart x86_64 6.10 (24) Processing Repository 25/60: sat6tool6 (25) Processing Repository 26/60: sat6tool6 (26) Processing Repository 27/60: sat6tool6 (27) Processing Repository 28/60: Red Hat Enterprise Linux 6 Server Kickstart x86_64 6.10 (28) Processing Repository 29/60: Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server (29) Processing Repository 30/60: Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server (30) Processing Repository 31/60: Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server (31) Processing Repository 32/60: Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server (32) Processing Repository 33/60: Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server (33) Processing Repository 34/60: Red Hat Ansible Engine 2 RPMs for Red Hat Enterprise Linux 7 Server x86_64 (34) Processing Repository 35/60: Red Hat Ansible Engine 2 RPMs for Red Hat Enterprise Linux 7 Server x86_64 (35) Processing Repository 36/60: sat6tool7 (36) Processing Repository 37/60: sat6tool7 (37) Processing Repository 38/60: capsule7 (38) Processing Repository 39/60: capsule7 (39) Processing Repository 40/60: maintain7 (40) Processing Repository 41/60: maintain7 (41) Processing Repository 42/60: Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server (42) Processing Repository 43/60: Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server (43) Processing Repository 44/60: Red Hat Ansible Engine 2 RPMs for Red Hat Enterprise Linux 7 Server x86_64 (44) Processing Repository 45/60: sat6tool7 (45) Processing Repository 46/60: capsule7 (46) Processing Repository 47/60: maintain7 (47) Processing Repository 48/60: Red Hat Virtualization Manager 4.0 RHEL 7 Server RPMs x86_64 (48) Processing Repository 49/60: Red Hat Enterprise Virtualization Manager 3.3 RPMs x86_64 6Server (49) Processing Repository 50/60: Red Hat Enterprise Linux 7 Server - Extras RPMs x86_64 (50) Processing Repository 51/60: Red Hat Enterprise Linux 7 Server - Optional RPMs x86_64 7Server (51) Processing Repository 52/60: Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server (52) Processing Repository 53/60: Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server (53) Processing Repository 54/60: Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server (54) Processing Repository 55/60: Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.6 (55) Processing Repository 56/60: sat6tool7 (56) Processing Repository 57/60: Red Hat Enterprise Linux 7 Server - Extras RPMs x86_64 (57) Processing Repository 58/60: Red Hat Enterprise Linux 7 Server - Extras RPMs x86_64 (58) Processing Repository 59/60: Red Hat Enterprise Linux 7 Server - Optional RPMs x86_64 7Server (59) Processing Repository 60/60: Red Hat Enterprise Linux 7 Server - Optional RPMs x86_64 7Server (60) ============================================= Upgrade Step 2/9: katello:correct_puppet_environments. This may take a long while. Processing Puppet Environment 1/4: 1-RHEL_7_CV-v1_0-puppet-94bc9108-45d8-489f-8458-0c37bfb35ca6 (1) Processing Puppet Environment 2/4: 1-RHEL_6_CV-v1_0-puppet-8435c277-d6a4-44f9-827f-ac04837b37c8 (2) Processing Puppet Environment 3/4: 1-Capsule_RHEL_7_CV-v1_0-puppet-9025365d-5630-42b4-80b3-6b566c3486f1 (3) Processing Puppet Environment 4/4: 1-RHEL_7_CV-v2_0-puppet-1707d4ea-dccf-448c-a27a-30cbdaf90756 (4) ============================================= Upgrade Step 3/9: katello:clean_backend_objects. This may take a long while. 0 orphaned consumer id(s) found in candlepin. Candlepin orphaned consumers: [] 0 orphaned consumer id(s) found in pulp. Pulp orphaned consumers: [] ============================================= Upgrade Step 4/9: katello:upgrades:3.8:clear_checksum_type. ============================================= Upgrade Step 5/9: katello:upgrades:3.10:clear_invalid_repo_credentials. ============================================= Upgrade Step 6/9: katello:upgrades:3.11:import_yum_metadata. Importing Yum Metadata Files ============================================= Upgrade Step 7/9: katello:upgrades:3.11:update_puppet_repos. ============================================= Upgrade Step 8/9: katello:upgrades:3.11:clear_checksum_type. ============================================= Upgrade Step 9/9: katello:upgrades:3.12:remove_pulp2_notifier. foreman-rake upgrade:run finished successfully! Upgrade completed!
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:3172