Fail to uninstall plugins because is executed unconditionnaly

Bug #1574478 reported by Simon Pasquier on 2016-04-25
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Roman Prykhodchenko
Roman Prykhodchenko

Bug Description

Detailed bug description:

Because the prerun hook doesn't check if the plugin ships with an script, the removal of plugins can fail.

Steps to reproduce:

1. Build the fuel-plugin-elasticsearch-kibana plugin from the master branch.
2. Install the plugin on the Fuel master node.
3. Remove the plugin from the Fuel master node.

Expected results:


Actual result:

Running transaction
/var/tmp/rpm-tmp.z5qrwD: line 7: syntax error near unexpected token `fi'
/var/tmp/rpm-tmp.z5qrwD: line 7: `fi'
error: %preun(elasticsearch_kibana-0.9-0.9.0-1.noarch) scriptlet failed, exit status 2
Error in PREUN scriptlet in rpm package elasticsearch_kibana-0.9-0.9.0-1.noarch
  Verifying : elasticsearch_kibana-0.9-0.9.0-1.noarch 1/1
  elasticsearch_kibana-0.9.noarch 0:0.9.0-1
Shell command executed with "1" exit code: yum -y remove elasticsearch_kibana-0.9




For plugin developers: Add script in the plugin repository.
For end-users: rpm -e --noscripts <plugin package>


The end-user can't uninstall the plugin.

Description of the environment:
 Operation system: Ubuntu
 Versions of components: N/A
 Reference architecture: N/A
 Network model: N/A
 Related projects installed: None
Additional information:

Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
status: New → Confirmed
importance: Undecided → High
milestone: none → 10.0
milestone: 10.0 → 9.0
tags: added: area-python
Dmitry Pyzhov (dpyzhov) on 2016-04-26
no longer affects: fuel/newton
Dmitry Pyzhov (dpyzhov) on 2016-04-26
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Roman Prykhodchenko (romcheg)

Fix proposed to branch: master

Changed in fuel:
status: Confirmed → In Progress

Submitter: Jenkins
Branch: master

commit 83e764260fe95dc3cbffbd00f28401c1717f406a
Author: Roman Prykhodchenko <email address hidden>
Date: Tue Apr 26 16:54:14 2016 +0200

    Allow optional

    Don't put any code to PREUN scripts if
    does not exist or is empty.

    Closes-bug: #1574478
    Change-Id: Ie7767e285b8086921a944da4bea9aa9749a0e323

Changed in fuel:
status: In Progress → Fix Committed
Dmitry Pyzhov (dpyzhov) wrote :

Fixed in plugin builder, doesn't need backport

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers