Project

General

Profile

Bug #26589 ยป mysql_install_notes.txt

Notes during installation. Incl patches and workarounds (ish) up to 20180920214134 - Dan Smythe, 04/11/2019 10:13 AM

 
####################
# Setup
####################

Fresh install of CentOS 7.6
Install MySQL Percona Server 5.7 ( socket in /var/run/mysql/3306.sock )
Created symlink from /var/run/mysql/3306.sock to /var/lib/mysql/mysql.sock
Created foreman_production database
Created foreman db user ALL PRIVILEGES ON foreman_production.*

sudo yum -y localinstall https://fedorapeople.org/groups/katello/releases/yum/3.11/katello/el7/x86_64/katello-repos-latest.rpm
sudo yum -y localinstall https://yum.theforeman.org/releases/1.21/el7/x86_64/foreman-release.rpm
sudo yum -y localinstall https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
sudo yum -y localinstall https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install foreman-release-scl
sudo yum -y update

sudo yum -y install katello

####################
# Install
####################

[root@somehost~]# foreman-installer --scenario katello \
> --enable-foreman-cli-discovery \
> --enable-foreman-cli-openscap \
> --enable-foreman-cli-remote-execution \
> --enable-foreman-cli-tasks \
> --enable-foreman-compute-ec2 \
> --enable-foreman-compute-openstack \
> --enable-foreman-compute-vmware \
> --enable-foreman-plugin-ansible \
> --enable-foreman-plugin-bootdisk \
> --enable-foreman-plugin-chef \
> --enable-foreman-plugin-default-hostgroup \
> --enable-foreman-plugin-discovery \
> --enable-foreman-plugin-hooks \
> --enable-foreman-plugin-openscap \
> --enable-foreman-plugin-puppetdb \
> --enable-foreman-plugin-remote-execution \
> --no-enable-foreman-plugin-setup \
> --enable-foreman-plugin-tasks \
> --no-enable-foreman-plugin-templates \
> --enable-foreman-proxy \
> --enable-foreman-proxy-content \
> --enable-foreman-proxy-plugin-ansible \
> --enable-foreman-proxy-plugin-chef \
> --no-enable-foreman-proxy-plugin-dhcp-infoblox \
> --enable-foreman-proxy-plugin-discovery \
> --no-enable-foreman-proxy-plugin-dns-infoblox \
> --enable-foreman-proxy-plugin-openscap \
> --enable-foreman-proxy-plugin-pulp \
> --enable-foreman-proxy-plugin-remote-execution-ssh \
> --enable-katello \
> --enable-puppet \
> --certs-city=$MY_CITY \
> --certs-group=$FOREMAN_USER \
> --certs-org=$MY_COMPANY \
> --certs-org-unit=$MY_DEPARTMENT' \
> --certs-state=$MY_STATE \
> --foreman-db-host='localhost' \
> --foreman-db-adapter='mysql2' \
> --foreman-db-database='foreman_production' \
> --foreman-db-password=$MY_DB_PASSWORD \
> --foreman-db-port=3306 \
> --foreman-db-username=$MY_DB_USERNAME \
> --foreman-gpgcheck=false \
> --foreman-db-manage=false \
> --foreman-db-type='mysql' \
> --foreman-initial-admin-email=$MY_EMAIL \
> --foreman-initial-admin-first-name=$MY_NAME \
> --foreman-initial-admin-last-name=$MY_SURNAME \
> --foreman-initial-location=$MY_DATACENTER \
> --foreman-initial-organization=$MY_ORGANIZATION \
> --foreman-puppetrun=true \
> --foreman-plugin-tasks-automatic-cleanup=true \
> --foreman-plugin-tasks-cron-line='00 00 1 * *' \
> --puppet-runinterval=1800 \
> --puppet-show-diff=true \
> --puppet-splay=true \
> --puppet-splaylimit='10m' \
> --puppet-environment=$MY_PUPPET_ENVIRONMENT \
> --puppet-server-metrics-graphite-enable='true' \
> --puppet-server-metrics-graphite-host=$MY_GRAPHITE_ENDPOINT \
> --puppet-server-metrics-graphite-interval=10 \
> --puppet-server-metrics-server-id=$MY_METRIC_ID
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: Failed to call refresh: '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/exec.rb:164:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/exec.rb:603:in `refresh'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:147:in `process_callback'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:34:in `block in process_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:119:in `block in queued_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `queued_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:33:in `process_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:250:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/usr/share/gems/gems/kafo-2.1.0/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:348:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
/Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: '/usr/sbin/foreman-rake db:seed' returned 1 instead of one of [0]
/Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: '/usr/sbin/foreman-rake db:seed' returned 1 instead of one of [0]
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/exec.rb:164:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/exec.rb:603:in `refresh'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:147:in `process_callback'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:34:in `block in process_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:119:in `block in queued_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `queued_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:33:in `process_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:250:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/usr/share/gems/gems/kafo-2.1.0/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:348:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
Installing Package[tfm-rubygem-foreman_ansible] [78%] [......................................................................................................................... ] Execution of '/usr/sbin/foreman-rake -- config -k 'puppetdb_dashboard_address' -v 'http://localhost:8080/pdb/dashboard'' returned 1: /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
rake aborted!
NoMethodError: undefined method `settings_type' for nil:NilClass
/usr/share/foreman/lib/tasks/config.rake:105:in `block in run_key_values'
/usr/share/foreman/lib/tasks/config.rake:100:in `each'
/usr/share/foreman/lib/tasks/config.rake:100:in `run_key_values'
/usr/share/foreman/lib/tasks/config.rake:77:in `run'
/usr/share/foreman/lib/tasks/config.rake:167:in `block in <top (required)>'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => config
(See full trace by running task with --trace)
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/execution.rb:235:in `execute'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_config_entry/cli.rb:21:in `block in run_foreman_config'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_config_entry/cli.rb:10:in `chdir'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_config_entry/cli.rb:10:in `run_foreman_config'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_config_entry/cli.rb:35:in `run_foreman_config'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_config_entry/cli.rb:78:in `value='
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:194:in `call_provider'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:501:in `set'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:561:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:236:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:134:in `sync_if_needed'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:88:in `block in perform_changes'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in `perform_changes'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:21:in `evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:233:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:249:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/usr/share/gems/gems/kafo-2.1.0/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:348:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
/Stage[main]/Foreman::Plugin::Puppetdb/Foreman_config_entry[puppetdb_dashboard_address]/value: change from to http://localhost:8080/pdb/dashboard failed: Execution of '/usr/sbin/foreman-rake -- config -k 'puppetdb_dashboard_address' -v 'http://localhost:8080/pdb/dashboard'' returned 1: /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
rake aborted!
NoMethodError: undefined method `settings_type' for nil:NilClass
/usr/share/foreman/lib/tasks/config.rake:105:in `block in run_key_values'
/usr/share/foreman/lib/tasks/config.rake:100:in `each'
/usr/share/foreman/lib/tasks/config.rake:100:in `run_key_values'
/usr/share/foreman/lib/tasks/config.rake:77:in `run'
/usr/share/foreman/lib/tasks/config.rake:167:in `block in <top (required)>'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => config
(See full trace by running task with --trace)
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[somehost.somedomain.com]: Could not evaluate: Proxy $MY_HOSTNAME cannot be retrieved: unknown error (response 503)
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:7:in `proxy'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:13:in `id'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:17:in `exists?'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in `retrieve'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1070:in `retrieve'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1098:in `retrieve_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:300:in `from_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:20:in `evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:233:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:249:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/usr/share/gems/gems/kafo-2.1.0/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:348:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[$MY_HOSTNAME]: Failed to call refresh: Proxy $MY_HOSTNAME cannot be retrieved: unknown error (response 503)
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[$MY_HOSTNAME]: Proxy $MY_HOSTNAME cannot be retrieved: unknown error (response 503)
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:7:in `proxy'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:13:in `id'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:17:in `exists?'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in `retrieve'
/usr/share/foreman-installer/modules/foreman/lib/puppet/type/foreman_smartproxy.rb:72:in `refresh'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:147:in `process_callback'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:34:in `block in process_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:119:in `block in queued_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `queued_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:33:in `process_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:250:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/usr/share/gems/gems/kafo-2.1.0/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:348:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
Installing Done [100%] [..........................................................................................................................................................]
Something went wrong! Check the log for ERROR-level output
The full log is at /var/log/foreman-installer/katello.log

