bug 9381: set accountId=domainId=1 for system vms in vm_instance table

status 9381: resolved fixed
This commit is contained in:
alena 2011-04-11 10:10:05 -07:00
parent bb2d907d47
commit f6b8f23751
1 changed files with 5 additions and 0 deletions

View File

@ -1006,6 +1006,11 @@ public class Upgrade218to22 implements DbUpgrade {
pstmt.executeUpdate();
pstmt.close();
// Set account=systemAccount and domain=ROOT for CPVM/SSVM
pstmt = conn.prepareStatement("UPDATE vm_instance SET account_id=1, domain_id=1 WHERE type='ConsoleProxy' or type='SecondaryStorageVm'");
pstmt.executeUpdate();
pstmt.close();
}
} catch (SQLException e) {
throw new CloudRuntimeException("Can't update data center ", e);