added logging statement when errors occur applying options to nodes

This commit is contained in:
Adrian Cole 2010-04-16 15:28:11 -07:00
parent 8203857af4
commit 4331f63265
1 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,7 @@ import org.jclouds.logging.Logger;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Joiner; import com.google.common.base.Joiner;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;
import com.google.common.base.Throwables;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListenableFuture;
@ -173,6 +174,8 @@ public class EC2RunNodesAndAddToSetStrategy implements RunNodesAndAddToSetStrate
logger.debug("<< options applied node(%s)", node.getId()); logger.debug("<< options applied node(%s)", node.getId());
nodes.add(computeService.getNodeMetadata(node)); nodes.add(computeService.getNodeMetadata(node));
} catch (Exception e) { } catch (Exception e) {
logger.error(e, "<< problem applying options to node(%s): ", node.getId(),
Throwables.getRootCause(e).getMessage());
if (!template.getOptions().shouldDestroyOnError()) if (!template.getOptions().shouldDestroyOnError())
nodes.add(computeService.getNodeMetadata(node)); nodes.add(computeService.getNodeMetadata(node));
} }