Bug 1444190 - Reset does not recreate candlepin db due to cpdp/cpinit in wrong location
Summary: Reset does not recreate candlepin db due to cpdp/cpinit in wrong location
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.3.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: Unspecified
Assignee: Chris Roberts
QA Contact: Jitendra Yejare
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-20 19:26 UTC by Chris Roberts
Modified: 2019-04-01 20:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 19273 0 None None None 2017-04-20 19:26:22 UTC

Description Chris Roberts 2017-04-20 19:26:23 UTC
When you do a --reset the candlepin db is not recreated because it stills sees the following files:

/var/lib/candlepin/cpdb_done
/var/lib/candlepin/cpinit_done

The --reset removes them from here but they are no longer present in this location:

/var/lib/katello/cpdb_done
/var/lib/katello/cpinit_done

After a long debug session with the candlepin team and removing them from /var/lib/candlepin the --reset went through and the db got recreated correctly.

Comment 2 Jitendra Yejare 2017-12-12 11:13:37 UTC
Verified !

@Satellite 6.3 snap 28

Steps:

Reset satellite to check if the candlepin db is recreated.

Behavior:

Before Reset:

# ll /var/lib/candlepin/cpdb_done
-rw-r--r--. 1 root root 0 Nov 21 05:48 /var/lib/candlepin/cpdb_done
# ll /var/lib/candlepin/cpinit_done 
-rw-r--r--. 1 root root 0 Nov 21 05:53 /var/lib/candlepin/cpinit_done

Reset:

# satellite-installer --scenario satellite --reset
Are you sure you want to continue? This will drop the databases, reset all configurations that you have made and bring the server back to a fresh install. [y/n]
y
/usr/sbin/service-wait foreman-tasks stop
Redirecting to /bin/systemctl stop foreman-tasks.service

/usr/sbin/service-wait httpd stop
Redirecting to /bin/systemctl stop httpd.service

/usr/sbin/service-wait pulp_celerybeat stop
Redirecting to /bin/systemctl stop pulp_celerybeat.service

/usr/sbin/service-wait foreman-proxy stop
Redirecting to /bin/systemctl stop foreman-proxy.service

/usr/sbin/service-wait pulp_streamer stop
Redirecting to /bin/systemctl stop pulp_streamer.service

/usr/sbin/service-wait pulp_resource_manager stop
Redirecting to /bin/systemctl stop pulp_resource_manager.service

/usr/sbin/service-wait smart_proxy_dynflow_core stop
Redirecting to /bin/systemctl stop smart_proxy_dynflow_core.service

/usr/sbin/service-wait pulp_workers stop
Redirecting to /bin/systemctl stop pulp_workers.service

/usr/sbin/service-wait tomcat stop
Redirecting to /bin/systemctl stop tomcat.service

/usr/sbin/service-wait squid stop
Redirecting to /bin/systemctl stop squid.service

/usr/sbin/service-wait qdrouterd stop
Redirecting to /bin/systemctl stop qdrouterd.service

/usr/sbin/service-wait qpidd stop
Redirecting to /bin/systemctl stop qpidd.service

/usr/sbin/service-wait mongod stop
Redirecting to /bin/systemctl stop mongod.service

Success!
katello-service stop --exclude postgresql finished successfully!
foreman-rake db:drop 2>&1 finished successfully!
rm -f /var/lib/candlepin/cpdb_done finished successfully!
rm -f /var/lib/candlepin/cpinit_done finished successfully!
Redirecting to /bin/systemctl stop tomcat.service
service tomcat stop finished successfully!
could not change directory to "/root"
sudo su postgres -c "dropdb candlepin" finished successfully!
rm -f /var/lib/pulp/init.flag finished successfully!
Redirecting to /bin/systemctl stop httpd.service
service-wait httpd stop finished successfully!
Redirecting to /bin/systemctl stop mongod.service
service-wait mongod stop finished successfully!
rm -f /var/lib/mongodb/pulp_database* finished successfully!
Redirecting to /bin/systemctl start mongod.service
service-wait mongod start finished successfully!
rm -rf /var/lib/pulp/{distributions,published,repos}/* finished successfully!
Installing             Done                                               [100%] [................................................................................................................................]
  Success!

After Reset:

# ll /var/lib/candlepin/cpdb_done
-rw-r--r-- 1 root root 0 Dec 12 05:56 /var/lib/candlepin/cpdb_done
# ll /var/lib/candlepin/cpinit_done 
-rw-r--r-- 1 root root 0 Dec 12 05:59 /var/lib/candlepin/cpinit_done

As per above, candlepin db has been reset. And the new files are created under /var/lib/candlepin as expected.

Hence changing the state of bug to verified.

Comment 3 Bryan Kearney 2018-02-21 17:33:01 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:0336

Comment 4 Bryan Kearney 2018-02-21 17:33:27 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:0336


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