Note - thinking about this some more, you may want to note that it behaves as you say for pods and clusters, but not for zones. For those, only exact matches work, which is, frankly, what I’d prefer. So there’s inconsistent behavior from the API.
-I On 12/31/14, 1:54 AM, "Rohit Yadav" <[email protected]> wrote: >Hi Ian, > >Now I understand your issue. Yes, the name parameter does not search for >exact cluster matching the “name” you pass but for any cluster name that >matches for the substring “ster1”. > >In short, it’s not a bug, but feature - searches for resource names >matching a passed substring. > >> On 31-Dec-2014, at 3:04 pm, Ian Forde <[email protected]> wrote: >> >> Note that “ster1” is a proper substring match with “cluster1”. I tested >> it again on both 4.3.1 (RPMs on RHEL) and 4.4.2 (RPMs on CentOS) and got >> the same results. >> >> Also tried (in Cloudmonkey) “api listClusters name=ster1” and got a >>match >> on both 4.3.1 and 4.4.2. >> >> I also tried the CLI method. Doing a “curl >> ‘http://localhost:8096/?command=listClusters&name=ster1'” also got >>matches >> on both 4.3.1 and 4.4.2. >> >> All of a sudden, this doesn’t really look like a Cloudmonkey problem as >> much as it could be an API parameter parsing issue in CS itself. Maybe? >> (Just guessing there.) >> >> -I >> >> On 12/31/14, 12:32 AM, "Rohit Yadav" <[email protected]> wrote: >> >>> Which version of CloudStack you’re on? On 4.3.1/4.3.2, if I list >>>clusters >>> with a name that does not exist I get no results. Tested with both >>> CloudMonkey 5.3.0 and 5.3.1 (voting candidate, since 5.3.1 has not been >>> released yet). >>> >>> If you run raw API in say browser, with and without the name arg do you >>> get the same result? >>> >>>> On 31-Dec-2014, at 5:28 am, Ian Forde <[email protected]> wrote: >>>> >>>> Hi all - >>>> >>>> >>>> I’ve just detected some more strange behavior in Cloudmonkey. If I >>>> have a cluster named, “cluster1”, in a zone named, “pod1” inside a >>>>zone >>>> named, “zone1”, I should be able to list it correctly, yes? >>>> >>>> >>>> (local) 🐵 > list clusters >>>> >>>> count = 1 >>>> >>>> cluster: >>>> >>>> name = cluster1 >>>> >>>> id = d2e79c24-88e4-40f8-9639-e262c6e85f03 >>>> >>>> allocationstate = Enabled >>>> >>>> clustertype = CloudManaged >>>> >>>> cpuovercommitratio = 1.0 >>>> >>>> hypervisortype = XenServer >>>> >>>> managedstate = Managed >>>> >>>> memoryovercommitratio = 1.0 >>>> >>>> podid = d27ea9af-4228-482b-89ff-0f36f74e5a48 >>>> >>>> podname = pod1 >>>> >>>> zoneid = e362b144-04db-4540-aa53-75d9e2ffa832 >>>> >>>> zonename = zone1 >>>> >>>> >>>> So why does this happen? >>>> >>>> >>>> (local) 🐵 > list clusters name=ster1 >>>> >>>> count = 1 >>>> >>>> cluster: >>>> >>>> name = cluster1 >>>> >>>> id = d2e79c24-88e4-40f8-9639-e262c6e85f03 >>>> >>>> allocationstate = Enabled >>>> >>>> clustertype = CloudManaged >>>> >>>> cpuovercommitratio = 1.0 >>>> >>>> hypervisortype = XenServer >>>> >>>> managedstate = Managed >>>> >>>> memoryovercommitratio = 1.0 >>>> >>>> podid = d27ea9af-4228-482b-89ff-0f36f74e5a48 >>>> >>>> podname = pod1 >>>> >>>> zoneid = e362b144-04db-4540-aa53-75d9e2ffa832 >>>> >>>> zonename = zone1 >>>> >>>> >>>> Note that it appears to match the trailing characters of the object’s >>>> name. I also verified that this happens for pods, but zones appear to >>>> manifest the correct behavior. Tested with Cloudmonkey 5.3.0 and a >>>> fresh checkout from github (5.3.1) using the master branch. >>>> >>>> >>>> Can anyone else replicate this? >>>> >>>> >>>> -I >>>> >>> >>> Regards, >>> Rohit Yadav >>> Software Architect, ShapeBlue >>> M. +91 88 262 30892 | [email protected] >>> Blog: bhaisaab.org | Twitter: @_bhaisaab >>> >>> >>> >>> Find out more about ShapeBlue and our range of CloudStack related >>>services >>> >>> IaaS Cloud Design & >>> Build<http://shapeblue.com/iaas-cloud-design-and-build//> >>> CSForge – rapid IaaS deployment >>>framework<http://shapeblue.com/csforge/> >>> CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/> >>> CloudStack Software >>> Engineering<http://shapeblue.com/cloudstack-software-engineering/> >>> CloudStack Infrastructure >>> Support<http://shapeblue.com/cloudstack-infrastructure-support/> >>> CloudStack Bootcamp Training >>> Courses<http://shapeblue.com/cloudstack-training/> >>> >>> This email and any attachments to it may be confidential and are >>>intended >>> solely for the use of the individual to whom it is addressed. Any views >>> or opinions expressed are solely those of the author and do not >>> necessarily represent those of Shape Blue Ltd or related companies. If >>> you are not the intended recipient of this email, you must neither take >>> any action based upon its contents, nor copy or show it to anyone. >>>Please >>> contact the sender if you believe you have received this email in >>>error. >>> Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue >>> Services India LLP is a company incorporated in India and is operated >>> under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda >>>is >>> a company incorporated in Brasil and is operated under license from >>>Shape >>> Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic >>>of >>> South Africa and is traded under license from Shape Blue Ltd. ShapeBlue >>> is a registered trademark. >> > >Regards, >Rohit Yadav >Software Architect, ShapeBlue >M. +91 88 262 30892 | [email protected] >Blog: bhaisaab.org | Twitter: @_bhaisaab > > > >Find out more about ShapeBlue and our range of CloudStack related services > >IaaS Cloud Design & >Build<http://shapeblue.com/iaas-cloud-design-and-build//> >CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/> >CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/> >CloudStack Software >Engineering<http://shapeblue.com/cloudstack-software-engineering/> >CloudStack Infrastructure >Support<http://shapeblue.com/cloudstack-infrastructure-support/> >CloudStack Bootcamp Training >Courses<http://shapeblue.com/cloudstack-training/> > >This email and any attachments to it may be confidential and are intended >solely for the use of the individual to whom it is addressed. Any views >or opinions expressed are solely those of the author and do not >necessarily represent those of Shape Blue Ltd or related companies. If >you are not the intended recipient of this email, you must neither take >any action based upon its contents, nor copy or show it to anyone. Please >contact the sender if you believe you have received this email in error. >Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue >Services India LLP is a company incorporated in India and is operated >under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is >a company incorporated in Brasil and is operated under license from Shape >Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of >South Africa and is traded under license from Shape Blue Ltd. ShapeBlue >is a registered trademark.
