storage: add comment about source volume lookup

This commit is contained in:
Marek Marczykowski-Górecki 2017-07-12 21:37:12 +02:00
parent c32f0db582
commit 1e45d297b3
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -351,6 +351,9 @@ class Storage(object):
for name, conf in self.vm.volume_config.items():
if 'source' in conf:
template = getattr(vm, 'template', None)
# recursively lookup source volume - templates may be
# chained (TemplateVM -> AppVM -> DispVM, where the
# actual source should be used from TemplateVM)
while template:
# we have no control over VM load order,
# so initialize storage recursively if needed