<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1262302994;
        mso-list-template-ids:-122525256;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1
        {mso-list-id:1858084410;
        mso-list-template-ids:1162272182;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-CA" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Disagree.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></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?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hongbin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></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:mike.metral@rackspace.com]
<br>
<b>Sent:</b> January-15-16 6:24 PM<br>
<b>To:</b> openstack-dev@lists.openstack.org<br>
<b>Subject:</b> Re: [openstack-dev] [magnum] Nesting /containers resource under /bays<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"><o:p> </o:p></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:<o:p></o:p></span></p>
</div>
<ol start="1" type="1">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo1">
<span style="font-size:10.5pt;font-family:"Calibri","sans-serif"">Provisioning the underlying infrastructure required by the Container Orchestration Engine (COE) and<o:p></o:p></span></li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo1">
<span style="font-size:10.5pt;font-family:"Calibri","sans-serif"">Instantiating the COE itself on top of said infrastructure from step #1.<o:p></o:p></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:<o:p></o:p></span></p>
</div>
<ul type="disc">
<li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo2">
<span style="font-size:10.5pt;font-family:"Calibri","sans-serif"">Potential race conditions between Magnum and the designated COE and<o:p></o:p></span></li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo2">
<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.<o:p></o:p></span></li><li class="MsoNormal" style="color:black;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo2">
<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<o:p></o:p></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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"><o:p> </o:p></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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"><o:p> </o:p></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.<o:p></o:p></span></p>
</div>
</div>
<div>
<div id="">
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">Mike Metral<o:p></o:p></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<o:p></o:p></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 id="divRplyFwdMsg">
<p class="MsoNormal" style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#212121">From:</span></b><span class="apple-converted-space"><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"><span style="color:purple">hongbin.lu@huawei.com</span></a>><br>
<b>Sent:</b><span class="apple-converted-space"> </span>Thursday, January 14, 2016 1:59 PM<br>
<b>To:</b><span class="apple-converted-space"> </span>OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b><span class="apple-converted-space"> </span>Re: [openstack-dev] [magnum] Nesting /containers resource under /bays</span><span style="font-family:"Calibri","sans-serif";color:#212121">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="text-indent:-18.0pt;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 class="apple-converted-space"> </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"><o:p></o:p></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="text-indent:-18.0pt;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 class="apple-converted-space"> </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"><o:p></o:p></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="text-indent:-18.0pt;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 class="apple-converted-space"> </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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="text-indent:-18.0pt;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 class="apple-converted-space"> </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"><o:p></o:p></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="text-indent:-18.0pt;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 class="apple-converted-space"> </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"><o:p></o:p></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="text-indent:-18.0pt;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 class="apple-converted-space"> </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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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 class="apple-converted-space"><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"><span style="color:purple">mailto:kyle.kelley@RACKSPACE.COM</span></a>]<span class="apple-converted-space"> </span><br>
<b>Sent:</b><span class="apple-converted-space"> </span>January-14-16 11:39 AM<br>
<b>To:</b><span class="apple-converted-space"> </span>OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b><span class="apple-converted-space"> </span>Re: [openstack-dev] [magnum] Nesting /containers resource under /bays</span><span style="color:#212121"><o:p></o:p></span></p>
</div>
</div>
</div>
<p class="MsoNormal" style="background:white"><span style="color:#212121"> <o:p></o:p></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?<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></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">​<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></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?<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></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"><o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></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.<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></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.<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></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 id="divRplyFwdMsg">
<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 class="apple-converted-space"><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"><span style="color:purple">hongbin.lu@huawei.com</span></a>><br>
<b>Sent:</b><span class="apple-converted-space"> </span>Wednesday, January 13, 2016 5:00 PM<br>
<b>To:</b><span class="apple-converted-space"> </span>OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b><span class="apple-converted-space"> </span>Re: [openstack-dev] [magnum] Nesting /containers resource under /bays</span><span style="color:#212121"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> </span><span style="color:#212121"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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"><o:p></o:p></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 class="apple-converted-space"><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"><span style="color:purple">mailto:jamie.hannaford@rackspace.com</span></a>]<span class="apple-converted-space"> </span><br>
<b>Sent:</b><span class="apple-converted-space"> </span>January-13-16 4:43 AM<br>
<b>To:</b><span class="apple-converted-space"> </span><a href="mailto:openstack-dev@lists.openstack.org"><span style="color:purple">openstack-dev@lists.openstack.org</span></a><br>
<b>Subject:</b><span class="apple-converted-space"> </span>[openstack-dev] [magnum] Nesting /containers resource under /bays</span><span style="color:#212121"><o:p></o:p></span></p>
</div>
</div>
</div>
<p class="MsoNormal" style="background:white"><span style="color:#212121"> <o:p></o:p></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:<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">"""<o:p></o:p></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:<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></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)))<o:p></o:p></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"><o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">Out[15]: 2378620.6298183016</span><span style="color:#212121"><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></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><o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></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.<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></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.​<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">"""<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></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.<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></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:<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">/bays/{uuid}/containers/{uuid}​<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></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.<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">Jamie<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri","sans-serif";color:#212121">   </span><span style="color:#212121"><o:p></o:p></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"><span style="color:purple">www.rackspace.co.uk/legal/swiss-privacy-policy</span></a><span class="apple-converted-space"> </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 class="apple-converted-space"> </span><a href="mailto:abuse@rackspace.com"><span style="color:purple">abuse@rackspace.com</span></a><span class="apple-converted-space"> </span>and delete the original message. Your cooperation is appreciated.</span><span style="color:#212121"><o:p></o:p></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 class="apple-converted-space"> </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"><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"><span style="font-size:12.0pt;color:purple;background:white">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</span></a><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
</div>
</div>
</body>
</html>