foreman_production> select MAX(version) from schema_migrations;
+----------------+
| MAX(version) |
+----------------+
| 20131014225132 |
+----------------+
1 row in set (0.00 sec)

Next migration: /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.0/db/migrate/20131016124255_add_foreign_keys_engine.rb

####################
# Error 1
####################

[root@somehost ~]# /usr/sbin/foreman-rake db:migrate
/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
== 20131016124255 AddForeignKeysEngine: migrating =============================
-- add_foreign_key("katello_activation_keys", "katello_content_views", {:column=>"content_view_id", :name=>"activation_keys_content_view_id_fk"})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Mysql2::Error: Can't write; duplicate key in table '#sql-2f8d_275': ALTER TABLE `katello_activation_keys` ADD CONSTRAINT `activation_keys_content_view_id_fk`
FOREIGN KEY (`content_view_id`)
REFERENCES `katello_content_views` (`id`)

Everything was applied except the last 2 FK's
add_foreign_key "katello_user_notices", "katello_notices", :name => "user_notices_notice_id_fk", :column => 'notice_id'
add_foreign_key "katello_user_notices", "users", :name => "user_notices_user_id_fk", :column => 'user_id'

I applied them manually:
ALTER TABLE katello_user_notices ADD FOREIGN KEY `user_notices_notice_id_fk` (`notice_id`) REFERENCES `katello_notices` (`id`);
ALTER TABLE katello_user_notices ADD FOREIGN KEY `user_notices_user_id_fk` (`user_id`) REFERENCES `users` (`id`);

