environment lockfile issue

Bug #1272114 reported by Kevin Fox
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Pablo Andres Fuente

Bug Description

On restart of heat-engine I got the following crash. Its because its trying to parse a vim lockfile. It should probably ignore anything that starts with a '.'

2014-01-23 15:30:16.941 6855 INFO heat.engine.environment [-] Registering AWS::CloudFormation::WaitConditionHandle -> <class 'heat.engine.resources.wait_condition.WaitConditionHandle'>
2014-01-23 15:30:16.941 6855 INFO heat.engine.environment [-] Registering AWS::CloudFormation::WaitCondition -> <class 'heat.engine.resources.wait_condition.WaitCondition'>
2014-01-23 15:30:16.942 6855 INFO heat.engine.resources [-] Loading /etc/heat/environment.d/.default.yaml.swp
2014-01-23 15:30:16.942 6855 CRITICAL heat [-] 'utf8' codec can't decode byte #xe4: invalid continuation byte
  in "<string>", position 16
2014-01-23 15:30:16.942 6855 TRACE heat Traceback (most recent call last):
2014-01-23 15:30:16.942 6855 TRACE heat File "/usr/bin/heat-engine", line 66, in <module>
2014-01-23 15:30:16.942 6855 TRACE heat srv = engine.EngineService(cfg.CONF.host, rpc_api.ENGINE_TOPIC)
2014-01-23 15:30:16.942 6855 TRACE heat File "/usr/lib/python2.6/site-packages/heat/engine/service.py", line 78, in __init__
2014-01-23 15:30:16.942 6855 TRACE heat resources.initialise()
2014-01-23 15:30:16.942 6855 TRACE heat File "/usr/lib/python2.6/site-packages/heat/engine/resources/__init__.py", line 104, in initialise
2014-01-23 15:30:16.942 6855 TRACE heat _load_all(_environment)
2014-01-23 15:30:16.942 6855 TRACE heat File "/usr/lib/python2.6/site-packages/heat/engine/resources/__init__.py", line 74, in _load_all
2014-01-23 15:30:16.942 6855 TRACE heat _load_global_environment(env)
2014-01-23 15:30:16.942 6855 TRACE heat File "/usr/lib/python2.6/site-packages/heat/engine/resources/__init__.py", line 87, in _load_global_environment
2014-01-23 15:30:16.942 6855 TRACE heat env_body = environment_format.parse(env_fd.read())
2014-01-23 15:30:16.942 6855 TRACE heat File "/usr/lib/python2.6/site-packages/heat/common/environment_format.py", line 30, in parse
2014-01-23 15:30:16.942 6855 TRACE heat env = yaml.safe_load(env_str)
2014-01-23 15:30:16.942 6855 TRACE heat File "/usr/lib64/python2.6/site-packages/yaml/__init__.py", line 93, in safe_load
2014-01-23 15:30:16.942 6855 TRACE heat return load(stream, SafeLoader)
2014-01-23 15:30:16.942 6855 TRACE heat File "/usr/lib64/python2.6/site-packages/yaml/__init__.py", line 69, in load
2014-01-23 15:30:16.942 6855 TRACE heat loader = Loader(stream)
2014-01-23 15:30:16.942 6855 TRACE heat File "/usr/lib64/python2.6/site-packages/yaml/loader.py", line 24, in __init__
2014-01-23 15:30:16.942 6855 TRACE heat Reader.__init__(self, stream)
2014-01-23 15:30:16.942 6855 TRACE heat File "/usr/lib64/python2.6/site-packages/yaml/reader.py", line 79, in __init__
2014-01-23 15:30:16.942 6855 TRACE heat self.determine_encoding()
2014-01-23 15:30:16.942 6855 TRACE heat File "/usr/lib64/python2.6/site-packages/yaml/reader.py", line 135, in determine_encoding
2014-01-23 15:30:16.942 6855 TRACE heat self.update(1)
2014-01-23 15:30:16.942 6855 TRACE heat File "/usr/lib64/python2.6/site-packages/yaml/reader.py", line 165, in update
2014-01-23 15:30:16.942 6855 TRACE heat exc.encoding, exc.reason)
2014-01-23 15:30:16.942 6855 TRACE heat ReaderError: 'utf8' codec can't decode byte #xe4: invalid continuation byte
2014-01-23 15:30:16.942 6855 TRACE heat in "<string>", position 16
2014-01-23 15:30:16.942 6855 TRACE heat

Changed in heat:
importance: Undecided → Medium
milestone: none → icehouse-3
status: New → Triaged
Changed in heat:
assignee: nobody → Pablo Andres Fuente (pablo-a-fuente)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/68971

Changed in heat:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/68971
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=35a6ce181534af2f6feadad07a025b5051b669c8
Submitter: Jenkins
Branch: master

commit 35a6ce181534af2f6feadad07a025b5051b669c8
Author: Pablo Andres Fuente <email address hidden>
Date: Fri Jan 24 14:08:48 2014 -0300

    Global environment ignores files starting with dot

    The _list_environment_files() method was modified to ignore all the
    files, in the heat.common.config.environment_dir, with names that starts
    with a dot. This method uses glob.glob instead of os.listdir.

    Change-Id: Ida84472adef771a7310277fdb549d358877fe739
    Closes-Bug: #1272114

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.