ckelner / ice-custom

Netflix Ice. Customized version for TWC specific changes. See: https://github.com/TheWeatherCompany/ice for contributions back to Netflix.
0 stars 0 forks source link

NullPointerException in BasicReservationService during BootStrap #9

Closed ckelner closed 9 years ago

ckelner commented 9 years ago
2015-02-25 20:24:47,004 [localhost-startStop-1] ERROR basic.BasicReservationService  - failed to poll reservation prices
java.lang.NullPointerException
    at com.netflix.ice.basic.BasicReservationService.pollAPI(BasicReservationService.java:174)
    at com.netflix.ice.basic.BasicReservationService.init(BasicReservationService.java:106)
    at com.netflix.ice.processor.ProcessorConfig.<init>(ProcessorConfig.java:93)
    at BootStrap$_closure1.doCall(BootStrap.groovy:186)
    at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:308)
    at grails.util.Environment.executeForEnvironment(Environment.java:301)
    at grails.util.Environment.executeForCurrentEnvironment(Environment.java:277)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
java.lang.RuntimeException: failed to poll reservation prices for null
ckelner commented 9 years ago

This seems to be stemming from this line: https://github.com/Netflix/ice/blob/master/src/java/com/netflix/ice/basic/BasicReservationService.java#L174

 hasNewPrice = setPrice(utilization, currentTime, Zone.getZone(offer.getAvailabilityZone()).region, usageType, offer.getFixedPrice(), hourly) || hasNewPrice;

Specifically I think it is Zone.getZone(offer.getAvailabilityZone()).region Where Zone.getZone() can return null as seen here: https://github.com/netflix/ice/blob/master/src/java/com/netflix/ice/tag/Zone.java#L118

if (name.isEmpty() || name.equals(region.name))
            return null;
ckelner commented 9 years ago

Looks like there is a new zone from AWS for sa-east-1:

2015-02-26 13:23:13,591 [localhost-startStop-1] WARN  basic.BasicReservationService  - Not able to setting RI price for: zone=sa-east-1c - utilization=HEAVY - usageType=m3.xlarge.sqlserverweb - fixedPrice=10550.0 - hourly=0.0
2015-02-26 13:23:13,591 [localhost-startStop-1] WARN  basic.BasicReservationService  - Not able to setting RI price for: zone=sa-east-1c - utilization=HEAVY - usageType=m3.xlarge.sqlserverstd - fixedPrice=19683.0 - hourly=0.0
ckelner commented 9 years ago

Please follow https://github.com/Netflix/ice/pull/156 for resolution.