demobox commented on this pull request.
> @@ -121,7 +131,17 @@ public boolean cleanupVirtualMachineNICs(VirtualMachine
> virtualMachine) {
PublicIPAddress ip =
api.getPublicIPAddressApi(publicIpResourceGroup).get(publicIpName);
if (ip.tags() != null &&
Boolean.parseBoolean(ip.tags().get(AUTOGENERATED_IP_KEY))) {
logger.debug(">> deleting public ip %s...", publicIpName);
- deleted &=
api.getPublicIPAddressApi(publicIpResourceGroup).delete(publicIpName);
+ try {
+ boolean ipDeleted =
api.getPublicIPAddressApi(publicIpResourceGroup).delete(publicIpName);
+ if (!ipDeleted) {
+ logger.warn(">> ip not deleted %s...", ip);
+ }
+ deleted &= ipDeleted;
+ } catch (Exception ex) {
+ logger.warn(">> Error deleting ip %s", ip);
Also: log the exception?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1240#discussion_r218643836