puppet-openstacklib fails with ruby 3.0.0 in URI.escape

Bug #1928685 reported by Alfredo Moralejo
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rabi Mishra

Bug Description

When testing puppet-openstacklib with ruby 3.0.0 (preparation for CentOS Stream 9), following error has been found:

2021-05-17 12:16:40 +0000 Puppet (err): Evaluation Error: Error while evaluating a Function Call, undefined method `escape' for URI:Module (file: /etc/puppet/modules/openstack_integration/ma
nifests/keystone.pp, line: 76, column: 35) on node centos9-2
/etc/puppet/modules/openstacklib/lib/puppet/functions/os_transport_url.rb:133:in `os_transport_url'

escape method in URI has been removed in ruby 3.

puppet project has hit similar issue and they are implementing their own escape https://github.com/puppetlabs/puppet/pull/8588/commits/41dcae71c7d10b9cc3c190897d02c5082ddd2076

I'm not sure what's the best option, i've also seen some suggestiong to simply replace by CGI.escape although i'm not sure is doing the same result.

Revision history for this message
Rabi Mishra (rabi) wrote :

I don't think CGI.escape works for percent encoding.

Probably we can just use Puppet::Util.rfc2396_escape once that puppet change has been released or use ERB::Util.url_encode(?).

Revision history for this message
Rabi Mishra (rabi) wrote :
Changed in puppet-openstacklib:
status: New → In Progress
Rabi Mishra (rabi)
Changed in puppet-openstacklib:
assignee: nobody → Rabi Mishra (rabi)
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-openstacklib 19.0.0

This issue was fixed in the openstack/puppet-openstacklib 19.0.0 release.

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

Other bug subscribers