Skip to content

Commit 31ad3c2

Browse files
author
Pearl Dsilva
committed
Cleanup + set vmware systemvm template deploy_as_is to 1
1 parent 1d95188 commit 31ad3c2

17 files changed

Lines changed: 16 additions & 81 deletions

File tree

engine/schema/src/main/resources/META-INF/db/schema-41400to41500.sql

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -828,9 +828,4 @@ INSERT INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_vers
828828

829829
ALTER TABLE `cloud`.`user_vm` ADD COLUMN `user_vm_type` varchar(255) DEFAULT "UserVM" COMMENT 'Defines the type of UserVM';
830830

831-
---- Use 'Other Linux 64-bit' as guest os for the default systemvmtemplate for XenServer
832-
--UPDATE `cloud`.`vm_template` SET guest_os_id=293 WHERE id=1;
833-
--
834-
---- Use 'Other Linux 64-bit' as guest os for the default systemvmtemplate for VMware
835-
---- This fixes a memory allocation issue to systemvms on VMware/ESXi
836-
--UPDATE `cloud`.`vm_template` SET guest_os_id=293 WHERE id=8;
831+
UPDATE `cloud`.`vm_template` set deploy_as_is = 1 where id = 8;

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,6 @@ private boolean checkOvsNetwork(final String networkName) {
15551555
}
15561556

15571557
public boolean passCmdLine(final String vmName, final String cmdLine) throws InternalErrorException {
1558-
s_logger.info("PASSING CMDLINE DATA: vm-name "+ vmName);
15591558
final Script command = new Script(_patchScriptPath, 300 * 1000, s_logger);
15601559
String result;
15611560
command.add("-n", vmName);

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtStartCommandWrapper.java

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ public Answer execute(final StartCommand command, final LibvirtComputingResource
9090
// pass cmdline info to system vms
9191
if (vmSpec.getType() != VirtualMachine.Type.User || (vmSpec.getBootArgs() != null && vmSpec.getBootArgs().contains("CKSNode"))) {
9292
// try to patch and SSH into the systemvm for up to 5 minutes
93+
for (int count = 0; count < 10; count++) {
94+
// wait and try passCmdLine for 30 seconds at most for CLOUDSTACK-2823
95+
if (libvirtComputingResource.passCmdLine(vmName, vmSpec.getBootArgs())) {
96+
break;
97+
}
98+
}
99+
93100
if (vmSpec.getType() != VirtualMachine.Type.User) {
94101
String controlIp = null;
95102
for (final NicTO nic : vmSpec.getNics()) {
@@ -99,13 +106,6 @@ public Answer execute(final StartCommand command, final LibvirtComputingResource
99106
}
100107
}
101108

102-
for (int count = 0; count < 10; count++) {
103-
// wait and try passCmdLine for 30 seconds at most for CLOUDSTACK-2823
104-
if (libvirtComputingResource.passCmdLine(vmName, vmSpec.getBootArgs())) {
105-
break;
106-
}
107-
}
108-
109109
final VirtualRoutingResource virtRouterResource = libvirtComputingResource.getVirtRouterResource();
110110
// check if the router is up?
111111
for (int count = 0; count < 60; count++) {
@@ -115,14 +115,6 @@ public Answer execute(final StartCommand command, final LibvirtComputingResource
115115
}
116116
}
117117
}
118-
if (vmSpec.getBootArgs() != null && vmSpec.getBootArgs().contains("CKSNode")) {
119-
for (int count = 0; count < 10; count++) {
120-
// wait and try passCmdLine for 30 seconds at most for CLOUDSTACK-2823
121-
if (libvirtComputingResource.passCmdLine(vmName, vmSpec.getBootArgs())) {
122-
break;
123-
}
124-
}
125-
}
126118
}
127119

128120
state = DomainState.VIR_DOMAIN_RUNNING;

plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2252,7 +2252,6 @@ protected StartAnswer execute(StartCommand cmd) {
22522252
}
22532253

22542254
if (!StringUtils.isBlank(vmSpec.getBootArgs())) {
2255-
s_logger.info("bootargs vmware = "+ vmSpec.getBootArgs());
22562255
String newMacSequence = generateMacSequence(nics);
22572256
vmSpec.setBootArgs(replaceNicsMacSequenceInBootArgs(oldMacSequence, newMacSequence, vmSpec));
22582257
}
@@ -2815,7 +2814,6 @@ protected String generateMacSequence(NicTO[] nics) {
28152814
protected String replaceNicsMacSequenceInBootArgs(String oldMacSequence, String newMacSequence, VirtualMachineTO vmSpec) {
28162815
String bootArgs = vmSpec.getBootArgs();
28172816
if (!StringUtils.isBlank(bootArgs) && !StringUtils.isBlank(oldMacSequence) && !StringUtils.isBlank(newMacSequence)) {
2818-
s_logger.info("bootargs replacing nic mac address = "+ oldMacSequence +" " + newMacSequence);
28192817
return bootArgs.replace(oldMacSequence, newMacSequence);
28202818
}
28212819
return "";

plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ protected void logTransitStateDetachIsoAndThrow(final Level logLevel, final Stri
197197

198198
protected void deleteTemplateLaunchPermission() {
199199
if (clusterTemplate != null && owner != null) {
200-
LOGGER.info("Removing launch permission for systemVM template");
200+
LOGGER.info("Revoking launch permission for systemVM template");
201201
launchPermissionDao.removePermissions(clusterTemplate.getId(), Collections.singletonList(owner.getId()));
202202
}
203203
}

plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-master-add.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ write_files:
9999
cp -a ${BINARIES_DIR}/k8s/{kubeadm,kubelet,kubectl} .
100100
chmod +x {kubeadm,kubelet,kubectl}
101101
102-
# bash -x /opt/bin/k8s-node-setup.sh
103102
sed "s:/usr/bin:/opt/bin:g" ${BINARIES_DIR}/kubelet.service > /etc/systemd/system/kubelet.service
104103
mkdir -p /etc/systemd/system/kubelet.service.d
105104
sed "s:/usr/bin:/opt/bin:g" ${BINARIES_DIR}/10-kubeadm.conf > /etc/systemd/system/kubelet.service.d/10-kubeadm.conf

plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-node.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,4 +230,4 @@ write_files:
230230
231231
runcmd:
232232
- [ systemctl, start, setup-kube-system ]
233-
- [ systemctl, start, deploy-kube-system ]
233+
- [ systemctl, start, deploy-kube-system ]

scripts/vm/hypervisor/kvm/patch.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
# under the License.
1818

1919
set -e
20-
set -x
2120

2221
# Get the VM name and cmdline
2322
while getopts "n:c:h" opt; do

systemvm/debian/opt/cloud/bin/setup/CKSNode.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
# specific language governing permissions and limitations
1717
# under the License.
1818

19-
set -x
20-
2119
. /opt/cloud/bin/setup/common.sh
2220

2321
setup_k8s_node() {

systemvm/debian/opt/cloud/bin/setup/bootstrap.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# specific language governing permissions and limitations
1717
# under the License.
1818

19-
set -x
2019
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
2120
CMDLINE=/var/cache/cloud/cmdline
2221

0 commit comments

Comments
 (0)