fuel plugins remove command not able to remove plugin in fuel9 env

Bug #1585644 reported by Venkata Mahesh Jonnalagadda
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Incomplete
High
Fuel Sustaining

Bug Description

Detailed bug description:
 fuel plugins remove command not able to remove plugin in fuel9 env
Steps to reproduce:
 1) Install the plugin in fuel9 env
 2) List the plugins
 3) Remove the plugin using "fuel plugins --remove.." command
 4) Now, you will end up with errors
Expected results:
 plugin has to be removed
Actual result:
 below is the snapshot -
[root@nailgun ~]# fuel plugins
id | name | version | package_version | releases
---|-----------------------|---------|-----------------|------------------------------------------------------------------------------------
3 | fuel-plugin-designate | 2.3.3 | 4.0.0 | ubuntu (2015.1.0-8.0, liberty-8.0, 2015.1.0-9.0, liberty-9.0, mitaka-9.0, kilo-9.0)
[root@nailgun ~]# fuel plugins --remove fuel-plugin-designate==2.3.3
Loaded plugins: fastestmirror, priorities
Resolving Dependencies
--> Running transaction check
---> Package fuel-plugin-designate-2.3.noarch 0:2.3.3-1 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package Arch Version Repository Size
=============================================================================================================================================================
Removing:
 fuel-plugin-designate-2.3 noarch 2.3.3-1 @/fuel-plugin-designate-2.3-2.3.3-1.noarch 169 k

Transaction Summary
=============================================================================================================================================================
Remove 1 Package

Installed size: 169 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
/var/tmp/rpm-tmp.PH13Iq: line 7: syntax error near unexpected token `fi'
/var/tmp/rpm-tmp.PH13Iq: line 7: `fi'
error: %preun(fuel-plugin-designate-2.3-2.3.3-1.noarch) scriptlet failed, exit status 2
Error in PREUN scriptlet in rpm package fuel-plugin-designate-2.3-2.3.3-1.noarch
  Verifying : fuel-plugin-designate-2.3-2.3.3-1.noarch 1/1

Failed:
  fuel-plugin-designate-2.3.noarch 0:2.3.3-1

Complete!
Shell command executed with "1" exit code: yum -y remove fuel-plugin-designate-2.3
[root@nailgun ~]#

Reproducibility:
 Yes
Workaround:
 No workaround
Impact:
 Users can't remove the plugin and they can't use the fuel9 env to deploy the plugin.
Description of the environment:
 Operation system: Ubuntu 14.04
 Versions of components: stable/mitaka
 Reference architecture: <put your information here>
 Network model: <put your information here>
 Related projects installed: <put your information here>
Additional information:
 This issue has to be fixed in "fuel plugins.." command for remove action.
 Currently, when "fuel plugins --remove.." command executed, it is trying to remove the rpm package using "yum -y remove.." command and here it is failing! You can see the error as below -
 Shell command executed with "1" exit code: yum -y remove fuel-plugin-designate-2.3
So, if fuel plugins command fails to remove using "yum -y remove.." command then it has to try internally with "yum --setopt=tsflags=noscripts remove <package>" command to make fuel plugins remove command success!
Once if above solution included inside "fuel plugins --remove.." command then users won't face this issue.

Tags: area-python
description: updated
description: updated
Changed in fuel:
milestone: none → 9.0
assignee: nobody → Fuel Sustaining (fuel-sustaining-team)
importance: Undecided → High
status: New → Confirmed
tags: added: area-python
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

Looks like duplicate for bug #1574478. Please rebuild the plugin with new version of plugin builder and check if the issue still exists.

Changed in fuel:
status: Confirmed → Incomplete
Revision history for this message
Venkata Mahesh Jonnalagadda (vj884x) wrote :

bug #1574478 says it has been fixed issue in fuel plugin builder. But I am using latest fuel plugin builder 4.0.0 and still seeing issue

root@fuel-plugin:# pip list | grep fuel
fuel-plugin-builder (4.0.0)

This needs to be fixed.

Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

Looks like this fix is not published yet. Could you check on master version directly from github? https://github.com/openstack/fuel-plugins/tree/master

Revision history for this message
Venkata Mahesh Jonnalagadda (vj884x) wrote :

I checked but not sure whether the code will work or not. Can you verify this issue with master code and see still issue exist or not. so that users won't face the problem again.

May be you can use this bug for testing this scenario & fix it, if you issue persists.

Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

I'm pretty sure that this bug is duplicate for bug #1574478. Fix in pbr is not published on pypi yet but you can use pbr from github master branch.

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.