File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
engine/schema/src/main/java/com/cloud/upgrade Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -444,10 +444,11 @@ private void decryptInit(Connection conn) throws SQLException {
444444 }
445445
446446 @ VisibleForTesting
447- protected static final class NoopDbUpgrade implements DbUpgrade {
447+ protected static final class NoopDbUpgrade implements DbUpgrade , DbUpgradeSystemVmTemplate {
448448
449449 private final String upgradedVersion ;
450450 private final String [] upgradeRange ;
451+ private SystemVmTemplateRegistration systemVmTemplateRegistration ;
451452
452453 private NoopDbUpgrade (final CloudStackVersion fromVersion , final CloudStackVersion toVersion ) {
453454
@@ -488,5 +489,19 @@ public InputStream[] getCleanupScripts() {
488489 return new InputStream [0 ];
489490 }
490491
492+ private void initSystemVmTemplateRegistration () {
493+ systemVmTemplateRegistration = new SystemVmTemplateRegistration ("" );
494+ }
495+
496+ @ Override
497+ public void updateSystemVmTemplates (Connection conn ) {
498+ s_logger .debug ("Updating System Vm template IDs" );
499+ initSystemVmTemplateRegistration ();
500+ try {
501+ systemVmTemplateRegistration .updateSystemVmTemplates (conn );
502+ } catch (Exception e ) {
503+ throw new CloudRuntimeException ("Failed to find / register SystemVM template(s)" );
504+ }
505+ }
491506 }
492507}
You can’t perform that action at this time.
0 commit comments