And inserted the migration record:
foreman_production> INSERT INTO schema_migrations VALUES ( 20131016124255 );

And re-ran db:migrate

####################
# Error 2
####################

Mysql2::Error: Specified key was too long; max key length is 3072 bytes: CREATE INDEX `katello_rpms_fields_index` ON `katello_rpms` (`id`, `uuid`, `name`, `version`, `release`, `arch`, `version_sortable`, `release_sortable`)
In /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.0/db/migrate/20150613134559_add_rpm.rb:20:in `up'


Commented Line 20:
20 # add_index :katello_rpms, [:id, :uuid, :name, :version, :release, :arch, :version_sortable, :release_sortable], :name => 'katello_rpms_fields_index'
--- /home/$MY_USERNAME/20150613134559_add_rpm.rb.orig 2019-04-11 00:17:51.613312959 -0700
+++ /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.0/db/migrate/20150613134559_add_rpm.rb 2019-04-11 00:18:21.630862198 -0700
@@ -17,7 +17,7 @@
end

add_index :katello_rpms, :uuid, :unique => true
- add_index :katello_rpms, [:id, :uuid, :name, :version, :release, :arch, :version_sortable, :release_sortable], :name => 'katello_rpms_fields_index'
+# add_index :katello_rpms, [:id, :uuid, :name, :version, :release, :arch, :version_sortable, :release_sortable], :name => 'katello_rpms_fields_index'

create_table "katello_repository_rpms" do |t|
t.references :rpm, :null => false

Dropped katello_rpms
Reran db:migrate
( MUST ADD INDEX LATER )


####################
# Error 3
####################

Next up:
Mysql2::Error: Cannot drop index 'index_katello_subscription_facets_on_user_id': needed in a foreign key constraint: DROP INDEX `index_katello_subscription_facets_on_user_id` ON
`katello_subscription_facets`
In: /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.0/db/migrate/20161028153131_sub_facet_user_index_not_uniq.rb

foreman_production> ALTER TABLE katello_subscription_facets DROP FOREIGN KEY `fk_rails_ee1659f1ac`;
foreman_production> ALTER TABLE katello_subscription_facets DROP KEY `index_katello_subscription_facets_on_user_id`;
foreman_production> ALTER TABLE katello_subscription_facets ADD KEY `index_katello_subscription_facets_on_user_id` (`user_id`);
foreman_production> ALTER TABLE katello_subscription_facets ADD FOREIGN KEY `fk_rails_ee1659f1ac`(`user_id`) REFERENCES `users`(`id`);
foreman_production> INSERT INTO schema_migrations VALUES ( 20161028153131 );


####################
# Error 4
####################

Next up:
-- change_column(:katello_pools, :start_date, "timestamp USING CAST(start_date AS timestamp without time zone)", {})
rake aborted!
SystemStackError: stack level too deep
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/map.rb:192:in `fetch_or_store'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/type/type_map.rb:20:in `fetch'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/type/type_map.rb:16:in `lookup'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/type/type_map.rb:39:in `block in alias_type'

