Skip to content

Commit 554f5f9

Browse files
widopdion891
authored andcommitted
CLOUDSTACK-8648: Do not configure the ImageFormat Processor when fetching filesize
It will throw an exception and that's needed. Also, make the log show about which file we are talking about Signed-off-by: Wido den Hollander <wido@widodh.nl> Signed-off-by: Pierre-Luc Dion <pdion891@apache.org>
1 parent ac9c2a2 commit 554f5f9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,10 +860,9 @@ protected long getVirtualSize(File file, ImageFormat format) {
860860
return file.length();
861861
}
862862

863-
processor.configure("template processor", new HashMap<String, Object>());
864863
return processor.getVirtualSize(file);
865864
} catch (Exception e) {
866-
s_logger.warn("Failed to get virtual size, returning file size instead:", e);
865+
s_logger.warn("Failed to get virtual size of file " + file.getPath() + ", returning file size instead: ", e);
867866
return file.length();
868867
}
869868

0 commit comments

Comments
 (0)