Skip to content

Commit 312bd32

Browse files
committed
address review comments
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 3c2e81d commit 312bd32

1 file changed

Lines changed: 17 additions & 19 deletions

File tree

engine/schema/src/com/cloud/upgrade/dao/Upgrade41110to41120.java

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
/*
2-
* // Licensed to the Apache Software Foundation (ASF) under one
3-
* // or more contributor license agreements. See the NOTICE file
4-
* // distributed with this work for additional information
5-
* // regarding copyright ownership. The ASF licenses this file
6-
* // to you under the Apache License, Version 2.0 (the
7-
* // "License"); you may not use this file except in compliance
8-
* // with the License. You may obtain a copy of the License at
9-
* //
10-
* // http://www.apache.org/licenses/LICENSE-2.0
11-
* //
12-
* // Unless required by applicable law or agreed to in writing,
13-
* // software distributed under the License is distributed on an
14-
* // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* // KIND, either express or implied. See the License for the
16-
* // specific language governing permissions and limitations
17-
* // under the License.
18-
*/
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
1917

2018
package com.cloud.upgrade.dao;
2119

@@ -172,7 +170,7 @@ private void updateSystemVmTemplates(final Connection conn) {
172170
}
173171
// update template ID of system Vms
174172
try (PreparedStatement update_templ_id_pstmt = conn
175-
.prepareStatement("update `cloud`.`vm_instance` set vm_template_id = ? where type <> 'User' and hypervisor_type = ?");) {
173+
.prepareStatement("update `cloud`.`vm_instance` set vm_template_id = ? where type <> 'User' and hypervisor_type = ? and removed is NULL");) {
176174
update_templ_id_pstmt.setLong(1, templateId);
177175
update_templ_id_pstmt.setString(2, hypervisorAndTemplateName.getKey().toString());
178176
update_templ_id_pstmt.executeUpdate();

0 commit comments

Comments
 (0)