I would consider this a valid assumption. I checked one of the ACS
environments (version 4.9.2, updated from 4.5) that I know use multiple
zones, and all of the templates that have IDs duplicated have
crossZones==true.

We would need more information from this ACS that you are debugging to pin
point the problem. How many templates that have crossZones==false are
presenting this duplication problem? If it is a bug, I would expect
everyone of them to have duplicated IDs. However, if this is the only thing
they differ from other single zone templates, I would guess that these
templates suffered from manual intervention in the database.

On Mon, Oct 2, 2017 at 7:22 AM, Richard Downer <rich...@apache.org> wrote:

> Rafael,
>
> Thanks for the information. Is there any information in listTemplates
> which would indicate if a template is in multiple zones? e.g. is the
> `crossZones` parameter a reliable indicator - can we normally be guaranteed
> that there will be no duplicated IDs in templates where crossZones==false?
>
> Currently jclouds will expect all templates where crossZones==false to
> have unique IDs. I am trying to determine if this is a valid assumption, or
> if jclouds needs a bug fix to be prepared for a duplicate ID at any time.
>
> Many thanks
> Richard.
>
>
> On 2017-09-29 15:24, Rafael Weingärtner <rafaelweingart...@gmail.com>
> wrote:
> > If the template is in multiple zones at the same time, then you are going
> > to have multiple template objects with the same ID. Otherwise, this
> should
> > not happen. You could check the database table "vm_template" to see if
> you
> > find any inconsistency there.
> >
> > On Fri, Sep 29, 2017 at 9:21 AM, Richard Downer <rich...@apache.org>
> wrote:
> >
> > > Hello,
> > >
> > > I'm debugging an issue on behalf of one of our users. We are using
> Apache
> > > jclouds to talk to Apache CloudStack which is on a customer's site.
> > >
> > > jclouds is invoking the `listTemplates` API, but is then choking while
> > > processing the query results. It seems that on this CloudStack
> instance,
> > > there are multiple templates with same ID - these all seem to refer to
> the
> > > same OS image, but in different zones - and jclouds doesn't like it
> when
> > > things have the same ID but different content.
> > >
> > > Digging through the email archives, I found this message:
> > > http://mail-archives.apache.org/mod_mbox/cloudstack-dev/
> > > 201501.mbox/%3c54c6c184.3010...@gmail.com%3E
> > > ..which suggests that if a template is cross-zone, then it has the
> same ID
> > > in all zones.
> > >
> > > However the templates in this case all have "crossZones":false, and the
> > > above linked message sets the expectation that templates will NOT have
> the
> > > same ID.
> > >
> > > Could somebody confirm the expectations for uniqueness of template
> IDs? Is
> > > it guaranteed that (under normal circumstances) template IDs are unique
> > > except for when crossZones is set - or is duplicate template IDs
> always a
> > > possibility? Does jclouds need to change its understanding of the
> > > uniqueness of template IDs, or is there something odd about this
> customer's
> > > CloudStack installation?
> > >
> > > Thanks!
> > >
> > > Richard.
> > >
> >
> >
> >
> > --
> > Rafael Weingärtner
> >
>



-- 
Rafael Weingärtner

Reply via email to