CLOUDSTACK-8648: Pass the proper storage layer when configuring

Signed-off-by: Pierre-Luc Dion <pdion891@apache.org>
This commit is contained in:
Wido den Hollander 2015-07-23 23:39:02 +02:00 committed by Pierre-Luc Dion
parent 554f5f9fbb
commit 9dbc99c608
1 changed files with 3 additions and 0 deletions

View File

@ -860,6 +860,9 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
return file.length();
}
Map<String, Object> params = new HashMap<String, Object>();
params.put(StorageLayer.InstanceConfigKey, _storage);
processor.configure("template processor", params);
return processor.getVirtualSize(file);
} catch (Exception e) {
s_logger.warn("Failed to get virtual size of file " + file.getPath() + ", returning file size instead: ", e);