mirror of https://github.com/apache/cloudstack.git
Revert "Disable VMwareTools detection to avoid unreliable result caused by race-condition when VMwareTools is not ready in guest OS yet and the API is called"
This reverts commit 8e0faaa406.
This commit is contained in:
parent
8e0faaa406
commit
ebc95375e2
|
|
@ -16,8 +16,8 @@
|
|||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.3.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
|
|
@ -173,6 +173,7 @@
|
|||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${cs.mysql.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
@ -195,6 +196,13 @@
|
|||
<artifactId>cloud-engine-components-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-engine-compute</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-engine-network</artifactId>
|
||||
|
|
@ -282,6 +290,7 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>ru.concerteza.buildnumber</groupId>
|
||||
|
|
@ -329,8 +338,8 @@
|
|||
<maxIdleTime>60000</maxIdleTime>
|
||||
</connector>
|
||||
</connectors>
|
||||
<webXml>${project.build.directory}/generated-webapp/WEB-INF/web.xml</webXml>
|
||||
<webAppSourceDirectory>${project.build.directory}/generated-webapp</webAppSourceDirectory>
|
||||
<webXml>${project.build.directory}/${project.build.finalName}/WEB-INF/web.xml</webXml>
|
||||
<webAppSourceDirectory>${project.build.directory}/${project.build.finalName}</webAppSourceDirectory>
|
||||
<webAppConfig>
|
||||
<contextPath>/client</contextPath>
|
||||
<extraClasspath>${project.build.directory}/utilities/scripts/db/;${project.build.directory}/utilities/scripts/db/db/</extraClasspath>
|
||||
|
|
@ -382,7 +391,10 @@
|
|||
<fileset dir="${basedir}/../scripts" />
|
||||
</copy>
|
||||
<!-- CLOUDSTACK-1304 -->
|
||||
<chmod perm="755" file="${basedir}/target/generated-webapp/WEB-INF/classes/scripts/**" type="both" />
|
||||
<chmod perm="755">
|
||||
<fileset
|
||||
dir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts" />
|
||||
</chmod>
|
||||
<copy todir="${basedir}/target/generated-webapp/WEB-INF/">
|
||||
<fileset dir="${basedir}/WEB-INF/">
|
||||
<include name="web.xml" />
|
||||
|
|
@ -549,6 +561,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy</id>
|
||||
|
|
|
|||
|
|
@ -1659,13 +1659,12 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
|||
throw new Exception(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
if(!isVMWareToolsInstalled(vmMo)){
|
||||
String errMsg = "vmware tools is not installed or not running, cannot add nic to vm " + vmName;
|
||||
s_logger.debug(errMsg);
|
||||
return new PlugNicAnswer(cmd, false, "Unable to execute PlugNicCommand due to " + errMsg);
|
||||
}
|
||||
*/
|
||||
|
||||
// TODO need a way to specify the control of NIC device type
|
||||
VirtualEthernetCardType nicDeviceType = VirtualEthernetCardType.E1000;
|
||||
|
||||
|
|
@ -1740,13 +1739,12 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
|||
throw new Exception(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
if(!isVMWareToolsInstalled(vmMo)){
|
||||
String errMsg = "vmware tools not installed or not running, cannot remove nic from vm " + vmName;
|
||||
s_logger.debug(errMsg);
|
||||
return new UnPlugNicAnswer(cmd, false, "Unable to execute unPlugNicCommand due to " + errMsg);
|
||||
}
|
||||
*/
|
||||
|
||||
VirtualDevice nic = findVirtualNicDevice(vmMo, cmd.getNic().getMac());
|
||||
if ( nic == null ) {
|
||||
return new UnPlugNicAnswer(cmd, true, "success");
|
||||
|
|
@ -6871,17 +6869,6 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
|||
|
||||
private boolean isVMWareToolsInstalled(VirtualMachineMO vmMo) throws Exception{
|
||||
GuestInfo guestInfo = vmMo.getVmGuestInfo();
|
||||
if(guestInfo == null) {
|
||||
s_logger.error("null GuestInfo is returned");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(guestInfo.getGuestState() == null) {
|
||||
s_logger.error("null GuestState is returned");
|
||||
return false;
|
||||
}
|
||||
|
||||
s_logger.info("VMwareTools guest state: " + guestInfo.getGuestState());
|
||||
return (guestInfo != null && guestInfo.getGuestState() != null && guestInfo.getGuestState().equalsIgnoreCase("running"));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue