[fuel-plugins] reinstall plugin does not update minor version of the plugin in nailgun

Bug #1597716 reported by Vasiliy Pleshakov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
Medium
Georgy Kibardin

Bug Description

Detailed bug description:
 During plugin deveplopment we found that we cannot install 2 versions of one plugins which differs by minor version. Fuel installs new plugin over old one. But it does not update plugin version somewhere and it leads to strange behavior of shell tasks which contains plugin version as arguments.

Steps to reproduce:
1. create simple plugin with version 1.0.0
2. add task which use plugin version in it args:
- id: plugin_version_test
  type: shell
  version: 2.0.0
  role: master
  requires: [deploy_start]
  required_for: [deploy_end]
  parameters:
    cmd: echo {PLUGIN_VERSION}
    retries: 1
    interval: 10
    timeout: 120
3. add pre_build_hook with next line:
sed -i s/{PLUGIN_VERSION}/$(grep ^version: metadata.yaml | grep -Eo '([0-9]+\.)*[0-9]+')/g deployment_tasks.yaml
4. build plugin: fpb --build ./
5. install plugin: fuel plugins --install <plugin.rpm>
6. create environment, activate plugin, deploy and check puppet.log on fuel master to find execution of plugin_version_test task. Also you may check /etc/puppet/shell_manifests .
7. bump minor plugin version in metadata.yaml:
version: '1.0.1'
8. build plugin, install plugin without removing old version!
9. check that /var/www/nailgun/plugins/<pluginFolder>/deployment_tasks.yaml contains 1.0.1 version.
10. create new environment, activate plugin, deploy and check puppet.log on fuel master to find execution of plugin_version_test task.

Expected results:
puppet.log contains 1.0.1 version
/etc/puppet/shell_manifests contains 1.0.1 version
Actual result:
puppet.log contains 1.0.0 version
/etc/puppet/shell_manifests contains 1.0.0 version
Reproducibility:

Workaround:
  remove old plugin before installing new one:
  fuel plugins --remove plugin==oldVersion
Impact:

Description of the environment:
 Operation system: Centos7
 Versions of components: Fuel 9
 Reference architecture: N/A
 Network model: N/A
 Related projects installed: <put your information here>
Additional information:
 <put your information here>

Tags: area-python
Dmitry Klenov (dklenov)
Changed in fuel:
milestone: none → 10.0
assignee: nobody → Fuel Sustaining (fuel-sustaining-team)
tags: added: area-python
Changed in fuel:
importance: Undecided → Medium
status: New → Confirmed
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: Fuel Sustaining (fuel-sustaining-team) → Georgy Kibardin (gkibardin)
Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Georgy Kibardin (gkibardin) wrote :

There is one step missing. After updating the plugin "fuel plugins --sync" must be run in order to reread tasks.

Changed in fuel:
status: In Progress → Invalid
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.