jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Downer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCLOUDS-1348) CloudStack - template(image) IDs not unique
Date Wed, 01 Nov 2017 22:12:00 GMT

    [ https://issues.apache.org/jira/browse/JCLOUDS-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16234838#comment-16234838
] 

Richard Downer commented on JCLOUDS-1348:
-----------------------------------------

Here is the stacktrace reported when attempting to list the templates at this cloud service
provider:

{{java.lang.IllegalArgumentException: Multiple entries with same key: 3d72b52b-7ef3-4791-a199-30fc1f7d0520={id=3d72b52b-7ef3-4791-a199-30fc1f7d0520,
providerId=3d72b52b-7ef3-4791-a199-30fc1f7d0520, name=Windows 2012 R2 - Standard, location={scope=ZONE,
id=318c6f5f-c9d1-4c35-a145-327ecc521ec0, description=EU-FR-IKDC1-Z2-ADV, parent=cloudstack},
os={family=windows, name=Windows, description=Windows Server 2012 R2 (64-bit), is64Bit=true},
description=Microsoft Windows 2012 R2 - Standard Edition - 64bits (login:Administrator), status=AVAILABLE,
loginUser=Administrator} and 3d72b52b-7ef3-4791-a199-30fc1f7d0520={id=3d72b52b-7ef3-4791-a199-30fc1f7d0520,
providerId=3d72b52b-7ef3-4791-a199-30fc1f7d0520, name=Windows 2012 R2 - Standard, location={scope=ZONE,
id=c3224240-c62b-49c1-94d5-76a7d7bac77a, description=US-FL-Z1-ADV, parent=cloudstack}, os={family=windows,
name=Windows, description=Windows Server 2012 R2 (64-bit), is64Bit=true}, description=Microsoft
Windows 2012 R2 - Standard Edition - 64bits (login:Administrator), status=AVAILABLE, loginUser=Administrator}
	at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:150)
	at com.google.common.collect.RegularImmutableMap.checkNoConflictInBucket(RegularImmutableMap.java:104)
	at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:70)
	at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:254)
	at com.google.common.collect.Maps.uniqueIndex(Maps.java:1166)
	at com.google.common.collect.Maps.uniqueIndex(Maps.java:1140)
	at org.jclouds.compute.suppliers.ImageCacheSupplier.reset(ImageCacheSupplier.java:134)
	at org.jclouds.compute.suppliers.ImageCacheSupplier.valueLoaded(ImageCacheSupplier.java:121)
	at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier$SetAndThrowAuthorizationExceptionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:76)
	at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier$SetAndThrowAuthorizationExceptionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:57)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
	at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.get(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:150)
	at org.jclouds.compute.suppliers.ImageCacheSupplier.get(ImageCacheSupplier.java:106)
	at org.jclouds.compute.domain.internal.TemplateBuilderImpl.getImages(TemplateBuilderImpl.java:854)
	at org.jclouds.compute.domain.internal.TemplateBuilderImpl.build(TemplateBuilderImpl.java:666)
	at org.apache.brooklyn.location.jclouds.templates.PortableTemplateBuilder.newJcloudsTemplate(PortableTemplateBuilder.java:76)
	at org.apache.brooklyn.location.jclouds.templates.PortableTemplateBuilder.build(PortableTemplateBuilder.java:48)
	at org.apache.brooklyn.location.jclouds.JcloudsLocation.buildTemplate(JcloudsLocation.java:1394)
	... 14 more}}


> CloudStack - template(image) IDs not unique
> -------------------------------------------
>
>                 Key: JCLOUDS-1348
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1348
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-drivers
>    Affects Versions: 2.0.0
>            Reporter: Richard Downer
>            Priority: Major
>
> I've been investigating a problem that a client reported - they were trying to use jclouds
with their client's CloudStack instance but were hitting problems caused by the result of
the CloudStack `listTemplates` options returning members with duplicated ID fields.
> On inspection of the wire logs, it seemed that some templates were duplicated multiple
times but in different zones. All of the fields were the same, except for the zone ID and
name.
> These were not "cross zone" templates, which is an option where CloudStack automatically
copies a template to every zone. jclouds detects and handles those, by collapsing all templates
with the same ID and the `crossZones` paramter set to true, down to a single global-scoped
image.
> Instead, it would appear that CloudStack has an option to copy a template to another
zone. It's not a global template, it only goes to selective zones. But it does preserve the
template ID - so you can end up with multiple region-scoped images that have the same ID.
> My discussion on the Apache CloudStack mailing list is at: https://lists.apache.org/thread.html/f93385bbb0e04d7af9b80e7f8f90f957cb8633144dd2b282cde7d3fc@%3Cusers.cloudstack.apache.org%3E
> Of particular note is this message: https://lists.apache.org/thread.html/8d99f7462618438a6a3bcbb3fe7e736c5632db7d07de449f610b68c2@%3Cusers.cloudstack.apache.org%3E
> "As long as template is copied from zone to zone it will present with duplicate ID. This
is by design. crossZone parameter is to indicate to auto replicate template across all available
zone on template creation. To put it differently only combination of template ID and zone
ID is a primary key for template querying."
> (From: Sergey Levitskiy <serg38l@hotmail.com>)
> This implies that jclouds must change its behaviour to always assume that image IDs are
not globally unique, perhaps by - as Sergey suggests - incorporating the zone ID into jclouds'
image ID.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message