fuel plugins are inconsistent when removing a plugin used by an environment

Bug #1430768 reported by Gil Meir
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Medium
Vladimir Sharshov

Bug Description

When removing an existing plugin that is in use in an environment the rpm is uninstalled, but the API gives an error as shown below.
The problem is that on one hand the rpm was uninstalled, but since the API blocks removing the plugin from fuel backend, so the inconsistency is the rpm was removed (with the plugins files) but the plugin is still listed in fuel backend.

The rpm should be removed only if the API returned OK.

Please see the attached log.

Revision history for this message
Gil Meir (gilmeir-d) wrote :

Log

Changed in fuel:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Vladimir Sharshov (vsharshov)
milestone: none → 6.1
Revision history for this message
Evgeniy L (rustyrobot) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-fuelclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/169280

Changed in fuel:
status: Confirmed → In Progress
Dmitry Pyzhov (dpyzhov)
tags: added: module-client
removed: cli
tags: added: feature-plugin
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-fuelclient (master)

Reviewed: https://review.openstack.org/169280
Committed: https://git.openstack.org/cgit/stackforge/python-fuelclient/commit/?id=8a024e321d9098f2c1bc77d5ad8ea4d33f08c10f
Submitter: Jenkins
Branch: master

commit 8a024e321d9098f2c1bc77d5ad8ea4d33f08c10f
Author: Vladimir Sharshov (warpc) <email address hidden>
Date: Tue Mar 31 15:20:52 2015 +0300

    Prevent plugin package deletion before API unregister call

    If plugin has been used in some enviroment, we should show
    error and do not delete his package:

        400 Client Error: Bad Request (Can't delete plugin which is enabledfor some environment.)

    Change-Id: Id0686a6332d8312d49556fdb43c66b82b4370ef4
    Closes-Bug: #1430768

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Alexander Kurenyshev (akurenyshev) wrote :

Steps to verify:

1) Install some plugin with package_version==2.0.0 (rpm plugin)
2) Enable it on the Fuel UI
3) Try to delete plugin with
fuel plugins --remove <plugin_name>==<plugin_version>

Observed behaviour:
Fuel shows error: 400 Client Error: Bad Request (Can't delete plugin which is enabledfor some environment.)
Plugin is still installed on the system: checked with dpkg -s <plugin_name>

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.