Merge "Fix 'filter' object is not subscriptable" into stable/rocky

This commit is contained in:
Zuul 2019-04-04 10:05:57 +00:00 committed by Gerrit Code Review
commit 243ac2b909
2 changed files with 3 additions and 2 deletions

View File

@ -90,4 +90,4 @@ export DEVSTACK_GATE_TEMPEST_REGEX="$r"
# set the concurrency to 1 for devstack-gate
# See: https://bugs.launchpad.net/nova-lxd/+bug/1790943
export TEMPEST_CONCURRENCY=1
# export TEMPEST_CONCURRENCY=1

View File

@ -1259,7 +1259,8 @@ class LXDDriver(driver.ComputeDriver):
"""
container_id_map = json.loads(
container.config['volatile.last_state.idmap'])
uid_map = filter(lambda id_map: id_map.get("Isuid"), container_id_map)
uid_map = list(filter(lambda id_map: id_map.get("Isuid"),
container_id_map))
if uid_map:
storage_id = uid_map[0].get("Hostid", 0)
else: