You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2019/08/13 06:12:30 UTC

[GitHub] [cloudstack] anuragaw commented on a change in pull request #3547: [WIP] 4.13/master stabilisation PR

anuragaw commented on a change in pull request #3547: [WIP] 4.13/master stabilisation PR
URL: https://github.com/apache/cloudstack/pull/3547#discussion_r313232365
 
 

 ##########
 File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
 ##########
 @@ -1473,7 +1473,7 @@ public UserVm updateDefaultNicForVirtualMachine(UpdateDefaultNicForVMCmd cmd) th
             UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NETWORK_OFFERING_ASSIGN, vmInstance.getAccountId(), vmInstance.getDataCenterId(), vmInstance.getId(),
                     oldNicIdString, oldNetworkOfferingId, null, 0L, VirtualMachine.class.getName(), vmInstance.getUuid(), vmInstance.isDisplay());
 
-            if (vmInstance.getState() != State.Stopped) {
+            if (vmInstance.getState() == State.Running) {
 
 Review comment:
   Log warning perhaps if this method is called when not in running state?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services