Project

General

Profile

Actions

Bug #9928

closed

db:migrate database setup is not idempotent on 1.8.0

Added by Dominic Cleal about 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Foreman modules
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Foreman 1.8.0-RC1 and now RC2 tests are reporting non-idempotent installer runs on Debian and Ubuntu.

not ok 12 check for no changes when running the installer
# (in test file /usr/bin/fb-install-foreman.bats, line 152)
#   `foreman-installer --no-colors -v --detailed-exitcodes' failed with status 2
# tput: No value for $TERM and no -T specified
# [ INFO 2015-03-27 12:35:13 verbose] Executing hooks in group boot
# [ INFO 2015-03-27 12:35:13 verbose] All hooks in group boot finished
# [ INFO 2015-03-27 12:35:13 verbose] Executing hooks in group init
# [ INFO 2015-03-27 12:35:13 verbose] All hooks in group init finished
# [ INFO 2015-03-27 12:35:13 verbose] Loading default values from puppet modules...
# [ INFO 2015-03-27 12:35:13 verbose] ... finished
# [ INFO 2015-03-27 12:35:13 verbose] Executing hooks in group pre_values
# [ INFO 2015-03-27 12:35:13 verbose] All hooks in group pre_values finished
# [ INFO 2015-03-27 12:35:13 verbose] Executing hooks in group pre_validations
# [ INFO 2015-03-27 12:35:13 verbose] All hooks in group pre_validations finished
# [ INFO 2015-03-27 12:35:13 verbose] Running validation checks
# [ INFO 2015-03-27 12:35:13 verbose] Executing hooks in group pre
# [ INFO 2015-03-27 12:35:13 verbose] All hooks in group pre finished
# [ INFO 2015-03-27 12:35:15 verbose]  Loading facts in /usr/share/foreman-installer/modules/stdlib/lib/facter/root_home.rb
# [ INFO 2015-03-27 12:35:15 verbose]  Loading facts in /usr/share/foreman-installer/modules/stdlib/lib/facter/puppet_vardir.rb
# [ INFO 2015-03-27 12:35:15 verbose]  Loading facts in /usr/share/foreman-installer/modules/stdlib/lib/facter/facter_dot_d.rb
# [ INFO 2015-03-27 12:35:15 verbose]  Loading facts in /usr/share/foreman-installer/modules/stdlib/lib/facter/pe_version.rb
# [ INFO 2015-03-27 12:35:15 verbose]  Loading facts in /usr/share/foreman-installer/modules/foreman/lib/facter/sssd.rb
# [ INFO 2015-03-27 12:35:15 verbose]  Loading facts in /usr/share/foreman-installer/modules/apt/lib/facter/apt_update_last_success.rb
# [ INFO 2015-03-27 12:35:15 verbose]  Loading facts in /usr/share/foreman-installer/modules/apt/lib/facter/apt_updates.rb
# [ INFO 2015-03-27 12:35:15 verbose]  Loading facts in /usr/share/foreman-installer/modules/firewall/lib/facter/ip6tables_version.rb
# [ INFO 2015-03-27 12:35:15 verbose]  Loading facts in /usr/share/foreman-installer/modules/firewall/lib/facter/iptables_version.rb
# [ INFO 2015-03-27 12:35:15 verbose]  Loading facts in /usr/share/foreman-installer/modules/firewall/lib/facter/iptables_persistent_version.rb
# [ INFO 2015-03-27 12:35:15 verbose]  Loading facts in /usr/share/foreman-installer/modules/staging/lib/facter/staging_http_get.rb
# [ INFO 2015-03-27 12:35:15 verbose]  Loading facts in /usr/share/foreman-installer/modules/staging/lib/facter/staging_windir.rb
# [ INFO 2015-03-27 12:35:15 verbose]  Loading facts in /usr/share/foreman-installer/modules/concat/lib/facter/concat_basedir.rb
# [ WARN 2015-03-27 12:35:17 verbose]  Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
# [ WARN 2015-03-27 12:35:26 verbose]  Compiled catalog for foreman-trusty.example.com in environment production in 10.52 seconds
# [ INFO 2015-03-27 12:35:31 verbose]  Loading facts in /usr/share/foreman-installer/modules/stdlib/lib/facter/root_home.rb
# [ INFO 2015-03-27 12:35:31 verbose]  Loading facts in /usr/share/foreman-installer/modules/stdlib/lib/facter/puppet_vardir.rb
# [ INFO 2015-03-27 12:35:31 verbose]  Loading facts in /usr/share/foreman-installer/modules/stdlib/lib/facter/facter_dot_d.rb
# [ INFO 2015-03-27 12:35:31 verbose]  Loading facts in /usr/share/foreman-installer/modules/stdlib/lib/facter/pe_version.rb
# [ INFO 2015-03-27 12:35:31 verbose]  Loading facts in /usr/share/foreman-installer/modules/foreman/lib/facter/sssd.rb
# [ INFO 2015-03-27 12:35:31 verbose]  Loading facts in /usr/share/foreman-installer/modules/apt/lib/facter/apt_update_last_success.rb
# [ INFO 2015-03-27 12:35:31 verbose]  Loading facts in /usr/share/foreman-installer/modules/apt/lib/facter/apt_updates.rb
# [ INFO 2015-03-27 12:35:31 verbose]  Loading facts in /usr/share/foreman-installer/modules/firewall/lib/facter/ip6tables_version.rb
# [ INFO 2015-03-27 12:35:31 verbose]  Loading facts in /usr/share/foreman-installer/modules/firewall/lib/facter/iptables_version.rb
# [ INFO 2015-03-27 12:35:31 verbose]  Loading facts in /usr/share/foreman-installer/modules/firewall/lib/facter/iptables_persistent_version.rb
# [ INFO 2015-03-27 12:35:31 verbose]  Loading facts in /usr/share/foreman-installer/modules/staging/lib/facter/staging_http_get.rb
# [ INFO 2015-03-27 12:35:31 verbose]  Loading facts in /usr/share/foreman-installer/modules/staging/lib/facter/staging_windir.rb
# [ INFO 2015-03-27 12:35:31 verbose]  Loading facts in /usr/share/foreman-installer/modules/concat/lib/facter/concat_basedir.rb
# [ INFO 2015-03-27 12:35:44 verbose]  Applying configuration version '1427459716'
# [ WARN 2015-03-27 12:36:10 verbose]  /Stage[main]/Foreman::Database/Foreman_config_entry[db_pending_migration]/value: value changed '' to 'false'
# [ INFO 2015-03-27 12:36:10 verbose]  /Stage[main]/Foreman::Database/Foreman_config_entry[db_pending_migration]: Scheduling refresh of Foreman::Rake[db:migrate]
# [ INFO 2015-03-27 12:36:10 verbose]  Foreman::Rake[db:migrate]: Scheduling refresh of Exec[foreman-rake-db:migrate]
# [ WARN 2015-03-27 12:36:19 verbose]  /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: Triggered 'refresh' from 1 events
# [ WARN 2015-03-27 12:36:24 verbose]  /Stage[main]/Foreman::Database/Foreman_config_entry[db_pending_seed]/value: value changed '' to 'false'
# [ INFO 2015-03-27 12:36:24 verbose]  /Stage[main]/Foreman::Database/Foreman_config_entry[db_pending_seed]: Scheduling refresh of Foreman::Rake[db:seed]
# [ INFO 2015-03-27 12:36:24 verbose]  Foreman::Rake[db:seed]: Scheduling refresh of Exec[foreman-rake-db:seed]
# [ WARN 2015-03-27 12:36:33 verbose]  /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Triggered 'refresh' from 1 events
# [ INFO 2015-03-27 12:36:33 verbose]  Foreman::Rake[db:seed]: Scheduling refresh of Foreman::Rake[apipie:cache:index]
# [ INFO 2015-03-27 12:36:33 verbose]  Foreman::Rake[apipie:cache:index]: Scheduling refresh of Exec[foreman-rake-apipie:cache:index]
# [ WARN 2015-03-27 12:37:23 verbose]  /Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache:index]/Exec[foreman-rake-apipie:cache:index]: Triggered 'refresh' from 1 events
# [ INFO 2015-03-27 12:37:23 verbose]  Class[Foreman::Database]: Scheduling refresh of Class[Foreman::Service]
# [ INFO 2015-03-27 12:37:23 verbose]  Class[Foreman::Database]: Scheduling refresh of Foreman::Plugin[setup]
# [ INFO 2015-03-27 12:37:23 verbose]  Class[Foreman::Service]: Scheduling refresh of Exec[restart_foreman]
# [ INFO 2015-03-27 12:37:23 verbose]  Class[Foreman::Service]: Scheduling refresh of Service[foreman]
# [ WARN 2015-03-27 12:37:24 verbose]  /Stage[main]/Foreman::Service/Service[foreman]: Triggered 'refresh' from 1 events
# [ WARN 2015-03-27 12:37:24 verbose]  /Stage[main]/Foreman::Service/Exec[restart_foreman]: Triggered 'refresh' from 1 events
# [ WARN 2015-03-27 12:37:42 verbose]  Finished catalog run in 128.71 seconds
# [ INFO 2015-03-27 12:37:44 verbose] Puppet has finished, bye!

