mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	CLOUDSTACK-3570:Vmware - Template downloads are getting re-initiated
every time management server is restarted.
This commit is contained in:
		
							parent
							
								
									86bbe211f2
								
							
						
					
					
						commit
						2849f8117f
					
				@ -24,9 +24,6 @@ import javax.naming.ConfigurationException;
 | 
			
		||||
import javax.xml.parsers.DocumentBuilderFactory;
 | 
			
		||||
import org.w3c.dom.Document;
 | 
			
		||||
import org.w3c.dom.Element;
 | 
			
		||||
import org.w3c.dom.Node;
 | 
			
		||||
import org.w3c.dom.NodeList;
 | 
			
		||||
 | 
			
		||||
import org.apache.log4j.Logger;
 | 
			
		||||
 | 
			
		||||
import com.cloud.exception.InternalErrorException;
 | 
			
		||||
@ -44,21 +41,23 @@ public class VmdkProcessor extends AdapterBase implements Processor {
 | 
			
		||||
    @Override
 | 
			
		||||
    public FormatInfo process(String templatePath, ImageFormat format, String templateName) throws InternalErrorException {
 | 
			
		||||
        if (format != null) {
 | 
			
		||||
        	if(s_logger.isInfoEnabled())
 | 
			
		||||
            if(s_logger.isInfoEnabled()) {
 | 
			
		||||
                s_logger.info("We currently don't handle conversion from " + format + " to VMDK.");
 | 
			
		||||
            }
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        s_logger.info("Template processing. templatePath: " + templatePath + ", templateName: " + templateName);
 | 
			
		||||
        String templateFilePath = templatePath + File.separator + templateName + "." + ImageFormat.OVA.getFileExtension();
 | 
			
		||||
        if (!_storage.exists(templateFilePath)) {
 | 
			
		||||
        	if(s_logger.isInfoEnabled())
 | 
			
		||||
            if(s_logger.isInfoEnabled()) {
 | 
			
		||||
                s_logger.info("Unable to find the vmware template file: " + templateFilePath);
 | 
			
		||||
            }
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        s_logger.info("Template processing - untar OVA package. templatePath: " + templatePath + ", templateName: " + templateName);
 | 
			
		||||
        String templateFileFullPath = templatePath + templateName + "." + ImageFormat.OVA.getFileExtension();
 | 
			
		||||
        String templateFileFullPath = templatePath + File.separator + templateName + "." + ImageFormat.OVA.getFileExtension();
 | 
			
		||||
        File templateFile = new File(templateFileFullPath);
 | 
			
		||||
 | 
			
		||||
        Script command = new Script("tar", 0, s_logger);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user