[update] OpenStack Patching : puppet's versioncmp behaves wrong
Bug #1342041 reported by
Ihor Kalnytskyi
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Committed
|
Critical
|
Dmitry Ilyin | ||
5.0.x |
Fix Committed
|
Critical
|
Dmitry Ilyin |
Bug Description
OpenStack Patching fails due to wrong `Puppet:
Example of incorrect behaviour (ruby interactive shell):
http://
In the snippet above we can see that more higher version is detected as more smaller version.
Solutions:
1/ Rewrite our versioncmp function to be more smart.
2/ Change package version notation.
Changed in fuel: | |
milestone: | none → 5.1 |
Changed in fuel: | |
status: | Confirmed → Triaged |
Changed in fuel: | |
assignee: | Fuel Library Team (fuel-library) → Bogdan Dobrelya (bogdando) |
Changed in fuel: | |
status: | Triaged → Invalid |
summary: |
- OpenStack Patching : puppet's versioncmp behaves wrong + [update] OpenStack Patching : puppet's versioncmp behaves wrong |
tags: |
added: upgrade removed: update |
Changed in fuel: | |
assignee: | Bogdan Dobrelya (bogdando) → Dmitry Ilyin (idv1985) |
Changed in fuel: | |
assignee: | Dmitry Ilyin (idv1985) → Bogdan Dobrelya (bogdando) |
Changed in fuel: | |
status: | Fix Committed → Confirmed |
assignee: | Bogdan Dobrelya (bogdando) → Dmitry Ilyin (idv1985) |
To post a comment you must log in.
Actually it's not really a versioncmp bug.
Puppet: :Util:: Package. versioncmp( '2014.1. fuel5.0- mira4', '2014.1. 1.fuel5. 1-mira0' )
=> 1
But first is lower then second and it should be -1
["2014", ".", "1", ".", "fuel", "5", ".", "0", "-", "mira", "4"]
["2014", ".", "1", ".", "1", ".", "fuel", "5", ".", "1", "-", "mira", "0"]
2014 vs 2014
. vs .
1 vs 1
. vs .
fuel vs 1
1
See? there are two 1's instead of one in the newer version. But it should be like this:
["2014", ".", "1", ".", "fuel", "5", ".", "0", "-", "mira", "4"]
["2014", ".", "1", ".", "fuel", "5", ".", "1", "-", "mira", "0"]
2014 vs 2014
. vs .
1 vs 1
. vs .
fuel vs fuel
5 vs 5
. vs .
0 vs 1
-1
So we should just rename package from 2014.1. 1.fuel5. 1-mira0 to 2014.1. fuel5.1- mira0