Failure trying to list stacks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Thomas Herve |
Bug Description
Got the following traceback during a test run:
Exception handling resource: 'NoneType' object has no attribute '__getitem__'
Traceback (most recent call last):
File "/usr/local/
res = self.dispatcher
File "/usr/local/
return self._do_
File "/usr/local/
result = func(ctxt, **new_args)
File "/usr/local/
return f(*args, **kwargs)
File "/opt/stack/
return func(self, ctx, *args, **kwargs)
File "/opt/stack/
return [api.format_
File "/opt/stack/
yield cls._from_
File "/opt/stack/
db_
File "/opt/stack/
tpl[field] = db_tpl[field]
I believe that now that we removed the automatic eager loading, we need to take care of None values in that field.
TypeError: 'NoneType' object has no attribute '__getitem__'
Changed in heat: | |
assignee: | nobody → Zane Bitter (zaneb) |
I gather from IRC that this occurred at roughly the same time as the purge test was running. So it's possible that between the time we are loading the stack and when we are loading the raw_template, the raw_template has been deleted.
The bigger issue here though is that we are loading the raw_template at all. The whole point of not eager-loading is that we don't actually need it for such operations as stack-list, but in fact we load it anyway (now using a separate DB query, so the worst of both worlds) just by virtue of using the versioned object interface (sadly, another example of how versioned objects make everything worse without providing any useful abstraction):
http:// git.openstack. org/cgit/ openstack/ heat/tree/ heat/objects/ stack.py? h=stable% 2Fnewton# n70
We need to either find some way to make the versioned object lazily-load the template, or failing that revert the non-eager-loading patch so that we continue to take the memory/bandwidth hit but at least don't split the loading into two queries.
Removing myself as assignee because I'm unlikely to have time to look at this this week.