Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1579954 - [Upgrade] SNAP3 to SNAP4 fails due to mongo errors
Summary: [Upgrade] SNAP3 to SNAP4 fails due to mongo errors
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.4.0
Assignee: Chris Roberts
QA Contact: Lukas Pramuk
URL: https://projects.theforeman.org/issue...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-18 19:58 UTC by Mike McCune
Modified: 2019-11-05 23:20 UTC (History)
8 users (show)

Fixed In Version: katello-installer-base-3.7.0-1.rc1.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:12:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 23030 0 Normal Resolved [RFE] Update mongodb to 3.X 2021-01-27 07:17:37 UTC
Foreman Issue Tracker 23649 0 Normal Closed Upgrade after Mongo 3.x is installed fails out on remove_nodes_distributors 2021-01-27 07:17:37 UTC
Foreman Issue Tracker 23767 0 Normal Resolved Update Katello spec enable SCL for Mongo 2021-01-27 07:17:37 UTC

Description Mike McCune 2018-05-18 19:58:46 UTC
1) Install SNAP3
2) Try to upgrade to SNAP4:

# satellite-installer --upgrade
[...]
foreman-rake db:migrate finished successfully!
Upgrade Step: remove_nodes_distributors...
sh: mongo: command not found
mongo pulp_database --eval  'db.repo_distributors.remove({'distributor_type_id': "nodes_http_distributor"});' failed! Check the output for error!
Upgrade step remove_nodes_distributors failed. Check logs for more information.

Comment 2 Mike McCune 2018-05-18 20:08:36 UTC
Also hit:


mongo pulp_database --eval  'db.repo_distributors.remove({'distributor_type_id': "nodes_http_distributor"});' finished successfully!
Upgrade Step: mongo_mmapv1_check...
Upgrade step mongo_mmapv1_check failed. Check logs for more information.

Comment 3 Mike McCune 2018-05-18 20:21:58 UTC
and another:


/usr/share/candlepin/cpdb --update --database '//localhost/candlepin' --user candlepin --password nwu39XDmrTCsjMBLyJV4gZEZUTwfcriM finished successfully!
Upgrade Step: migrate_foreman...
/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.4/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here
foreman-rake db:migrate finished successfully!
Upgrade Step: Running installer...
 Facter: error while resolving custom fact "mongodb_is_master": No such file or directory @ rb_sysopen - /etc/mongodb.conf
backtrace:
/opt/puppetlabs/puppet/lib/ruby/2.4.0/psych.rb:472:in `initialize'
/opt/puppetlabs/puppet/lib/ruby/2.4.0/psych.rb:472:in `open'
/opt/puppetlabs/puppet/lib/ruby/2.4.0/psych.rb:472:in `load_file'
/usr/share/katello-installer-base/modules/mongodb/lib/facter/is_master.rb:17:in `block (2 levels) in <top (required)>'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/facts/facter.rb:35:in `to_hash'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/facts/facter.rb:35:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:198:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/node.rb:135:in `fact_merge'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/node/plain.rb:18:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:198:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:215:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:174: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:661: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:137:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
 Facter: error while resolving custom fact "mongodb_version": undefined method `[]' for nil:NilClass
backtrace:
/usr/share/katello-installer-base/modules/mongodb/lib/facter/mongodb_version.rb:5:in `block (2 levels) in <top (required)>'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/facts/facter.rb:35:in `to_hash'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/facts/facter.rb:35:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:198:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/node.rb:135:in `fact_merge'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/node/plain.rb:18:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:198:in `find'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:215:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:174: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:661: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:137:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'

Comment 4 Satellite Program 2018-05-20 20:10:34 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/23649 has been resolved.

Comment 5 Lukas Pramuk 2018-05-22 10:20:04 UTC
To be complete on external capsule it will hit 

Upgrade step: remove_nodes_importers...

Comment 6 Lukas Pramuk 2018-05-22 10:33:50 UTC
def remove_nodes_distributors
  Kafo::Helpers.execute("scl enable rh-mongodb34 \"mongo pulp_database --eval  'db.repo_distributors.remove({'distributor_type_id': \\\"nodes_http_distributor\\\"});'\"")
end

^ This change in /usr/share/katello-installer-base/hooks/pre/30-upgrade.rb worked for me

Comment 7 Lukas Pramuk 2018-05-28 10:51:53 UTC
FailedQA.

@Sat6.4 Snap4 > Snap5

Hit the issue described in comment#2:

# satellite-installer --upgrade

Upgrade Step: mongo_mmapv1_check...
Upgrade step mongo_mmapv1_check failed. Check logs for more information.

TigerWire is in Mongod3.4 default storage, not sure if we still need mongo_mmapv1_check step at all or the step just needs SCL adaptation?

Comment 9 Mike McCune 2018-06-15 19:43:22 UTC
Still fails with SNAP8

...
foreman-rake db:migrate finished successfully!
Upgrade Step: mongo_mmapv1_check...
Upgrade step mongo_mmapv1_check failed. Check logs for more information.

Comment 10 Chris Roberts 2018-06-15 20:11:17 UTC
Latest Patch.

https://github.com/Katello/katello-installer/pull/648

Comment 11 Satellite Program 2018-06-19 08:10:31 UTC
Upstream bug assigned to chrobert

Comment 12 Mike McCune 2018-06-22 16:32:10 UTC
Tried again with SNAP9:

...
foreman-rake db:migrate finished successfully!
Upgrade Step: mongo_mmapv1_check...
Upgrade step mongo_mmapv1_check failed. Check logs for more information.
#

Comment 13 Lukas Pramuk 2018-06-25 08:48:02 UTC
Snap8 > Snap9, the same here, pasting log: 

[ INFO 2018-06-24T18:25:55 main] Upgrade Step: mongo_mmapv1_check...
[ERROR 2018-06-24T18:25:55 main] Upgrade step mongo_mmapv1_check failed. Check logs for more information.
[DEBUG 2018-06-24T18:25:55 main] Exit with status code: 1 (signal was 1)

Comment 14 Mike McCune 2018-06-29 20:35:26 UTC
SNAP9 > SNAP10 worked without error, yay!

/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 db:migrate finished successfully!
Upgrade Step: mongo_mmapv1_check...
Upgrade Step: Running installer...
...

Comment 15 Bryan Kearney 2018-10-16 19:12:35 UTC
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-2018:2927


Note You need to log in before you can comment on or make changes to this bug.