Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
Upgrade: Fix a logic bug in default SC determination
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Grimm committed Jan 8, 2012
1 parent 0d2bfa1 commit b4e1f39
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions clc/modules/core/conf/upgrade/upgrade_20_30.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -591,10 +591,12 @@ class upgrade_20_30 extends AbstractUpgradeScript {
if (vol.cluster == "default") {
vol.cluster = System.getProperty("euca.storage.name");
}
if (vol.cluster == null && vol_meta != null) {
vol.cluster = vol_meta.sc_name;
} else {
throw new RuntimeException("Cannot determine SC for volume " + vol.displayname);
if (vol.cluster == null) {
if (vol_meta != null) {
vol.cluster = vol_meta.sc_name;
} else {
throw new RuntimeException("Cannot determine SC for volume " + vol.displayname);
}
}
// Second "vol.cluster" is partition name
Volume v = new Volume( ufn, vol.displayname, vol.size, vol.cluster + '_sc', vol.cluster, vol.parentsnapshot );
Expand Down

0 comments on commit b4e1f39

Please sign in to comment.