Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1375930 - Do str_replace in a single pass
Do str_replace in a single pass
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat (Show other bugs)
10.0 (Newton)
Unspecified Unspecified
high Severity medium
: rc
: 10.0 (Newton)
Assigned To: Zane Bitter
Amit Ugol
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-14 05:17 EDT by Amit Ugol
Modified: 2016-12-14 11:01 EST (History)
8 users (show)

See Also:
Fixed In Version: openstack-heat-7.0.0-1.el7ost
Doc Type: Bug Fix
Doc Text:
Previously, the `str_replace` intrinsic function worked by calling the Python `str.replace()` method for each string to be replaced. Consequently, if the replacement text for one replacement contained another of the strings to be replaced, the replacement text itself could be replaced. The result was non-deterministic, since the replacement order was not guaranteed. Therefore users had to be careful to use techniques, such as guard characters, to ensure that there was no misinterpretation. With this update, replacements are now performed in a single pass, so only the original text is subject to replacement. As a result, the output of `str_replace` is now deterministic, and consistent with user expectations even without the use of guard characters. When keys overlap in the input, longer matches are preferred. Lexicographically smaller strings will be replaced first if there is still ambiguity.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-14 11:01:48 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 355583 None None None 2016-09-14 05:17 EDT
Red Hat Product Errata RHEA-2016:2948 normal SHIPPED_LIVE Red Hat OpenStack Platform 10 enhancement update 2016-12-14 14:55:27 EST

  None (edit)
Description Amit Ugol 2016-09-14 05:17:49 EDT
Description of problem:
Do str_replace in a single pass, this is needed in some part to fix node naming issues in tripleo as discussed in https://bugzilla.redhat.com/show_bug.cgi?id=1353920#c20 and is used as a tracker for https://review.openstack.org/#/c/355583/ that should be merged soon.
Comment 2 Zane Bitter 2016-09-14 21:39:37 EDT
The patch merged upstream and will be in the Newton-rc1 build.
Comment 5 errata-xmlrpc 2016-12-14 11:01:48 EST
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/RHEA-2016-2948.html

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