get_file causes an infinite recursion

Bug #1718933 reported by ioggstream on 2017-09-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-heatclient
Undecided
Unassigned

Bug Description

# Reproduce

- create recurse.yaml
```
heat_template_version: newton

resources:
  foo:
    type: OS::Heat::SoftwareConfig
    properties:
        group: script
        config:
          get_file: "recurse.yaml"
```
- create stack

$ openstack --debug stack create recurse --template recurse.yaml --dry-run

# I expect

The stack to be created.

# Instead

I get RuntimeError: maximum recursion depth exceeded in cmp

```

    template_url=str_url, files=files)[1]
  File "/usr/lib/python2.7/site-packages/heatclient/common/template_utils.py", line 99, in get_template_contents
    object_request)
  File "/usr/lib/python2.7/site-packages/heatclient/common/template_utils.py", line 120, in resolve_template_get_files
    ignore_if, recurse_if, is_object, object_request)
  File "/usr/lib/python2.7/site-packages/heatclient/common/template_utils.py", line 144, in get_file_contents
    is_object, object_request)
  File "/usr/lib/python2.7/site-packages/heatclient/common/template_utils.py", line 144, in get_file_contents
    is_object, object_request)
  File "/usr/lib/python2.7/site-packages/heatclient/common/template_utils.py", line 144, in get_file_contents
    is_object, object_request)
  File "/usr/lib/python2.7/site-packages/heatclient/common/template_utils.py", line 144, in get_file_contents
    is_object, object_request)
  File "/usr/lib/python2.7/site-packages/heatclient/common/template_utils.py", line 159, in get_file_contents
    file_content = utils.read_url_content(str_url)
  File "/usr/lib/python2.7/site-packages/heatclient/common/utils.py", line 415, in read_url_content

    content = request.urlopen(url).read()
  File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 1338, in file_open
    return self.open_local_file(req)
  File "/usr/lib64/python2.7/urllib2.py", line 1366, in open_local_file
    (mtype or 'text/plain', size, modified)))
  File "/usr/lib64/python2.7/mimetools.py", line 25, in __init__
    rfc822.Message.__init__(self, fp, seekable)
  File "/usr/lib64/python2.7/rfc822.py", line 108, in __init__
    self.readheaders()
  File "/usr/lib64/python2.7/rfc822.py", line 173, in readheaders
    elif self.islast(line):
  File "/usr/lib64/python2.7/rfc822.py", line 222, in islast
    return line in _blanklines
RuntimeError: maximum recursion depth exceeded in cmp

```

#

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

Other bug subscribers