Foreman upgrade 1.18.0 -> 1.18.1 failed

Problem:
Foreman upgrade 1.18.0 -> 1.18.1 failed when running foreman-installer

Foreman and Proxy versions:
foreman-1.18.1-1.el7.noarch
foreman-proxy-1.18.1-1.el7.noarch
katello-3.7.0-4.el7.noarch

~$ foreman-rake db:migrate --trace
/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
rake aborted!
TypeError: nil is not a kind of ‘Logging::Layout’
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appender.rb:161:in layout=' /opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appender.rb:45:ininitialize’
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/buffering.rb:49:in initialize' /opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/io.rb:39:ininitialize’
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/file.rb:60:in initialize' /opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/file.rb:8:innew’
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/file.rb:8:in file' /usr/share/foreman/lib/foreman/logging.rb:182:inbuild_file_appender’
/usr/share/foreman/lib/foreman/logging.rb:164:in build_root_appender' /usr/share/foreman/lib/foreman/logging.rb:130:inconfigure_root_logger’
/usr/share/foreman/lib/foreman/logging.rb:20:in configure' /usr/share/foreman/config/application.rb:204:inclass:Application
/usr/share/foreman/config/application.rb:74:in <module:Foreman>' /usr/share/foreman/config/application.rb:73:in<top (required)>’
/opt/rh/rh-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in require' /opt/rh/rh-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:inrequire’
/usr/share/foreman/Rakefile:1:in <top (required)>' /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/rake_module.rb:28:inload’
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in load_rakefile' /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:687:inraw_load_rakefile’
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:96:in block in load_rakefile' /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:178:instandard_exception_handling’
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:95:in load_rakefile' /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:79:inblock in run’
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:178:in standard_exception_handling' /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:77:inrun’
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/exe/rake:27:in <top (required)>' /opt/rh/rh-ruby24/root/usr/bin/rake:23:inload’
/opt/rh/rh-ruby24/root/usr/bin/rake:23:in `’

I think I’ve seen this happen when modifications were made to logging.yaml. There are assumptions in the code that can break. Still have to investigate this.

1 Like

I did a rolling upgrade from 1.16 to 1.18 and made sure to update package in-between, etc. Could this mean possibly that some settings didn’t get copied over from logging.yaml that were introduced in 1.17.x or 1.18.0? I will check on this myself and see if it makes a difference after I merge some of the changes from .rpmnew.

$ mv /etc/foreman/logging.yaml /etc/foreman/logging.yaml.rpmsave
$ mv /etc/foreman/logging.yaml.rpmnew /etc/foreman/logging.yaml

$ foreman-rake db:migrate --trace
    /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
    ** Invoke db:migrate (first_time)
    ** Invoke environment (first_time)
    ** Execute environment
    API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
    ** Invoke db:load_config (first_time)
    ** Execute db:load_config
    ** Invoke plugin:refresh_migrations (first_time)
    ** Invoke environment
    ** Execute plugin:refresh_migrations
    ** Execute db:migrate
    == 20160302091113 ChangeEnvironmentPrior: migrating ===========================
    -- add_column(:katello_environment_priors, :id, :primary_key)
       -> 0.0343s
    == 20160302091113 ChangeEnvironmentPrior: migrated (0.0345s) ==================

    == 20170604082313 AddComputeResourceToHostgroup: migrating ====================
    -- add_column(:hostgroups, :compute_resource_id, :integer)
       -> 0.0017s
    -- add_foreign_key(:hostgroups, :compute_resources)
       -> 0.0048s
    == 20170604082313 AddComputeResourceToHostgroup: migrated (0.0067s) ===========

    == 20171026082635 AddTaskAction: migrating ====================================
    -- add_column(:foreman_tasks_tasks, :action, :string)
       -> 0.0010s
    == 20171026082635 AddTaskAction: migrated (0.0012s) ===========================

    == 20171110082124 AddSslCertsToProductsAndRepos: migrating ====================
    -- add_column(:katello_products, :ssl_ca_cert_id, :integer, {:null=>true})
       -> 0.0012s
    -- add_index(:katello_products, :ssl_ca_cert_id)
       -> 0.0059s
    -- add_foreign_key(:katello_products, :katello_gpg_keys, {:name=>"katello_products_ssl_ca_cert_id_fk", :column=>:ssl_ca_cert_id, :primary_key=>:id})
       -> 0.0027s
    -- add_column(:katello_products, :ssl_client_cert_id, :integer, {:null=>true})
       -> 0.0006s
    -- add_index(:katello_products, :ssl_client_cert_id)
       -> 0.0045s
    -- add_foreign_key(:katello_products, :katello_gpg_keys, {:name=>"katello_products_ssl_client_cert_id_fk", :column=>:ssl_client_cert_id, :primary_key=>:id})
       -> 0.0017s
    -- add_column(:katello_products, :ssl_client_key_id, :integer, {:null=>true})
       -> 0.0007s
    -- add_index(:katello_products, :ssl_client_key_id)
       -> 0.0045s
    -- add_foreign_key(:katello_products, :katello_gpg_keys, {:name=>"katello_products_ssl_client_key_id_fk", :column=>:ssl_client_key_id, :primary_key=>:id})
       -> 0.0016s
    -- add_column(:katello_repositories, :ssl_ca_cert_id, :integer, {:null=>true})
       -> 0.0011s
    -- add_index(:katello_repositories, :ssl_ca_cert_id)
       -> 0.0045s
    -- add_foreign_key(:katello_repositories, :katello_gpg_keys, {:name=>"katello_repositories_ssl_ca_cert_id_fk", :column=>:ssl_ca_cert_id, :primary_key=>:id})
       -> 0.0023s
    -- add_column(:katello_repositories, :ssl_client_cert_id, :integer, {:null=>true})
       -> 0.0007s
    -- add_index(:katello_repositories, :ssl_client_cert_id)
       -> 0.0045s
    -- add_foreign_key(:katello_repositories, :katello_gpg_keys, {:name=>"katello_repositories_ssl_client_cert_id_fk", :column=>:ssl_client_cert_id, :primary_key=>:id})
       -> 0.0022s
    -- add_column(:katello_repositories, :ssl_client_key_id, :integer, {:null=>true})
       -> 0.0006s
    -- add_index(:katello_repositories, :ssl_client_key_id)
       -> 0.0048s
    -- add_foreign_key(:katello_repositories, :katello_gpg_keys, {:name=>"katello_repositories_ssl_client_key_id_fk", :column=>:ssl_client_key_id, :primary_key=>:id})
       -> 0.0017s
    -- add_column(:katello_gpg_keys, :content_type, :string, {:null=>false, :default=>"gpg_key", :limit=>255})
       -> 0.1157s
    == 20171110082124 AddSslCertsToProductsAndRepos: migrated (0.2230s) ===========

    == 20171119094913 AddMtuToSubnet: migrating ===================================
    -- add_column(:subnets, :mtu, :integer, {:default=>1500, :null=>false, :limit=>8})
       -> 0.0328s
    == 20171119094913 AddMtuToSubnet: migrated (0.0330s) ==========================

    == 20171121111333 ChangeAuthSourceResourceType: migrating =====================
    == 20171121111333 ChangeAuthSourceResourceType: migrated (0.0105s) ============

    == 20171129103615 AddSecretsToJobInvocations: migrating =======================
    -- add_column(:job_invocations, :password, :string)
       -> 0.0010s
    -- add_column(:job_invocations, :key_passphrase, :string)
       -> 0.0006s
    == 20171129103615 AddSecretsToJobInvocations: migrated (0.0018s) ==============

    == 20171208113210 RemoveUseGravatarSetting: migrating =========================
    == 20171208113210 RemoveUseGravatarSetting: migrated (0.0021s) ================

    == 20171213161035 AddIndexesOnImages: migrating ===============================
    -- add_index(:images, [:name, :compute_resource_id, :operatingsystem_id], {:name=>"image_name_index", :unique=>true})
       -> 0.0049s
    -- add_index(:images, [:uuid, :compute_resource_id], {:name=>"image_uuid_index", :unique=>true})
       -> 0.0041s
    == 20171213161035 AddIndexesOnImages: migrated (0.0318s) ======================

    == 20171214050230 AddAutoPublishToContentViews: migrating =====================
    -- add_column(:katello_content_views, :auto_publish, :boolean, {:null=>false, :default=>false})
       -> 0.0758s
    == 20171214050230 AddAutoPublishToContentViews: migrated (0.0760s) ============

    == 20171222120314 AddConstraintsOnDiscoveryRulesHostgroups: migrating =========
    -- add_foreign_key("discovery_rules", "hostgroups", {:name=>"discovery_rules_hostgroup_id_fk", :column=>"hostgroup_id"})
       -> 0.0180s
    == 20171222120314 AddConstraintsOnDiscoveryRulesHostgroups: migrated (0.0558s)

    == 20171231134017 ChangeVlanToInt: migrating ==================================
    -- change_column(:subnets, :vlanid, :integer, {:using=>"vlanid::integer"})
       -> 0.0113s
    == 20171231134017 ChangeVlanToInt: migrated (0.0202s) =========================

    == 20180105090316 RemoveDockerSearchPermission: migrating =====================
    == 20180105090316 RemoveDockerSearchPermission: migrated (0.0783s) ============

    == 20180111130853 AddConfigReportsOrigin: migrating ===========================
    -- add_column(:reports, :origin, :string)
       -> 0.0012s
    == 20180111130853 AddConfigReportsOrigin: migrated (0.0013s) ==================

    == 20180117202932 SubFacetAddInstalledProducts: migrating =====================
-- create_table(:katello_installed_products)
   -> 0.0073s
-- create_table(:katello_subscription_facet_installed_products)
   -> 0.0126s
-- add_foreign_key("katello_subscription_facet_installed_products", "katello_subscription_facets", {:name=>"katello_sub_facet_installed_product_facet_id", :column=>"subscription_facet_id"})
   -> 0.0031s
-- add_foreign_key("katello_subscription_facet_installed_products", "katello_installed_products", {:name=>"katello_sub_facet_installed_product_product_id", :column=>"installed_product_id"})
   -> 0.0016s
== 20180117202932 SubFacetAddInstalledProducts: migrated (0.0251s) ============

== 20180119152210 AddComplianceReasons: migrating =============================
-- create_table(:katello_compliance_reasons)
   -> 0.0106s
-- add_foreign_key("katello_compliance_reasons", "katello_subscription_facets", {:name=>"katello_compliance_reasons_facet_id", :column=>"subscription_facet_id"})
   -> 0.0146s
== 20180119152210 AddComplianceReasons: migrated (0.0255s) ====================

== 20180119205740 ChangeUserTimezoneEmptyToNil: migrating =====================
== 20180119205740 ChangeUserTimezoneEmptyToNil: migrated (0.0150s) ============

== 20180123140634 RemoveLimitLdapFilter: migrating ============================
-- change_column("auth_sources", :ldap_filter, :text, {:limit=>nil})
   -> 0.0019s
== 20180123140634 RemoveLimitLdapFilter: migrated (0.0020s) ===================

== 20180202072115 AddNotificationBuilderToRemoteExecutionFeature: migrating ===
-- add_column(:remote_execution_features, :notification_builder, :string)
   -> 0.0016s
== 20180202072115 AddNotificationBuilderToRemoteExecutionFeature: migrated (0.0018s)

== 20180202123215 AddFeatureIdToJobInvocation: migrating ======================
-- add_column(:job_invocations, :remote_execution_feature_id, :integer, {:index=>true})
   -> 0.0007s
-- add_foreign_key(:job_invocations, :remote_execution_features, {:column=>:remote_execution_feature_id})
   -> 0.0097s
== 20180202123215 AddFeatureIdToJobInvocation: migrated (0.0106s) =============

== 20180207150921 AddRemoteTasks: migrating ===================================
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:foreman_tasks_remote_tasks, {:id=>:integer})
   -> 0.0144s
== 20180207150921 AddRemoteTasks: migrated (0.0148s) ==========================

== 20180207232901 AddTriggeredByToContentViewHistory: migrating ===============
-- add_column(:katello_content_view_histories, :triggered_by_id, :integer, {:null=>true})
   -> 0.0011s
-- add_foreign_key("katello_content_view_histories", "katello_content_view_versions", {:name=>"katello_cv_history_versions_triggered_by_fk", :column=>"triggered_by_id"})
   -> 0.0204s
== 20180207232901 AddTriggeredByToContentViewHistory: migrated (0.0218s) ======

== 20180208053256 CreateTablePreferences: migrating ===========================
-- create_table(:table_preferences)
   -> 0.0072s
-- add_foreign_key(:table_preferences, :users, {:name=>"table_preferences_user_id_fk"})
   -> 0.0019s
-- add_index(:table_preferences, [:user_id, :name], {:unique=>true})
   -> 0.0186s
== 20180208053256 CreateTablePreferences: migrated (0.0282s) ==================

== 20180216092715 UseUuid: migrating ==========================================
-- change_table(:foreman_tasks_tasks, {})
   -> 6.0405s
-- change_table(:foreman_tasks_task_group_members, {})
   -> 0.0271s
-- change_table(:foreman_tasks_locks, {})
   -> 3.4825s
== 20180216092715 UseUuid: migrated (9.5506s) =================================

== 20180216094550 AddTemplateToSubnets: migrating =============================
-- add_column(:subnets, :template_id, :integer)
   -> 0.0010s
== 20180216094550 AddTemplateToSubnets: migrated (0.1691s) ====================

== 20180218191449 AddManifestRefreshedAtToOrganization: migrating =============
-- add_column(:taxonomies, :manifest_refreshed_at, :datetime)
   -> 0.0012s
== 20180218191449 AddManifestRefreshedAtToOrganization: migrated (0.0014s) ====

== 20180226095631 ChangeTaskIdToUuid: migrating ===============================
-- change_table(:job_invocations, {})
   -> 0.0344s
-- change_table(:template_invocations, {})
   -> 0.0106s
== 20180226095631 ChangeTaskIdToUuid: migrated (0.0454s) ======================

== 20180227094827 UseUuidForTaskId: migrating =================================
-- change_table(:katello_content_view_histories, {})
   -> 0.0200s
== 20180227094827 UseUuidForTaskId: migrated (0.0202s) ========================

== 20180228132500 RenameTrustedHosts: migrating ===============================
== 20180228132500 RenameTrustedHosts: migrated (0.0137s) ======================

== 20180322102951 FixProvisionTemplatesAuditableType: migrating ===============
== 20180322102951 FixProvisionTemplatesAuditableType: migrated (0.0296s) ======

== 20180323175122 AddRegistryNamePatternToEnvironment: migrating ==============
-- add_column(:katello_environments, :registry_name_pattern, :string, {:limit=>255, :null=>true})
   -> 0.0014s
-- change_column(:katello_repositories, :container_repository_name, :string, {:unique=>true})
   -> 0.0010s
== 20180323175122 AddRegistryNamePatternToEnvironment: migrated (0.0027s) =====

== 20180326145716 SubscriptionCpIdChange: migrating ===========================
-- remove_column(:katello_subscriptions, :cp_id)
   -> 0.0017s
-- rename_column(:katello_subscriptions, :product_id, :cp_id)
   -> 0.0039s
== 20180326145716 SubscriptionCpIdChange: migrated (0.0060s) ==================

== 20180326150339 MoveStackingId: migrating ===================================
-- add_column(:katello_pools, :stacking_id, :string)
   -> 0.0013s
-- remove_column(:katello_subscriptions, :stacking_id)
   -> 0.0008s
== 20180326150339 MoveStackingId: migrated (0.1094s) ==========================

== 20180326190408 MoveSubscriptionProducts: migrating =========================
-- create_table("katello_pool_products")
   -> 0.0144s
-- add_index("katello_pool_products", [:pool_id, :product_id], {:unique=>true, :name=>"index_katello_pool_products_on_subs_id_prod_id"})
   -> 0.0041s
-- add_foreign_key("katello_pool_products", "katello_pools", {:name=>"katello_pool_products_pool_id_fk", :column=>"pool_id"})
   -> 0.0030s
-- add_foreign_key("katello_pool_products", "katello_products", {:name=>"katello_pool_products_product_id_fk", :column=>"product_id"})
   -> 0.0022s
-- drop_table("katello_subscription_products")
   -> 0.0044s
== 20180326190408 MoveSubscriptionProducts: migrated (0.2125s) ================

== 20180402160223 CleanUpForcePostSyncActionSetting: migrating ================
== 20180402160223 CleanUpForcePostSyncActionSetting: migrated (0.0033s) =======

== 20180404082603 RemoveV3FromOvirtCrUrl: migrating ===========================
== 20180404082603 RemoveV3FromOvirtCrUrl: migrated (0.0080s) ==================

== 20180410140909 AddOrganizationIdToPool: migrating ==========================
-- add_column(:katello_pools, :organization_id, :integer)
   -> 0.0011s
-- add_foreign_key("katello_pools", "taxonomies", {:name=>"katello_pools_organization_id", :column=>"organization_id"})
   -> 0.0023s
== 20180410140909 AddOrganizationIdToPool: migrated (0.2315s) =================

== 20180411160809 AddSudoPasswordToJobInvocation: migrating ===================
-- add_column(:job_invocations, :sudo_password, :string)
   -> 0.0011s
== 20180411160809 AddSudoPasswordToJobInvocation: migrated (0.0013s) ==========

== 20180412124505 AddPriorityScoreToDiscoveryRules: migrating =================
-- change_column(:discovery_rules, :priority, :integer, {:null=>false})
   -> 0.0016s
-- add_index(:discovery_rules, :priority, {:unique=>true})
   -> 0.0045s
== 20180412124505 AddPriorityScoreToDiscoveryRules: migrated (0.0571s) ========

== 20180413153126 ContentFacetApplicableRpmsIndex: migrating ==================
-- add_index(:katello_content_facet_applicable_rpms, :content_facet_id, {:name=>"index_k_content_facet_applicable_rpms_on_content_facet_id"})
   -> 0.0225s
== 20180413153126 ContentFacetApplicableRpmsIndex: migrated (0.0226s) =========

== 20180417031215 AddIgnorableContentToRepository: migrating ==================
-- add_column(:katello_repositories, :ignorable_content, :text, {:null=>true})
   -> 0.0010s
== 20180417031215 AddIgnorableContentToRepository: migrated (0.0012s) =========

== 20180521200848 DropRepoRpmsTimestampNotNull: migrating =====================
-- change_column(:katello_repository_docker_manifest_lists, :created_at, :datetime, {:null=>true})
   -> 0.0012s
-- change_column(:katello_repository_docker_manifest_lists, :updated_at, :datetime, {:null=>true})
   -> 0.0009s
-- change_column(:katello_repository_docker_manifests, :created_at, :datetime, {:null=>true})
   -> 0.0012s
-- change_column(:katello_repository_docker_manifests, :updated_at, :datetime, {:null=>true})
   -> 0.0008s
-- change_column(:katello_repository_errata, :created_at, :datetime, {:null=>true})
   -> 0.0011s
-- change_column(:katello_repository_errata, :updated_at, :datetime, {:null=>true})
   -> 0.0008s
-- change_column(:katello_repository_files, :created_at, :datetime, {:null=>true})
   -> 0.0010s
-- change_column(:katello_repository_files, :updated_at, :datetime, {:null=>true})
   -> 0.0008s
-- change_column(:katello_repository_ostree_branches, :created_at, :datetime, {:null=>true})
   -> 0.0010s
-- change_column(:katello_repository_ostree_branches, :updated_at, :datetime, {:null=>true})
   -> 0.0008s
-- change_column(:katello_repository_package_groups, :created_at, :datetime, {:null=>true})
   -> 0.0014s
-- change_column(:katello_repository_package_groups, :updated_at, :datetime, {:null=>true})
   -> 0.0009s
-- change_column(:katello_repository_puppet_modules, :created_at, :datetime, {:null=>true})
   -> 0.0011s
-- change_column(:katello_repository_puppet_modules, :updated_at, :datetime, {:null=>true})
   -> 0.0009s
-- change_column(:katello_repository_rpms, :created_at, :datetime, {:null=>true})
   -> 0.0010s
-- change_column(:katello_repository_rpms, :updated_at, :datetime, {:null=>true})
   -> 0.0009s
-- change_column(:katello_repository_srpms, :created_at, :datetime, {:null=>true})
   -> 0.0009s
-- change_column(:katello_repository_srpms, :updated_at, :datetime, {:null=>true})
   -> 0.0008s
== 20180521200848 DropRepoRpmsTimestampNotNull: migrated (0.0199s) ============

== 20180601102951 FixAllTemplatesAuditableType: migrating =====================
== 20180601102951 FixAllTemplatesAuditableType: migrated (0.0209s) ============

== 20180612163403 AddForeignKeyToHypervisorId: migrating ======================
-- add_foreign_key(:katello_pools, :hosts, {:name=>"katello_pools_hypervisor_fk", :column=>"hypervisor_id"})
   -> 0.0034s
== 20180612163403 AddForeignKeyToHypervisorId: migrated (0.0035s) =============

== 20180612164926 AddContentOrgId: migrating ==================================
-- add_column(:katello_contents, :organization_id, :integer, {:null=>true})
   -> 0.0007s
-- add_foreign_key(:katello_contents, :taxonomies, {:column=>:organization_id, :primary_key=>:id})
   -> 0.0023s
-- change_column(:katello_contents, :organization_id, :integer, {:null=>false})
   -> 0.0022s
== 20180612164926 AddContentOrgId: migrated (0.0348s) =========================

== 20180612165011 RemoveContentFieldsFromHost: migrating ======================
-- remove_column(:hosts, :content_view_id)
   -> 0.0084s
-- remove_column(:hosts, :lifecycle_environment_id)
   -> 0.0007s
== 20180612165011 RemoveContentFieldsFromHost: migrated (0.0093s) =============

== 20180626160422 AddUpstreamPoolIdToKatelloPool: migrating ===================
-- add_column(:katello_pools, :upstream_pool_id, :string)
   -> 0.0009s
== 20180626160422 AddUpstreamPoolIdToKatelloPool: migrated (0.0011s) ==========

== 20180724062531 ChangeOutOfSyncDefault: migrating ===========================
== 20180724062531 ChangeOutOfSyncDefault: migrated (0.0083s) ==================

== 20180724152638 AdjustPuppetOutOfSyncInterval: migrating ====================
== 20180724152638 AdjustPuppetOutOfSyncInterval: migrated (0.0073s) ===========

** Invoke db:_dump (first_time)
** Execute db:_dump

I was able to fix with the following (for 1.17 -> 1.18)

mv /etc/foreman/logging.yaml /etc/foreman/logging.yaml.rpmsave
wget https://raw.githubusercontent.com/theforeman/foreman/1.18-stable/config/logging.yaml

Thanks!

1 Like

Do you still have the setting.yaml file which was causing the error? Can you pastebin it?

@lzap note this is logging.yaml. We’ve seen a similar bug report downstream. The problem is that the code relies on a certain content of logging.yaml and otherwise crashes. Then we treat logging.yaml as a user configuration by putting it in /etc/foreman and not replacing it if the user modified it. IMHO we should decide: either it’s a user config and the code should be defensive or it’s not a config and it should be moved to /usr/share/foreman to be treated as code.

I no longer have a copy of it. I can tell you it looked quite a bit different than the current ones. Would it help if I pulled it from a snapshot from before the upgrade? Thats a bit of work, but I can do it, if it helps.

It looked relatively basic. I know for sure it didnt have the json_items line.

I think we should treat it as a code - there is possible to override everything logging-specific from settings.yaml

I opened Bug #24943: Older logging.yaml file breaks upgrade to Foreman 1.18 - Packaging - Foreman

https://github.com/theforeman/foreman-packaging/pull/3000

I haven’t been able to test it yet though.

Thanks, this was always little bit weird to me.