Skip to content

Commit

Permalink
Merge pull request #196 from Memrise/master
Browse files Browse the repository at this point in the history
Fix RuntimeException when an AZ is missing
  • Loading branch information
vfilanovsky committed Feb 22, 2016
2 parents 7c75328 + 9fe737e commit 760e6b3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/java/com/netflix/ice/basic/BasicReservationService.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,14 @@ private void pollAPI() throws Exception {
}
UsageType usageType = getUsageType(offer.getInstanceType(), offer.getProductDescription());
// Unknown Zone
if (Zone.getZone(offer.getAvailabilityZone()) == null)
if (Zone.getZone(offer.getAvailabilityZone()) == null) {
logger.error("No Zone for " + offer.getAvailabilityZone());
hasNewPrice = setPrice(utilization, currentTime, Zone.getZone(offer.getAvailabilityZone()).region, usageType,
offer.getFixedPrice(), hourly) || hasNewPrice;
} else {
hasNewPrice = setPrice(utilization, currentTime, Zone.getZone(offer.getAvailabilityZone()).region, usageType,
offer.getFixedPrice(), hourly) || hasNewPrice;

logger.info("Setting RI price for " + Zone.getZone(offer.getAvailabilityZone()).region + " " + utilization + " " + usageType + " " + offer.getFixedPrice() + " " + hourly);
logger.info("Setting RI price for " + Zone.getZone(offer.getAvailabilityZone()).region + " " + utilization + " " + usageType + " " + offer.getFixedPrice() + " " + hourly);
}
}
} while (!StringUtils.isEmpty(token));
}
Expand Down

0 comments on commit 760e6b3

Please sign in to comment.