Bug 1179892

Summary: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `to_a' for "eqlx1":String at /etc/puppet/environments/production/modules/quickstack/manifests/cinder_volume.pp:179
Product: Red Hat OpenStack Reporter: Ramon Acedo <racedoro>
Component: rhel-osp-installerAssignee: Rajini Karthik <rajini.karthik>
Status: CLOSED ERRATA QA Contact: Omri Hochman <ohochman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: arkady_kanevsky, cdevine, christopher_dearborn, cwolfe, dmacpher, jguiditt, jjarvis, John_walsh, kurt_hey, mburns, morazi, rajini.karthik, rhos-maint, sasha, sclewis, yeylon
Target Milestone: z2Keywords: OtherQA, ZStream
Target Release: Installer   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-foreman-installer-3.0.19-1.el7ost Doc Type: Bug Fix
Doc Text:
A minor change in string-to-array handling in Ruby 1.9 caused an undefined method error when processing Cinder configuration. This fix corrects the string-to-array handling using Ruby 1.9 syntax. The undefined method no longer appears.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-07 15:07:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1171850    

Description Ramon Acedo 2015-01-07 18:19:32 UTC
This is the OSP-6 beta release:

openstack-foreman-installer-3.0.8-1.el7ost.noarch
rhel-osp-installer-0.5.4-1.el7ost.noarch
rhel-osp-installer-client-0.5.4-1.el7ost.noarch
ruby193-rubygem-staypuft-0.5.9-1.el7ost.noarch

A default installation with:
- HA (3 controllers 1 compute)
- SELinux disabled
- Equllogic values (exported from Advanced Configuration):

      cinder:
        backend_lvm: 'false'
        backend_ceph: 'false'
        backend_nfs: 'true'
        backend_eqlx: 'true'
        nfs_uri: 10.0.0.1:/Users/racedo/nfs-cinder/
        rbd_secret_uuid: 870a7f29-3ab9-4a9a-a75c-b951b8f3fa5f
        eqlxs:
        - &70266817482880 !ruby/object:Staypuft::Deployment::CinderService::Equallogic
          errors: !ruby/object:ActiveModel::Errors
            base: *70266817482880
            messages: !omap []
          id: 0
          chap_login: ''
          chap_password: ''
          group_name: '12'
          pool: cinder_pool
          san_ip: 10.0.0.1
          san_login: root
          san_password: root_pw
          thin_provision: true
          use_chap: false

Puppet fails during deployment with:

Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `to_a' for "eqlx1":String at /etc/puppet/environments/production/modules/quickstack/manifests/cinder_volume.pp:179 on node mac000c292e37da.vm.lab

Can't continue the deployment.

Comment 3 Rajini Karthik 2015-03-18 16:49:18 UTC
In ruby 1.9, String no longer has a to_a method. Older code probably used Ruby 1.8

Workaround :

1.8.x > 'foo'.to_a # => ['foo']
You would use:

1.9.x > 'foo'.lines.to_a # => ['foo']

/usr/share/openstack-foreman-installer/puppet/modules/quickstack/lib/puppet/parser/functions/produce_array_with_prefix.rb

Fix:
-retval += (prefix+i.to_s).to_a
+retval += (prefix+i.to_s).lines.to_a

Comment 4 arkady kanevsky 2015-03-18 17:33:45 UTC
Rajini,
can you create Pull request for it?

Mike,
will it make into A2?

Comment 5 Rajini Karthik 2015-03-18 19:33:55 UTC
Submitted a PR

https://github.com/redhat-openstack/astapor/pull/496

Comment 6 Mike Burns 2015-03-18 20:31:34 UTC
(In reply to arkady kanevsky from comment #4)

> Mike,
> will it make into A2?

Proposing for A2, should make it

Comment 7 Jason Guiditta 2015-03-18 20:43:14 UTC
Merged

Comment 10 errata-xmlrpc 2015-04-07 15:07:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0791.html