jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds] Minor changes to openstack-nova and openstack-keystone (#783)
Date Thu, 25 Jun 2015 10:24:26 GMT
>        String imageId = template.getImage().getProviderId();
>        String flavorId = template.getHardware().getProviderId();
>  
>        logger.debug(">> creating new server region(%s) name(%s) image(%s) flavor(%s)
options(%s)", regionId, name, imageId, flavorId, options);
> -      ServerCreated lightweightServer = novaApi.getServerApi(regionId).create(name,
imageId, flavorId, options);
> -      Server server = novaApi.getServerApi(regionId).get(lightweightServer.getId());
> -
> -      logger.trace("<< server(%s)", server.getId());
> +      final ServerCreated lightweightServer = novaApi.getServerApi(regionId).create(name,
imageId, flavorId, options);
> +      if (!retry(new Predicate<String>() {
> +         @Override
> +         public boolean apply(String serverId) {
> +            Server server = novaApi.getServerApi(regionId).get(serverId);
> +            return server != null && server.getAddresses() != null &&
!server.getAddresses().isEmpty();
> +         }
> +      }, 30 * 60, 1, SECONDS).apply(lightweightServer.getId())) {
> +         final String message = format("Server %s was not created within %sms so it
will be destroyed.", name, "30 * 60");

Where is the server destroyed?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/783/files#r33240787
Mime
View raw message