In: /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.0/db/migrate/20170222131211_change_pool_columns_to_dates.rb

# Guessing here....

foreman_production> ALTER TABLE katello_pools MODIFY start_date TIMESTAMP, MODIFY end_date TIMESTAMP;
Query OK, 0 rows affected (0.02 sec)
Records: 0 Duplicates: 0 Warnings: 0


####################
# Error 5
####################

Next up:
Mysql2::Error: Specified key was too long; max key length is 3072 bytes: CREATE INDEX `katello_debs_fields_index` ON `katello_debs` (`id`, `uuid`, `name`, `version`, `architecture`, `version_sortable`)
In: /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.0/db/migrate/20170714144125_add_deb.rb:16:in `up'

Commented line 16
# add_index :katello_debs, [:id, :uuid, :name, :version, :architecture, :version_sortable], :name => 'katello_debs_fields_index'

DROP TABLE katello_debs;

Rerun migrate


####################
# Error 6
####################

Next up:
-- add_index(:katello_srpms, [:id, :uuid, :name, :version, :release, :arch, :version_sortable, :release_sortable], {:name=>"katello_srpms_fields_index"})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Mysql2::Error: Specified key was too long; max key length is 3072 bytes: CREATE INDEX `katello_srpms_fields_index` ON `katello_srpms` (`id`, `uuid`, `name`, `version`, `release`, `arch`, `version_sortable`, `release_sortable`)

In: /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.0/db/migrate/20171011175510_add_srpm.rb

Comment line 20:
# add_index :katello_srpms, [:id, :uuid, :name, :version, :release, :arch, :version_sortable, :release_sortable], :name => 'katello_srpms_fields_index'

DROP TABLE katello_srpms


####################
# Error 7
####################

Next up:
-- add_foreign_key("katello_subscription_facet_installed_products", "katello_subscription_facets", {:name=>"katello_sub_facet_installed_product_facet_id", :column=>"subscription_facet_id"})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Column `subscription_facet_id` on table `katello_subscription_facet_installed_products` has a type of `bigint(20)`.
This does not match column `id` on `katello_subscription_facets`, which has type `int(11)`.
To resolve this issue, change the type of the `subscription_facet_id` column on `katello_subscription_facet_installed_products` to be :integer. (For example `t.integer subscription_facet_id`).

Original message: Mysql2::Error: Cannot add foreign key constraint: ALTER TABLE `katello_subscription_facet_installed_products` ADD CONSTRAINT `katello_sub_facet_installed_product_facet_id`
FOREIGN KEY (`subscription_facet_id`)
REFERENCES `katello_subscription_facets` (`id`)


In: /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.0/db/migrate/20180117202932_sub_facet_add_installed_products.rb


ALTER TABLE foreman_production.katello_subscription_facet_pools DROP FOREIGN KEY katello_sub_facet_pools_sf_id_fk;
ALTER TABLE foreman_production.katello_subscription_facet_activation_keys DROP FOREIGN KEY katello_subscription_facet_activation_keys_sa_id;

ALTER TABLE katello_subscription_facets MODIFY id BIGINT NOT NULL AUTO_INCREMENT;
ALTER TABLE katello_subscription_facet_activation_keys MODIFY subscription_facet_id BIGINT NOT NULL;
ALTER TABLE katello_subscription_facet_activation_keys ADD CONSTRAINT `katello_subscription_facet_activation_keys_sa_id` FOREIGN KEY ( `subscription_facet_id` ) REFERENCES `katello_subscription_facets`(`id`);

ALTER TABLE katello_subscription_facet_pools MODIFY subscription_facet_id BIGINT DEFAULT NULL;

ALTER TABLE katello_subscription_facet_pools ADD CONSTRAINT `katello_sub_facet_pools_sf_id_fk` FOREIGN KEY (`subscription_facet_id`) REFERENCES `katello_subscription_facets` (`id`);

# Doing this one because it's the last thing in the migration script.
ALTER TABLE katello_subscription_facet_installed_products ADD CONSTRAINT `katello_sub_facet_installed_product_product_id` FOREIGN KEY (`installed_product_id`) REFERENCES `katello_installed_products` (`id`);

INSERT INTO schema_migrations VALUES (20180117202932);


####################
# Error 8
####################

Next up:
Column `pool_id` on table `katello_pool_products` has a type of `bigint(20)`.
This does not match column `id` on `katello_pools`, which has type `int(11)`.
To resolve this issue, change the type of the `pool_id` column on `katello_pool_products` to be :integer. (For example `t.integer pool_id`).

Original message: Mysql2::Error: Cannot add foreign key constraint: ALTER TABLE `katello_pool_products` ADD CONSTRAINT `katello_pool_products_pool_id_fk`
FOREIGN KEY (`pool_id`)
REFERENCES `katello_pools` (`id`)

In: /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.0/db/migrate/20180326190408_move_subscription_products.rb

--- /home/$MY_USERNAME/20180326190408_move_subscription_products.rb.orig 2019-04-11 01:10:20.711589703 -0700
+++ /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.0/db/migrate/20180326190408_move_subscription_products.rb 2019-04-11 01:17:30.882656548 -0700
@@ -23,10 +23,12 @@

def up
create_table "katello_pool_products" do |t|
- t.references :pool
- t.references :product
+ t.integer :pool_id
+ t.integer :product_id
t.timestamps
end
+ add_index "katello_pool_products", :pool_id
+ add_index "katello_pool_products", :product_id
add_index "katello_pool_products", [:pool_id, :product_id], :unique => true,
:name => "index_katello_pool_products_on_subs_id_prod_id"

DROP TABLE katello_pool_products
Rerun migrate.


####################
# Error 9
####################

Next Up:

Mysql2::Error: Specified key was too long; max key length is 3072 bytes: ALTER TABLE `tokens` CHANGE `value` `value` varchar(900) DEFAULT NULL
/opt/theforeman/tfm/root/usr/share/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:120:in `_query'


