How to remove plugin?

We have installed the Chef plugin on our Katello instance, and I would like to remove it. How do I go about doing this? We are running Katello 3.7 on CentOS 7.4.

Thanks.

Remove the RPM with the gem, restart the app. It will likely ask to perform small delete in settings table after start (in the web UI), you do this in foreman-rake console. And it’s done.

If the plugin created some database tables, this will be kept forever.

HI,

I’ve installed the monitoring plugin and at the moment we’ve got some issues with it, so I would like to remove this plugin.
Can you describe how to do this please ? I don’t know gem, and I even don’t know which RPM was installed (I did the intallation via foreman-installer --enable-foreman-plugin-monitoring). If I need to do some actions in foreman-rake console, please can you explain ?

Thx in advance.

@lzap We have a plugin removal tool.

https://docs.pulpproject.org/pulpcore/workflows/plugin-removal.html

Hello,

Thx a lot for your reply but when I launch the command:

$> pulpcore-manager --help
Traceback (most recent call last):
File “/usr/bin/pulpcore-manager”, line 33, in
sys.exit(load_entry_point(‘pulpcore==3.18.6’, ‘console_scripts’, ‘pulpcore-manager’)())
File “/usr/lib/python3.9/site-packages/pulpcore/app/manage.py”, line 11, in manage
execute_from_command_line(sys.argv)
File “/usr/lib/python3.9/site-packages/django/core/management/init.py”, line 419, in execute_from_command_line
utility.execute()
File “/usr/lib/python3.9/site-packages/django/core/management/init.py”, line 363, in execute
settings.INSTALLED_APPS
File “/usr/lib/python3.9/site-packages/django/conf/init.py”, line 82, in getattr
self._setup(name)
File “/usr/lib/python3.9/site-packages/django/conf/init.py”, line 69, in _setup
self._wrapped = Settings(settings_module)
File “/usr/lib/python3.9/site-packages/django/conf/init.py”, line 170, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File “/usr/lib64/python3.9/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1030, in _gcd_import
File “”, line 1007, in _find_and_load
File “”, line 986, in _find_and_load_unlocked
File “”, line 680, in _load_unlocked
File “”, line 850, in exec_module
File “”, line 228, in _call_with_frames_removed
File “/usr/lib/python3.9/site-packages/pulpcore/app/settings.py”, line 303, in
settings = dynaconf.DjangoDynaconf(
File “/usr/lib/python3.9/site-packages/dynaconf/contrib/django_dynaconf_v2.py”, line 79, in load
lazy_settings.populate_obj(django_settings_module)
File “/usr/lib/python3.9/site-packages/dynaconf/base.py”, line 113, in getattr
self._setup()
File “/usr/lib/python3.9/site-packages/dynaconf/base.py”, line 163, in _setup
self._wrapped = Settings(
File “/usr/lib/python3.9/site-packages/dynaconf/base.py”, line 233, in init
self.execute_loaders()
File “/usr/lib/python3.9/site-packages/dynaconf/base.py”, line 967, in execute_loaders
self.pre_load(env, silent=silent, key=key)
File “/usr/lib/python3.9/site-packages/dynaconf/base.py”, line 986, in pre_load
self.load_file(path=preloads, env=env, silent=silent, key=key)
File “/usr/lib/python3.9/site-packages/dynaconf/base.py”, line 1013, in load_file
if py_loader.try_to_load_from_py_module_name(
File “/usr/lib/python3.9/site-packages/dynaconf/loaders/py_loader.py”, line 66, in try_to_load_from_py_module_name
mod = importlib.import_module(str(name))
File “/usr/lib64/python3.9/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1030, in _gcd_import
File “”, line 1007, in _find_and_load
File “”, line 986, in _find_and_load_unlocked
File “”, line 680, in _load_unlocked
File “”, line 850, in exec_module
File “”, line 228, in _call_with_frames_removed
File “/usr/lib/python3.9/site-packages/pulp_ansible/app/settings.py”, line 24, in
ANSIBLE_CONTENT_HOSTNAME = settings.CONTENT_ORIGIN + “/pulp/content”
File “/usr/lib/python3.9/site-packages/dynaconf/base.py”, line 136, in getattr
value = getattr(self._wrapped, name)
File “/usr/lib/python3.9/site-packages/dynaconf/base.py”, line 277, in getattribute
return super().getattribute(name)
AttributeError: ‘Settings’ object has no attribute ‘CONTENT_ORIGIN’

Any idea ?

I’ve filed https://github.com/pulp/pulpcore/issues/3203

Does it work if you use this command?

sudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py' /usr/bin/pulpcore-manager

Yes it seems to work now:

sudo -u pulp PULP_SETTINGS=’/etc/pulp/settings.py’ /usr/bin/pulpcore-manager

Type 'pulpcore-manager help ’ for help on a specific subcommand.

Available subcommands:

[app]
add-signing-service
analyze-publication
datarepair-2327
handle-artifact-checksums
remove-plugin
reset-admin-password
rpm-datarepair
rpm-trim-changelogs
stage-profile-summary

[auth]
changepassword
createsuperuser

[contenttypes]
remove_stale_contenttypes

[django]
check
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
makemigrations
migrate
sendtestemail
shell
showmigrations
sqlflush
sqlmigrate
sqlsequencereset
squashmigrations
startapp
startproject
test
testserver

[drf_spectacular]
spectacular

[guardian]
clean_orphan_obj_perms

[rest_framework]
generateschema

[sessions]
clearsessions

[staticfiles]
collectstatic
findstatic
runserver

Can you give me the right syntaxe now to remove the monitoring plugin please ?

Oh hold up is this a Pulp plugin or a Foreman plugin? A Foreman plugin it looks like.

In that case, sorry, this won’t help. Sorry for adding to the confusion. @lzap’s answer is correct.

Foreman plugin-in yes

I reply to my own question.
Now to remove a plugin it’s quite simple (Foreman plugin I mean):

1- foreman-installer --no-enable-foreman-plugin-PLUGIN_NAME
2- remove the corresponding RPM

I did not remember if I had to stop /start foreman (foreman-maintain stop/start) or if I had to reboot the machine.