diff --git a/src/main/java/net/educoder/service/CloudHostService.java b/src/main/java/net/educoder/service/CloudHostService.java index b600f7f..5db418f 100644 --- a/src/main/java/net/educoder/service/CloudHostService.java +++ b/src/main/java/net/educoder/service/CloudHostService.java @@ -57,7 +57,7 @@ public class CloudHostService { private int index = 0; - private List networkIdList; + private volatile List networkIdList; /** * 创建云主机 diff --git a/src/main/java/net/educoder/util/JCloudUtil.java b/src/main/java/net/educoder/util/JCloudUtil.java index ada2747..800b8db 100644 --- a/src/main/java/net/educoder/util/JCloudUtil.java +++ b/src/main/java/net/educoder/util/JCloudUtil.java @@ -370,14 +370,14 @@ public class JCloudUtil { createCloudHostDto.setUsername(CommonConstants.DEFAULT_ROOT); createCloudHostDto.setPassword(CommonConstants.DEFAULT_PASSWORD); - // 休眠30s再更新密码 - SleepUtil.sleep(30 * 1000); - - log.info("开始执行修改云主机:{} 密码", serverId); - boolean changePwdStatus = changePassword(apiToken, serverId, "Educoder123"); - if (!changePwdStatus) { - log.error("oneStepCreateCloudHost serverId:{}密码修改失败", serverId); - } +// // 休眠30s再更新密码 +// SleepUtil.sleep(30 * 1000); +// +// log.info("开始执行修改云主机:{} 密码", serverId); +// boolean changePwdStatus = changePassword(apiToken, serverId, "Educoder123"); +// if (!changePwdStatus) { +// log.error("oneStepCreateCloudHost serverId:{}密码修改失败", serverId); +// } return createCloudHostDto; } @@ -418,12 +418,12 @@ public class JCloudUtil { } log.info("重置云主机成功:serverId:{},", resetCloudHostParam.getServerId()); - SleepUtil.sleep(50 * 1000); - log.info("oneStepRebuildCloudHost 开始执行修改云主机:{} 密码", serverId); - boolean changePwdStatus = changePassword(apiToken, serverId, "Educoder123"); - if (!changePwdStatus) { - log.error("oneStepRebuildCloudHost serverId:{}密码修改失败", serverId); - } +// SleepUtil.sleep(50 * 1000); +// log.info("oneStepRebuildCloudHost 开始执行修改云主机:{} 密码", serverId); +// boolean changePwdStatus = changePassword(apiToken, serverId, "Educoder123"); +// if (!changePwdStatus) { +// log.error("oneStepRebuildCloudHost serverId:{}密码修改失败", serverId); +// } } log.info("rebuild与主机完成serverId:{}", serverId); }