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

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".

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'

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