165
165
import com .cloud .deploy .DeploymentPlanner ;
166
166
import com .cloud .deploy .DeploymentPlanner .ExcludeList ;
167
167
import com .cloud .deploy .DeploymentPlanningManager ;
168
+ import com .cloud .deploy .DeploymentPlanningManagerImpl ;
168
169
import com .cloud .deployasis .dao .UserVmDeployAsIsDetailsDao ;
169
170
import com .cloud .event .EventTypes ;
170
171
import com .cloud .event .UsageEventUtils ;
237
238
import com .cloud .uservm .UserVm ;
238
239
import com .cloud .utils .DateUtil ;
239
240
import com .cloud .utils .Journal ;
241
+ import com .cloud .utils .LogUtils ;
240
242
import com .cloud .utils .Pair ;
241
243
import com .cloud .utils .Predicate ;
242
244
import com .cloud .utils .ReflectionUse ;
@@ -1093,6 +1095,7 @@ protected void checkAndAttemptMigrateVmAcrossCluster(final VMInstanceVO vm, fina
1093
1095
public void orchestrateStart (final String vmUuid , final Map <VirtualMachineProfile .Param , Object > params , final DeploymentPlan planToDeploy , final DeploymentPlanner planner )
1094
1096
throws InsufficientCapacityException , ConcurrentOperationException , ResourceUnavailableException {
1095
1097
1098
+ logger .debug (() -> LogUtils .logGsonWithoutException ("Trying to start VM [%s] using plan [%s] and planner [%s]." , vmUuid , planToDeploy , planner ));
1096
1099
final CallContext cctxt = CallContext .current ();
1097
1100
final Account account = cctxt .getCallingAccount ();
1098
1101
final User caller = cctxt .getCallingUser ();
@@ -1116,10 +1119,8 @@ public void orchestrateStart(final String vmUuid, final Map<VirtualMachineProfil
1116
1119
1117
1120
DataCenterDeployment plan = new DataCenterDeployment (vm .getDataCenterId (), vm .getPodIdToDeployIn (), null , null , null , null , ctx );
1118
1121
if (planToDeploy != null && planToDeploy .getDataCenterId () != 0 ) {
1119
- if (logger .isDebugEnabled ()) {
1120
- logger .debug ("advanceStart: DeploymentPlan is provided, using dcId:" + planToDeploy .getDataCenterId () + ", podId: " + planToDeploy .getPodId () +
1121
- ", clusterId: " + planToDeploy .getClusterId () + ", hostId: " + planToDeploy .getHostId () + ", poolId: " + planToDeploy .getPoolId ());
1122
- }
1122
+ VMInstanceVO finalVm = vm ;
1123
+ logger .debug (() -> DeploymentPlanningManagerImpl .logDeploymentWithoutException (finalVm , planToDeploy , planToDeploy .getAvoids (), planner ));
1123
1124
plan =
1124
1125
new DataCenterDeployment (planToDeploy .getDataCenterId (), planToDeploy .getPodId (), planToDeploy .getClusterId (), planToDeploy .getHostId (),
1125
1126
planToDeploy .getPoolId (), planToDeploy .getPhysicalNetworkId (), ctx );
@@ -1140,13 +1141,12 @@ public void orchestrateStart(final String vmUuid, final Map<VirtualMachineProfil
1140
1141
1141
1142
if (planToDeploy != null ) {
1142
1143
avoids = planToDeploy .getAvoids ();
1144
+ ExcludeList finalAvoids = avoids ;
1145
+ logger .debug (() -> LogUtils .logGsonWithoutException ("Avoiding components [%s] in deployment of VM [%s]." , finalAvoids , vmUuid ));
1143
1146
}
1144
1147
if (avoids == null ) {
1145
1148
avoids = new ExcludeList ();
1146
1149
}
1147
- if (logger .isDebugEnabled ()) {
1148
- logger .debug ("Deploy avoids pods: " + avoids .getPodsToAvoid () + ", clusters: " + avoids .getClustersToAvoid () + ", hosts: " + avoids .getHostsToAvoid ());
1149
- }
1150
1150
1151
1151
boolean planChangedByVolume = false ;
1152
1152
boolean reuseVolume = true ;
0 commit comments