<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>
<div>All,</div>
<div><br>
</div>
<div>Thanks for the feedback and additional ideas related to discovery. For clarity purposes, I would like to circle back to the specific issue that I am experiencing with implementing Flannel for Swarm. Flannel can not be implemented in Swarm bay types without
 making changes to discovery for Swarm. This is because:</div>
<ol>
<li>Flannel requires etcd, which is not implemented in Magnum’s Swarm bay type.</li><li>The discovery_url is implemented differently among Kubernetes and Swarm bay types, making it impossible for Swarm and etcd discovery to coexist within the same bay type.</li></ol>
<div>I am in the process of moving forward with option 2 of my original email so flannel can be implemented in swarm bay types [1]. I have created a bp [2] to address discovery more holistically. It would be helpful if you could provide your ideas in the whiteboard
 of the bp.</div>
<div><br>
</div>
<div>[1] <a href="https://review.openstack.org/#/c/224367/">https://review.openstack.org/#/c/224367/</a></div>
<div>[2] <a href="https://blueprints.launchpad.net/magnum/+spec/bay-type-discovery-options">https://blueprints.launchpad.net/magnum/+spec/bay-type-discovery-options</a></div>
<div><br>
</div>
<div>
<div>Regards,</div>
<div>Daneyon Hansen</div>
<div>Software Engineer</div>
<div>Email: danehans@cisco.com</div>
<div>Phone: 303-718-0400</div>
<div><a href="http://about.me/daneyon_hansen">http://about.me/daneyon_hansen</a></div>
</div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>王华 <<a href="mailto:wanghua.humble@gmail.com">wanghua.humble@gmail.com</a>><br>
<span style="font-weight:bold">Reply-To: </span>"OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Date: </span>Monday, September 21, 2015 at 1:18 AM<br>
<span style="font-weight:bold">To: </span>"OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [openstack-dev] [magnum] Discovery<br>
</div>
<div><br>
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div>
<div>
<div dir="ltr">Swarm<span style="font-size:12.8000001907349px"> already supports etcd as a discovery backend [1]. So we can implement both hosted discovery with Docker Hub and using name etcd. And make hosted discovery with Docker Hub default if discovery_url
 is not given.</span>
<div><span style="font-size:12.8000001907349px"><br>
</span></div>
<div><span style="font-size:12.8000001907349px">If we run etcd in bay, etcd alse need discovery [2]. Operator should set up a etcd cluster for other etcd clusters to discover or use public discovery service. I think it is not necessary to run etcd in swarm
 cluster just for discovery service. In a private cloud, operator should set up a local etcd cluster for discovery service, and all the bays can use it.<br>
</span>
<div><span style="font-size:12.8000001907349px"><br>
</span></div>
<div><span style="font-size:12.8000001907349px">[1] <a href="https://docs.docker.com/swarm/discovery/">https://docs.docker.com/swarm/discovery/</a></span></div>
</div>
<div><span style="font-size:12.8000001907349px">[2] <a href="https://github.com/coreos/etcd/blob/master/Documentation/clustering.md">https://github.com/coreos/etcd/blob/master/Documentation/clustering.md</a></span></div>
<div><span style="font-size:12.8000001907349px"><br>
</span></div>
<div><span style="font-size:12.8000001907349px">Regards,</span></div>
<div><span style="font-size:12.8000001907349px">Wanghua</span></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Sep 18, 2015 at 11:39 AM, Adrian Otto <span dir="ltr">
<<a href="mailto:adrian.otto@rackspace.com" target="_blank">adrian.otto@rackspace.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In the case where a private cloud is used without access to the Internet, you do have the option of running your own etcd, and configuring that to be used instead.<br>
<br>
Adding etcd to every bay should be optional, as a subsequent feature, but should be controlled by a flag in the Baymodel that defaults to off so the public discovery service is used. It might be nice to be able to configure Magnum in an isolated mode which
 would change the system level default for that flag from off to on.<br>
