Bug 1636328
Summary: | foreman-installer --reset cannot empty local mongo 3.4 database | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Ales Dujicek <adujicek> |
Component: | Installation | Assignee: | Chris Roberts <chrobert> |
Status: | CLOSED ERRATA | QA Contact: | Lai <ltran> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.3.0 | CC: | adujicek, chrobert, jcallaha, pcreech, zhunting |
Target Milestone: | 6.4.1 | Keywords: | Regression, Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | https://projects.theforeman.org/issues/23620 | ||
Whiteboard: | |||
Fixed In Version: | katello-installer-base-3.7.0.11-1 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-12-06 22:32:53 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Ales Dujicek
2018-10-05 06:40:33 UTC
Created from redmine issue http://projects.theforeman.org/issues/23620 Upstream bug assigned to jomitsch In my opinion this is still a problem foreman-maintain restore runs installer --reset which does not remove mongo data files, because they are not called /var/lib/mongodb/pulp_database* anymore foreman-maintain.log: [ INFO 2018-10-02T09:16:50 verbose] Running installer with args [["-v", "--reset", "--disable-system-checks"]] ... [ INFO 2018-10-02T10:18:13 verbose] Dropping Pulp database! rm -f /var/lib/pulp/init.flag finished successfully! systemctl stop httpd pulp_workers finished successfully! systemctl stop rh-mongodb34-mongod finished successfully! rm -f /var/lib/mongodb/pulp_database* finished successfully! systemctl start rh-mongodb34-mongod finished successfully! rm -rf /var/lib/pulp/{distributions,published,repos}/* finished successfully! and later extracts mongo data directory backup D, [2018-10-02 10:24:54+0200 #15345] DEBUG -- : Running command tar --selinux --extract --file=/tmp/backup/offline/satellite-backup-2018-10-02-09-00-55/mongo_data.tar.gz --overwrite --gzip --listed-incremental=/dev/null --directory=/ with stdin nil which means that there may be hypothetically some extra files which are not overwritten by the restored files (just because they did not exist at the time of backup creation) *** Bug 1637644 has been marked as a duplicate of this bug. *** Upstream bug assigned to jomitsch What's the expected result for this? And how do I setup data in mongodb or verify that mongodb is emptied correctly? Does running ls /var/lib/mongodb | grep -v -e collection- -e index- return nothing after I run the foreman-installer --reset? you do not need to setup anything, pulp stores its data in mongo, there will be data
you can pause the execution of satellite-installer after it deletes mongo database and check directly in database that it was removed
# mongo
> show dbs
should not list pulp_database
No, ls /var/lib/mongodb | grep -v -e collection- -e index- would always list files because foreman-installer creates new database after it is removed.
Checked mongo db before reset: > show dbs admin 0.000GB local 0.000GB pulp_database 0.001GB Ran satellite-installer --reset and paused it after deleting mongo database. Checked db. # mongo MongoDB shell version v3.4.9 MongoDB server version: 3.4.9 Server has startup warnings: 2018-11-16T13:55:02.275-0500 I CONTROL [initandlisten] 2018-11-16T13:55:02.275-0500 I CONTROL [initandlisten] ** WARNING: You are running on a NUMA machine. 2018-11-16T13:55:02.275-0500 I CONTROL [initandlisten] ** We suggest launching mongod like this to avoid performance problems: 2018-11-16T13:55:02.275-0500 I CONTROL [initandlisten] ** numactl --interleave=all mongod [other options] 2018-11-16T13:55:02.275-0500 I CONTROL [initandlisten] 2018-11-16T13:55:02.275-0500 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. 2018-11-16T13:55:02.275-0500 I CONTROL [initandlisten] ** We suggest setting it to 'never' 2018-11-16T13:55:02.275-0500 I CONTROL [initandlisten] 2018-11-16T13:55:02.275-0500 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'. 2018-11-16T13:55:02.275-0500 I CONTROL [initandlisten] ** We suggest setting it to 'never' 2018-11-16T13:55:02.275-0500 I CONTROL [initandlisten] > show dbs admin 0.000GB local 0.000GB Verified that installer does delete mongo database (pulp_database). Verified on snap 6.4.1_1.0 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/RHBA-2018:3799 |