Skip to content

Commit 20b0b62

Browse files
author
Daan Hoogland
committed
remove code in comments
1 parent 0f7bb73 commit 20b0b62

File tree

18 files changed

+0
-128
lines changed

18 files changed

+0
-128
lines changed

engine/components-api/src/main/java/com/cloud/vm/VmWorkSerializer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,12 @@ public static String serialize(VmWork work) {
6161
// use java binary serialization instead
6262
//
6363
return JobSerializerHelper.toObjectSerializedString(work);
64-
// return s_gson.toJson(work);
6564
}
6665

6766
public static <T extends VmWork> T deserialize(Class<?> clazz, String workInJsonText) {
6867
// TODO: there are way many generics, too tedious to get serialization work under GSON
6968
// use java binary serialization instead
7069
//
7170
return (T)JobSerializerHelper.fromObjectSerializedString(workInJsonText);
72-
// return (T)s_gson.fromJson(workInJsonText, clazz);
7371
}
7472
}

engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,6 @@ protected void processRequest(final Link link, final Request request) {
16271627
final String reason = shutdown.getReason();
16281628
logger.info("Host {} has informed us that it is shutting down with reason {} and detail {}", attache, reason, shutdown.getDetail());
16291629
if (reason.equals(ShutdownCommand.Update)) {
1630-
// disconnectWithoutInvestigation(attache, Event.UpdateNeeded);
16311630
throw new CloudRuntimeException("Agent update not implemented");
16321631
} else if (reason.equals(ShutdownCommand.Requested)) {
16331632
disconnectWithoutInvestigation(attache, Event.ShutdownRequested);

engine/orchestration/src/main/java/com/cloud/agent/manager/ClusteredAgentManagerImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,6 @@ protected void runInContext() {
962962
synchronized (_agentToTransferIds) {
963963
if (!_agentToTransferIds.isEmpty()) {
964964
logger.debug("Found {} agents to transfer", _agentToTransferIds.size());
965-
// for (Long hostId : _agentToTransferIds) {
966965
for (final Iterator<Long> iterator = _agentToTransferIds.iterator(); iterator.hasNext(); ) {
967966
final Long hostId = iterator.next();
968967
final AgentAttache attache = findAttache(hostId);

engine/schema/src/main/java/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ public boolean remove(Long id) {
8181
TransactionLegacy txn = TransactionLegacy.currentTxn();
8282
txn.start();
8383
ClusterVSMMapVO cluster = createForUpdate();
84-
//cluster.setClusterId(null);
85-
//cluster.setVsmId(null);
8684

8785
update(id, cluster);
8886

engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade2214to30.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ public void performDataMigration(Connection conn) {
7777
encryptData(conn);
7878
// drop keys
7979
dropKeysIfExist(conn);
80-
//update template ID for system Vms
81-
//updateSystemVms(conn); This is not required as system template update is handled during 4.2 upgrade
8280
// update domain network ref
8381
updateDomainNetworkRef(conn);
8482
// update networks that use redundant routers to the new network offering

engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade302to40.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public InputStream[] getPrepareScripts() {
6262

6363
@Override
6464
public void performDataMigration(Connection conn) {
65-
//updateVmWareSystemVms(conn); This is not required as system template update is handled during 4.2 upgrade
6665
correctVRProviders(conn);
6766
correctMultiplePhysicaNetworkSetups(conn);
6867
addHostDetailsUniqueKey(conn);

engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade304to305.java

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ public void performDataMigration(Connection conn) {
6565
addVpcProvider(conn);
6666
updateRouterNetworkRef(conn);
6767
fixZoneUsingExternalDevices(conn);
68-
// updateSystemVms(conn);
6968
fixForeignKeys(conn);
7069
encryptClusterDetails(conn);
7170
}
@@ -81,54 +80,6 @@ public InputStream[] getCleanupScripts() {
8180
return new InputStream[] {script};
8281
}
8382

84-
private void updateSystemVms(Connection conn) {
85-
PreparedStatement pstmt = null;
86-
ResultSet rs = null;
87-
boolean VMware = false;
88-
try {
89-
pstmt = conn.prepareStatement("select distinct(hypervisor_type) from `cloud`.`cluster` where removed is null");
90-
rs = pstmt.executeQuery();
91-
while (rs.next()) {
92-
if ("VMware".equals(rs.getString(1))) {
93-
VMware = true;
94-
}
95-
}
96-
} catch (SQLException e) {
97-
throw new CloudRuntimeException("Error while iterating through list of hypervisors in use", e);
98-
}
99-
// Just update the VMware system template. Other hypervisor templates are unchanged from previous 3.0.x versions.
100-
logger.debug("Updating VMware System Vms");
101-
try {
102-
//Get 3.0.5 VMware system Vm template Id
103-
pstmt = conn.prepareStatement("select id from `cloud`.`vm_template` where name = 'systemvm-vmware-3.0.5' and removed is null");
104-
rs = pstmt.executeQuery();
105-
if (rs.next()) {
106-
long templateId = rs.getLong(1);
107-
rs.close();
108-
pstmt.close();
109-
// change template type to SYSTEM
110-
pstmt = conn.prepareStatement("update `cloud`.`vm_template` set type='SYSTEM' where id = ?");
111-
pstmt.setLong(1, templateId);
112-
pstmt.executeUpdate();
113-
pstmt.close();
114-
// update template ID of system Vms
115-
pstmt = conn.prepareStatement("update `cloud`.`vm_instance` set vm_template_id = ? where type <> 'User' and hypervisor_type = 'VMware'");
116-
pstmt.setLong(1, templateId);
117-
pstmt.executeUpdate();
118-
pstmt.close();
119-
} else {
120-
if (VMware) {
121-
throw new CloudRuntimeException("3.0.5 VMware SystemVm template not found. Cannot upgrade system Vms");
122-
} else {
123-
logger.warn("3.0.5 VMware SystemVm template not found. VMware hypervisor is not used, so not failing upgrade");
124-
}
125-
}
126-
} catch (SQLException e) {
127-
throw new CloudRuntimeException("Error while updating VMware systemVm template", e);
128-
}
129-
logger.debug("Updating System Vm Template IDs Complete");
130-
}
131-
13283
private void addVpcProvider(Connection conn) {
13384
//Encrypt config params and change category to Hidden
13485
logger.debug("Adding vpc provider to all physical networks in the system");

scripts/installer/createtmplt.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,4 @@ echo "volume.size=$volsize" >> /$tmpltfs/template.properties
270270
zfs snapshot -r $tmpltfs@vmops_ss
271271
rollback_if_needed $tmpltfs $? "Failed to snapshot filesystem"
272272

273-
#if [ "$cleanup" == "true" ]
274-
#then
275-
#rm -f $tmpltimg
276-
#fi
277-
278273
exit 0

scripts/installer/createvolume.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,4 @@ echo "volume.size=$volsize" >> /$volfs/volume.properties
271271
zfs snapshot -r $volfs@vmops_ss
272272
rollback_if_needed $volfs $? "Failed to snapshot filesystem"
273273

274-
#if [ "$cleanup" == "true" ]
275-
#then
276-
#rm -f $volimg
277-
#fi
278-
279274
exit 0

scripts/storage/secondary/listvmtmplt.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ for i in $(find /$rootdir -name template.properties );
5353
do
5454
d=$(dirname $i)
5555
filename=$(grep "^filename" $i | awk -F"=" '{print $NF}')
56-
# size=$(grep "virtualsize" $i | awk -F"=" '{print $NF}')
57-
# if [ -n "$filename" ] && [ -n "$size" ]
58-
# then
59-
# d=$d/$filename/$size
60-
# fi
6156
echo ${d#/}/$filename #remove leading slash
6257
done
6358

0 commit comments

Comments
 (0)