Bug 1231555 - puppet >= 3.7 operating system release comparison
Summary: puppet >= 3.7 operating system release comparison
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: openstack-packstack
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Alan Pevec (Fedora)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-14 17:54 UTC by Daniel Peess
Modified: 2016-07-19 14:49 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 14:49:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
versioncmp($::operatingsystemmajrelease, '19') >= 0) (1023 bytes, patch)
2015-06-14 17:59 UTC, Daniel Peess
no flags Details | Diff

Description Daniel Peess 2015-06-14 17:54:00 UTC
Description of problem:

recent puppet versions are more strict about string and integer comparisons,
the packstack mariadb/mysql manifest fails there.

Version-Release number of selected component (if applicable):

[root@rdo ~(keystone_admin)]# cat /etc/fedora-release;
Fedora release 22 (Twenty Two)
[root@rdo ~(keystone_admin)]# puppet --version;
4.1.0
[root@rdo ~(keystone_admin)]# rpm -qa | grep -- 'puppet';
openstack-puppet-modules-2014.2.10-1.fc22.noarch
openstack-packstack-puppet-2014.2-0.16.dev1447.g6f4d34b.fc22.noarch
puppet-4.1.0-1.fc22.noarch


How reproducible:

192.168.122.10_mariadb.pp:                        [ ERROR ]
Applying Puppet manifests                         [ ERROR ]

ERROR : Error appeared during Puppet run: 192.168.122.10_mariadb.pp
Error: Evaluation Error: Comparison of: String >= Integer, is not possible. Caused by 'A String is not comparable to a non String'. at 
/var/tmp/packstack/d5ecc797192e442dbd3fcc28179f949f/modules/mysql/manifests/params.pp:35:82 on node rdo.myvms.local


[root@rdo ~(keystone_admin)]# diff -Naur /usr/share/openstack-puppet/modules/mysql/manifests/params.pp{.orig,};
--- /usr/share/openstack-puppet/modules/mysql/manifests/params.pp.orig  2015-02-11 12:24:32.000000000 +0100
+++ /usr/share/openstack-puppet/modules/mysql/manifests/params.pp       2015-06-14 19:38:14.782648270 +0200
@@ -32,14 +32,14 @@
     'RedHat': {
       case $::operatingsystem {
         'Fedora': {
-          if is_integer($::operatingsystemrelease) and $::operatingsystemrelease >= 19 or $::operatingsystemrelease == 'Rawhide' {
+          if is_integer($::operatingsystemrelease) and (versioncmp($::operatingsystemmajrelease, '19') >= 0) or (versioncmp($::operatingsystemmajrelease, 'Rawhide') >= 0 ) {
             $provider = 'mariadb'
           } else {
             $provider = 'mysql'
           }
         }
         /^(RedHat|CentOS|Scientific|OracleLinux)$/: {
-          if $::operatingsystemmajrelease >= 7 {
+          if is_integer($::operatingsystemrelease) and (versioncmp($::operatingsystemmajrelease, '7') >= 0) {
             $provider = 'mariadb'
           } else {
             $provider = 'mysql'

Expected Result:

...
Applying 192.168.122.10_amqp.pp
Applying 192.168.122.10_mariadb.pp
192.168.122.10_amqp.pp:                              [ DONE ]
192.168.122.10_mariadb.pp:                           [ DONE ]
Applying 192.168.122.10_keystone.pp
Applying 192.168.122.10_glance.pp
Applying 192.168.122.10_cinder.pp
192.168.122.10_keystone.pp:                          [ DONE ]
...

Comment 2 Daniel Peess 2015-06-14 17:59:06 UTC
Created attachment 1038611 [details]
versioncmp($::operatingsystemmajrelease, '19') >= 0)

Comment 3 Gilles Dubreuil 2015-06-18 03:39:39 UTC
Effectively, current openstack-puppet-modules-2014.2.10-1.fc22.noarch package
needs to get newer versions for Cinder, Nova and Mysql modules

- nova
Version >= a0d934b6e2adc24b32508d3c33722733ab23e8c8 is needed

- cinder
Version >= 5a02533d7cd52ec56d2294d05ebe9344925ebded is needed

- puppetlabs-mysql
Version >= b20f04330cebfb45b626f9d7ef7b6ad6280ea65a is needed

Comment 4 Andrew 2015-07-28 00:04:18 UTC
Apparently, I ran into the similar error by the "allinone" RDO installation on a F22 guest VM (running on top of the F22 host):

sudo dnf install openstack-packstack
packstack --version
packstack Juno 2014.2.dev1447.g6f4d34b
packstack --allinone
...
...
Installing Dependencies                              [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Applying 192.168.122.203_prescript.pp
192.168.122.203_prescript.pp:                        [ DONE ]           
Applying 192.168.122.203_amqp.pp
Applying 192.168.122.203_mariadb.pp
192.168.122.203_amqp.pp:                             [ DONE ]         
192.168.122.203_mariadb.pp:                       [ ERROR ]           
Applying Puppet manifests                         [ ERROR ]

ERROR : Error appeared during Puppet run: 192.168.122.203_mariadb.pp
Error: Evaluation Error: Comparison of: String >= Integer, is not possible. Caused by 'A String is not comparable to a non String'. at /var/tmp/packstack/e6a7e0c00c3548489a101db71714e083/modules/mysql/manifests/params.pp:35:82 on node f22.vdomain

Looking at params.pp:35:82:

... $::operatingsystemrelease >= 19 ...

rpm -qa | grep puppet
openstack-puppet-modules-2014.2.10-1.fc22.noarch
puppet-4.1.0-1.fc22.noarch
openstack-packstack-puppet-2014.2-0.16.dev1447.g6f4d34b.fc22.noarch

Comment 5 Fedora Admin XMLRPC Client 2016-02-17 15:06:22 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 ilmostro7 2016-02-21 21:36:49 UTC
This problem is still present on Fedora22.  Are there any workarounds for the time being? Perhaps using rawhide?

Comment 7 Fedora End Of Life 2016-07-19 14:49:48 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.