@@ -101,7 +101,6 @@ public class SystemVmTemplateRegistration {
101101 private static final String TEMPLATES_PATH = fetchTemplatesPath ();
102102 private static final String METADATA_FILE_NAME = "metadata.ini" ;
103103 private static final String METADATA_FILE = TEMPLATES_PATH + METADATA_FILE_NAME ;
104- public static final String TEMP_DIRECTORY = "/var/tmp" ;
105104 public static final String TEMPORARY_SECONDARY_STORE = "tmp" ;
106105 private static final String PARTIAL_TEMPLATE_FOLDER = String .format ("/template/tmpl/%d/" , Account .ACCOUNT_ID_SYSTEM );
107106 private static final String storageScriptsDir = "scripts/storage/secondary" ;
@@ -361,7 +360,7 @@ public void setUpdated(Date updated) {
361360 public boolean validateIfSeeded (TemplateDataStoreVO templDataStoreVO , String url , String path , String nfsVersion ) {
362361 String filePath = null ;
363362 try {
364- filePath = Files .createTempDirectory (Paths . get ( TEMP_DIRECTORY ), TEMPORARY_SECONDARY_STORE ).toString ();
363+ filePath = Files .createTempDirectory (TEMPORARY_SECONDARY_STORE ).toString ();
365364 if (filePath == null ) {
366365 throw new CloudRuntimeException ("Failed to create temporary directory to mount secondary store" );
367366 }
@@ -963,7 +962,7 @@ public void doInTransactionWithoutResult(final TransactionStatus status) {
963962 for (Long zoneId : zoneIds ) {
964963 String filePath = null ;
965964 try {
966- filePath = Files .createTempDirectory (Paths . get ( TEMP_DIRECTORY ), TEMPORARY_SECONDARY_STORE ).toString ();
965+ filePath = Files .createTempDirectory (TEMPORARY_SECONDARY_STORE ).toString ();
967966 if (filePath == null ) {
968967 throw new CloudRuntimeException ("Failed to create temporary file path to mount the store" );
969968 }
0 commit comments