(This could equally be a core/plugin issue, but I don't know.)

Note that we have never seen this on nightly builds, which makes me suspect we've somehow lost a commit somewhere, or have different packages available.

I've tried a couple of times to reproduce this on a clean VM outside of foreman-bats, but haven't succeeded.


Files

foreman-debug.tar.xz foreman-debug.tar.xz 127 KB Dominic Cleal, 03/27/2015 10:27 AM
fb-install-foreman.bats.out fb-install-foreman.bats.out 8.73 KB Dominic Cleal, 03/27/2015 10:27 AM
Actions #2

Updated by Dominic Cleal about 9 years ago

It seems that something to do with our foreman_config_entry is wrong, it isn't retrieving the current value correctly. We just had a visitor in IRC with the same issue.

Actions #3

Updated by Dominic Cleal about 9 years ago

I reproduced it now on 1.8 specifically, not nightlies and by running puppet resource foreman_config_entry --modulepath /usr/share/foreman-installer/modules with some extra debug.

Running foreman-config is printing out on stderr:

foreman-config script is deprecated. Please consider using `foreman-rake config` instead
rake aborted!
couldn't find HOME environment -- expanding `~'

I guess this is somehow related to https://github.com/theforeman/foreman-packaging/pull/472.

Actions #4

Updated by Dominic Cleal about 9 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Dominic Cleal
  • Pull request https://github.com/theforeman/puppet-foreman/pull/312 added
  • Pull request deleted ()
Actions #5

Updated by Dominic Cleal about 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF