Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Upgrade: Fix a logic bug in default SC determination

  • Loading branch information...
commit b4e1f393a283d57b4dd76f6af1852659517d3731 1 parent 0d2bfa1
Andy Grimm authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 clc/modules/core/conf/upgrade/upgrade_20_30.groovy
View
10 clc/modules/core/conf/upgrade/upgrade_20_30.groovy
@@ -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 );
Please sign in to comment.
Something went wrong with that request. Please try again.