How to Uninstall the Reporting Add-On

Jeremiah Snapp -

Any version of opscode-reporting prior to and including 1.6.5 (12/20/2016) does not uninstall properly so please use the following instructions when uninstalling opscode-reporting and its postgres database.

Be sure to use the root user to run all of the following commands . 

It is important to first remove the reporting API endpoint so chef-client runs will no longer use it
If you do not do this before uninstalling reporting the chef-client runs will FAIL. Run the following set of three commands on each frontend. The last command may fail if the database has already been deleted.

rm /var/opt/opscode/nginx/etc/addon.d/*-reporting_*.conf
chef-server-ctl hup nginx

Stop the opscode-reporting service.

chef-server-ctl stop opscode-reporting

Delete opscode-reporting's postgres database and postgres roles and delete its data files, log files and configuration files.

opscode-reporting-ctl cleanse --with-external

If "--with-external" isn't available or doesn't delete the database for some reason then try the following on the Chef Server that is running postgres after running "opscode-reporting-ctl cleanse". This system would be the old-style backend

echo "DROP DATABASE opscode_reporting;" | su -l opscode-pgsql -c 'psql'
echo "DROP ROLE opscode_reporting;" | su -l opscode-pgsql -c 'psql'
echo "DROP ROLE opscode_reporting_ro;" | su -l opscode-pgsql -c 'psql'

On all systems in the Chef Server, uninstall the package

rpm -e opscode-reporting
OR
dpkg --purge opscode-reporting

Delete any remaining files

rm -rf /opt/opscode-reporting
Have more questions? Submit a request

Comments

Powered by Zendesk