In: /usr/share/foreman/db/migrate/20180613100703_add_type_to_token.rb
Was only a warning, but mysql reduced the key to 768


####################
# Error 10
####################

Next:
StandardError: An error has occurred, all later migrations canceled:

Column `repository_id` on table `katello_repository_module_streams` has a type of `bigint(20)`.
This does not match column `id` on `katello_repositories`, which has type `int(11)`.
To resolve this issue, change the type of the `repository_id` column on `katello_repository_module_streams` to be :integer. (For example `t.integer repository_id`).

Original message: Mysql2::Error: Cannot add foreign key constraint: ALTER TABLE `katello_repository_module_streams` ADD CONSTRAINT `katello_repo_mod_stream_repo_id_fk`
FOREIGN KEY (`repository_id`)
REFERENCES `katello_repositories` (`id`)


In: /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.0/db/migrate/20180807145652_create_katello_module_streams.rb

SKIPPED IT ( inserted record into schema_migrations )


####################
# Error 11
####################

Next:

Column `root_id` on table `katello_repositories` has a type of `int(11)`.
This does not match column `id` on `katello_root_repositories`, which has type `bigint(20)`.
To resolve this issue, change the type of the `root_id` column on `katello_repositories` to be :integer. (For example `t.integer root_id`).

Original message: Mysql2::Error: Cannot add foreign key constraint: ALTER TABLE `katello_repositories` ADD CONSTRAINT `katello_root_repositories_repo_id`
FOREIGN KEY (`root_id`)
REFERENCES `katello_root_repositories` (`id`)
/opt/theforeman/tfm/root/usr/share/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:120:in `_query'


In /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.0/db/migrate/20180920214134_create_repository_root.rb


I give up. I'm in 2018 and this one is just a beast to try to fix, especially because it's aborted itself in the middle so I'd either have to manually roll forward or back, yuck.

https://bpaste.net/show/7aa2233ca5ae
    (1-1/1)