Skip to content

Commit

Permalink
Merge pull request Netflix#773 from hieurl/master
Browse files Browse the repository at this point in the history
1.x EIPManager: if instance is not associated with one EIP, do not try to unbind
  • Loading branch information
qiangdavidliu committed Apr 11, 2016
2 parents 80eb710 + abad048 commit 683379b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ public void unbindEIP() throws Exception {
&& myInfo.getDataCenterInfo().getName() == Name.Amazon) {
myPublicIP = ((AmazonInfo) myInfo.getDataCenterInfo())
.get(MetaDataKey.publicIpv4);
if (myPublicIP == null) {
logger.info("Instance is not associated with an EIP. Will not try to unbind");
return;
}

try {
AmazonEC2 ec2Service = getEC2Service();
DescribeAddressesRequest describeAddressRequest = new DescribeAddressesRequest()
Expand Down

0 comments on commit 683379b

Please sign in to comment.