<div dir="ltr">What are the reasons for keeping /containers?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 15, 2016 at 9:14 PM, Hongbin Lu <span dir="ltr"><<a href="mailto:hongbin.lu@huawei.com" target="_blank">hongbin.lu@huawei.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-CA" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Disagree.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">If the container managing part is removed, Magnum is just a COE deployment tool. This is really a scope-mismatch IMO. The middle ground I can see is to have
a flag that allows operators to turned off the container managing part. If it is turned off, COEs are not managed by Magnum and requests sent to the /container endpoint will return a reasonable error code. Thoughts?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Best regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hongbin<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Mike Metral [mailto:<a href="mailto:mike.metral@rackspace.com" target="_blank">mike.metral@rackspace.com</a>]
<br>
<b>Sent:</b> January-15-16 6:24 PM<br>
<b>To:</b> <a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a></span></p><div><div class="h5"><br>
<b>Subject:</b> Re: [openstack-dev] [magnum] Nesting /containers resource under /bays<u></u><u></u></div></div><p></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">I too believe that the /containers endpoint is obstructive to the overall goal of Magnum.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">IMO, Magnum’s scope should
<b>only</b> be concerned with:<u></u><u></u></span></p>
</div>
<ol start="1" type="1">
<li class="MsoNormal" style="color:black">
<span style="font-size:10.5pt;font-family:"Calibri","sans-serif"">Provisioning the underlying infrastructure required by the Container Orchestration Engine (COE) and<u></u><u></u></span></li><li class="MsoNormal" style="color:black">
<span style="font-size:10.5pt;font-family:"Calibri","sans-serif"">Instantiating the COE itself on top of said infrastructure from step #1.<u></u><u></u></span></li></ol>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">Anything further regarding Magnum interfacing or interacting with containers starts to get into a gray area that could easily evolve into:<u></u><u></u></span></p>
</div>
<ul type="disc">
<li class="MsoNormal" style="color:black">
<span style="font-size:10.5pt;font-family:"Calibri","sans-serif"">Potential race conditions between Magnum and the designated COE and<u></u><u></u></span></li><li class="MsoNormal" style="color:black">
<span style="font-size:10.5pt;font-family:"Calibri","sans-serif"">Would create design & implementation overhead and debt that could bite us in the long run seeing how all COE’s operate & are based off various different paradigms in terms of describing & managing
containers, and this divergence will only continue to grow with time.<u></u><u></u></span></li><li class="MsoNormal" style="color:black">
<span style="font-size:10.5pt;font-family:"Calibri","sans-serif"">Not to mention, the recreation of functionality around managing containers in Magnum seems redundant in nature as this is the very reason to want to use a COE in the first place – because it’s
a more suited tool for the task<u></u><u></u></span></li></ul>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">If there is low-hanging fruit in terms of common functionality across
<b>all</b> COE’s, then those generic capabilities <i>could</i> be abstracted and integrated into Magnum, but these have to be carefully examined beforehand to ensure true parity exists for the capability across all COE’s.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">However, I still worry that going down this route toes the line that Magnum should and could be a part of the managing container story to some degree – which
again should be the sole responsibility of the COE, not Magnum.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">I’m in favor of doing away with the /containers endpoint – continuing with it just looks like a snowball of scope-mismatch and management issues just waiting
to happen.<u></u><u></u></span></p>
</div>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"><u></u> <u></u></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">Mike Metral<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">Product Architect – Private Cloud R&D - Rackspace<u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div class="MsoNormal" align="center" style="text-align:center;background:white">
<span style="font-family:"Calibri","sans-serif";color:#212121">
<hr size="2" width="639" style="width:479.2pt" align="center">
</span></div>
<div>
<p class="MsoNormal" style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#212121">From:</span></b><span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#212121"> </span></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#212121">Hongbin
Lu <<a href="mailto:hongbin.lu@huawei.com" target="_blank"><span style="color:purple">hongbin.lu@huawei.com</span></a>><br>
<b>Sent:</b><span> </span>Thursday, January 14, 2016 1:59 PM<br>
<b>To:</b><span> </span>OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b><span> </span>Re: [openstack-dev] [magnum] Nesting /containers resource under /bays</span><span style="font-family:"Calibri","sans-serif";color:#212121">
<u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">In short, the container IDs assigned by Magnum are independent of the container IDs assigned by Docker daemon. Magnum do the IDs mapping
before doing a native API call. In particular, here is how it works.</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><span style="color:#212121"><u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">If users create a container through Magnum endpoint, Magnum will do the followings:</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">1.</span><span style="font-size:7.0pt;color:#1f497d"> <span> </span></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Generate
a uuid (if not provided).</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">2.</span><span style="font-size:7.0pt;color:#1f497d"> <span> </span></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Call
Docker Swarm API to create a container, with its hostname equal to the generated uuid.</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">3.</span><span style="font-size:7.0pt;color:#1f497d"> <span> </span></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Persist
container to DB with the generated uuid.</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><span style="color:#212121"><u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">If users perform an operation on an existing container, they must provide the uuid (or the name) of the container (if name is provided,
it will be used to lookup the uuid). Magnum will do the followings:</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">1.</span><span style="font-size:7.0pt;color:#1f497d"> <span> </span></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Call
Docker Swarm API to list all containers.</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">2.</span><span style="font-size:7.0pt;color:#1f497d"> <span> </span></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Find
the container whose hostname is equal to the provided uuid, record its “docker_id” that is the ID assigned by native tool.</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">3.</span><span style="font-size:7.0pt;color:#1f497d"> <span> </span></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Call
Docker Swarm API with “docker_id” to perform the operation.</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><span style="color:#212121"><u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Magnum doesn’t assume all operations to be routed through Magnum endpoints. Alternatively, users can directly call the native APIs.
In this case, the created resources are not managed by Magnum and won’t be accessible through Magnum’s endpoints.</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><span style="color:#212121"><u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hope it is clear.</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><span style="color:#212121"><u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Best regards,</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hongbin</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><span style="color:#212121"><u></u><u></u></span></p>
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<div>
<p class="MsoNormal" style="background:white"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#212121">From:</span></b><span><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#212121"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#212121">Kyle
Kelley [<a href="mailto:kyle.kelley@RACKSPACE.COM" target="_blank"><span style="color:purple">mailto:kyle.kelley@RACKSPACE.COM</span></a>]<span> </span><br>
<b>Sent:</b><span> </span>January-14-16 11:39 AM<br>
<b>To:</b><span> </span>OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b><span> </span>Re: [openstack-dev] [magnum] Nesting /containers resource under /bays</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
</div>
</div>
<p class="MsoNormal" style="background:white"><span style="color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">This presumes a model where Magnum is in complete control of the IDs of individual containers. How does this work with the Docker daemon?<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">> </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d;background:white">In Rest API, you can set the “uuid” field
in the json request body (this is not supported in CLI, but it is an easy add).</span><span style="font-family:"Calibri","sans-serif";color:#212121"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">In the Rest API for Magnum or Docker? Has Magnum completely broken away from exposing native tooling - are all container operations assumed to be routed
through Magnum endpoints?<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">> </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d;background:white">For the idea of nesting container resource,
I prefer not to do that if there are alternatives or it can be work around.</span><span style="font-family:"Calibri","sans-serif";color:#212121"> </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d;background:white">IMO, it
sets a limitation that a container must have a bay, which might not be the case in future. For example, we might add a feature that creating a container will automatically create a bay. If a container must have a bay on creation, such feature is impossible.</span><span style="font-family:"Calibri","sans-serif";color:#212121"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">If that's *really* a feature you need and are fully involved in designing for, this seems like a case where creating a container via these endpoints would
create a bay and return the full resource+subresource.<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">Personally, I think these COE endpoints need to not be in the main spec, to reduce the surface area until these are put into further use.<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center;background:white">
<span style="font-family:"Calibri","sans-serif";color:#212121">
<hr size="2" width="98%" align="center">
</span></div>
<div>
<div>
<p class="MsoNormal" style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#212121">From:</span></b><span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#212121"> </span></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#212121">Hongbin
Lu <<a href="mailto:hongbin.lu@huawei.com" target="_blank"><span style="color:purple">hongbin.lu@huawei.com</span></a>><br>
<b>Sent:</b><span> </span>Wednesday, January 13, 2016 5:00 PM<br>
<b>To:</b><span> </span>OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b><span> </span>Re: [openstack-dev] [magnum] Nesting /containers resource under /bays</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> </span><span style="color:#212121"><u></u><u></u></span></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Jamie,</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><span style="color:#212121"><u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I would like to clarify several things.</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><span style="color:#212121"><u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">First, a container uuid is intended to be unique globally (not within individual cluster). If you create a container with duplicated
uuid, the creation will fail regardless of its bay. Second, you are in control of the uuid of the container that you are going to create. In Rest API, you can set the “uuid” field in the json request body (this is not supported in CLI, but it is an easy add).
If a uuid is provided, Magnum will use it as the uuid of the container (instead of generating a new uuid).</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><span style="color:#212121"><u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">For the idea of nesting container resource, I prefer not to do that if there are alternatives or it can be work around. IMO, it sets
a limitation that a container must have a bay, which might not be the case in future. For example, we might add a feature that creating a container will automatically create a bay. If a container must have a bay on creation, such feature is impossible.</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><span style="color:#212121"><u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Best regards,</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hongbin</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><span style="color:#212121"><u></u><u></u></span></p>
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<div>
<p class="MsoNormal" style="background:white"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#212121">From:</span></b><span><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#212121"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#212121">Jamie
Hannaford [<a href="mailto:jamie.hannaford@rackspace.com" target="_blank"><span style="color:purple">mailto:jamie.hannaford@rackspace.com</span></a>]<span> </span><br>
<b>Sent:</b><span> </span>January-13-16 4:43 AM<br>
<b>To:</b><span> </span><a href="mailto:openstack-dev@lists.openstack.org" target="_blank"><span style="color:purple">openstack-dev@lists.openstack.org</span></a><br>
<b>Subject:</b><span> </span>[openstack-dev] [magnum] Nesting /containers resource under /bays</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
</div>
</div>
<p class="MsoNormal" style="background:white"><span style="color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">I've recently been gathering feedback about the Magnum API and one of the things that people commented on was the global /containers endpoints. One
person highlighted the danger of UUID collisions:<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">"""<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">It takes a container ID which is intended to be unique within that individual cluster. Perhaps this doesn't matter, considering the surface for hash
collisions. You're running a 1% risk of collision on the shorthand container IDs:<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt;background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">In [14]: n = lambda p,H: math.sqrt(2*H * math.log(1/(1-p)))<u></u><u></u></span></p>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">In [15]: n(.01, 0x1000000000000)</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">Out[15]: 2378620.<a href="tel:6298183016" value="+16298183016" target="_blank">6298183016</a></span><span style="color:#212121"><u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">(this comes from the Birthday Attack - <a href="https://en.wikipedia.org/wiki/Birthday_attack" target="_blank"><span style="color:purple">https://en.wikipedia.org/wiki/Birthday_attack)</span></a><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">The main reason I questioned this is that we're not in control of how the hashes are created whereas each Docker node or Swarm cluster will pick a new
ID under collisions. We don't have that guarantee when aggregating across.<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">The use case that was outlined appears to be aggregation and reporting. That can be done in a different manner than programmatic access to single containers.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">"""<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">Representing a resource without reference to its parent resource also goes against the convention of many other OpenStack APIs.<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">Nesting a container resource under its parent bay would mitigate both of these issues:<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">/bays/{uuid}/containers/{uuid}<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">I'd like to get feedback from folks in the Magnum team and see if anybody has differing opinions about this.<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">Jamie<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <u></u><u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> </span><span style="color:#212121"><u></u><u></u></span></p>
<div class="MsoNormal" align="center" style="text-align:center;background:white">
<span style="font-family:"Calibri","sans-serif";color:#212121">
<hr size="2" width="100%" align="center">
</span></div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">Rackspace International GmbH a company registered in the Canton of Zurich, Switzerland (company identification number CH-020.4.047.077-1) whose registered
office is at Pfingstweidstrasse 60, 8005 Zurich, Switzerland. Rackspace International GmbH privacy policy can be viewed at<a href="http://www.rackspace.co.uk/legal/swiss-privacy-policy" target="_blank"><span style="color:purple">www.rackspace.co.uk/legal/swiss-privacy-policy</span></a><span> </span>-
This e-mail message may contain confidential or privileged information intended for the recipient. Any dissemination, distribution or copying of the enclosed material is prohibited. If you receive this transmission in error, please notify us immediately by
e-mail at<span> </span><a href="mailto:abuse@rackspace.com" target="_blank"><span style="color:purple">abuse@rackspace.com</span></a><span> </span>and delete the original message. Your cooperation is appreciated.</span><span style="color:#212121"><u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:black;background:white">__________________________________________________________________________</span><span style="font-family:"Calibri","sans-serif";color:black"><br>
<span style="background:white">OpenStack Development Mailing List (not for usage questions)</span><br>
<span style="background:white">Unsubscribe:<span> </span></span></span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"><a href="mailto:OpenStack-dev-request@lists.openstack.org" target="_blank"><span style="font-size:12.0pt;color:purple;background:white">OpenStack-dev-request@lists.openstack.org</span></a></span><span style="font-family:"Calibri","sans-serif";color:black;background:white">?subject:unsubscribe</span><span style="font-family:"Calibri","sans-serif";color:black"><br>
</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank"><span style="font-size:12.0pt;color:purple;background:white">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</span></a><u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"><u></u> <u></u></span></p>
</div>
</div>
</div></div></div>
</div>
<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Kyle Kelley (<a href="https://twitter.com/rgbkrk" target="_blank">@rgbkrk</a>; <a href="http://lambdaops.com/" style="color:rgb(17,85,204)" target="_blank">lambdaops.com</a>)</div></div></div></div></div></div>
</div>