<br>
Maybe the Baymodel resource attribute should be named local_discovery_service.<br>
<br>
Should turning this on also set the minimum node count for the bay to 3? If not, etcd will not be highly available.<br>
<span class="HOEnZb"><font color="#888888"><br>
Adrian<br>
</font></span>
<div class="HOEnZb">
<div class="h5"><br>
> On Sep 17, 2015, at 1:01 PM, Egor Guz <<a href="mailto:EGuz@walmartlabs.com">EGuz@walmartlabs.com</a>> wrote:<br>
><br>
> +1 for stop using public discovery endpoint, most private cloud vms doesn’t have access to internet and operator must to run etcd instance somewhere just for discovery.<br>
><br>
> —<br>
> Egor<br>
><br>
> From: Andrew Melton <<a href="mailto:andrew.melton@RACKSPACE.COM">andrew.melton@RACKSPACE.COM</a><mailto:<a href="mailto:andrew.melton@RACKSPACE.COM">andrew.melton@RACKSPACE.COM</a>>><br>
> Reply-To: "OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a><mailto:<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>>><br>
> Date: Thursday, September 17, 2015 at 12:06<br>
> To: "OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a><mailto:<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>>><br>
> Subject: Re: [openstack-dev] [magnum] Discovery<br>
><br>
><br>
> Hey Daneyon,<br>
><br>
><br>
> I'm fairly partial towards #2 as well. Though, I'm wondering if it's possible to take it a step further. Could we run etcd in each Bay without using the public discovery endpoint? And then, configure Swarm to simply use the internal ectd as it's discovery
 mechanism? This could cut one of our external service dependencies and make it easier to run Magnum is an environment with locked down public internet access.​<br>
><br>
><br>
> Anyways, I think #2 could be a good start that we could iterate on later if need be.<br>
><br>
><br>
> --Andrew<br>
><br>
><br>
> ________________________________<br>
> From: Daneyon Hansen (danehans) <<a href="mailto:danehans@cisco.com">danehans@cisco.com</a><mailto:<a href="mailto:danehans@cisco.com">danehans@cisco.com</a>>><br>
> Sent: Wednesday, September 16, 2015 11:26 AM<br>
> To: OpenStack Development Mailing List (not for usage questions)<br>
> Subject: [openstack-dev] [magnum] Discovery<br>
><br>
> All,<br>
><br>
> While implementing the flannel --network-driver for swarm, I have come across an issue that requires feedback from the community. Here is the breakdown of the issue:<br>
><br>
>  1.  Flannel [1] requires etcd to store network configuration. Meeting this requirement is simple for the kubernetes bay types since kubernetes requires etcd.<br>
>  2.  A discovery process is needed for bootstrapping etcd. Magnum implements the public discovery option [2].<br>
>  3.  A discovery process is also required to bootstrap a swarm bay type. Again, Magnum implements a publicly hosted (Docker Hub) option [3].<br>
>  4.  Magnum API exposes the discovery_url attribute that is leveraged by swarm and etcd discovery.<br>
>  5.  Etcd can not be implemented in swarm because discovery_url is associated to swarm’s discovery process and not etcd.<br>
><br>
> Here are a few options on how to overcome this obstacle:<br>
><br>
>  1.  Make the discovery_url more specific, for example etcd_discovery_url and swarm_discovery_url. However, this option would needlessly expose both discovery url’s to all bay types.<br>
>  2.  Swarm supports etcd as a discovery backend. This would mean discovery is similar for both bay types. With both bay types using the same mechanism for discovery, it will be easier to provide a private discovery option in the future.<br>
>  3.  Do not support flannel as a network-driver for k8s bay types. This would require adding support for a different driver that supports multi-host networking such as libnetwork. Note: libnetwork is only implemented in the Docker experimental release:
<a href="https://github.com/docker/docker/tree/master/experimental" rel="noreferrer" target="_blank">
https://github.com/docker/docker/tree/master/experimental</a>.<br>
><br>
> I lean towards #2 but their may be other options, so feel free to share your thoughts. I would like to obtain feedback from the community before proceeding in a particular direction.<br>
><br>
> [1] <a href="https://github.com/coreos/flannel" rel="noreferrer" target="_blank">
https://github.com/coreos/flannel</a><br>
> [2] <a href="https://github.com/coreos/etcd/blob/master/Documentation/discovery_protocol.md" rel="noreferrer" target="_blank">
https://github.com/coreos/etcd/blob/master/Documentation/discovery_protocol.md</a><br>
> [3] <a href="https://docs.docker.com/swarm/discovery/" rel="noreferrer" target="_blank">
https://docs.docker.com/swarm/discovery/</a><br>
><br>
> Regards,<br>
> Daneyon Hansen<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>
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>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</span>
</body>
</html>