<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-03-31 2:55 GMT+08:00 Doug Hellmann <span dir="ltr"><<a target="_blank" href="mailto:doug@doughellmann.com">doug@doughellmann.com</a>></span>:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Excerpts from Paul Belanger's message of 2017-03-22 09:58:46 -0400:<br>
> On Tue, Mar 21, 2017 at 05:53:35PM -0600, Alex Schultz wrote:<br>
> > On Tue, Mar 21, 2017 at 5:35 PM, John Dickinson <<a href="mailto:me@not.mn">me@not.mn</a>> wrote:<br>
> > ><br>
> > ><br>
> > > On 21 Mar 2017, at 15:34, Alex Schultz wrote:<br>
> > ><br>
> > >> On Tue, Mar 21, 2017 at 3:45 PM, John Dickinson <<a href="mailto:me@not.mn">me@not.mn</a>> wrote:<br>
> > >>> I've been following this thread, but I must admit I seem to have missed something.<br>
> > >>><br>
> > >>> What problem is being solved by storing per-server service configuration options in an external distributed CP system that is currently not possible with the existing pattern of using local text files?<br>
> > >>><br>
> > >><br>
> > >> This effort is partially to help the path to containerization where we<br>
> > >> are delivering the service code via container but don't want to<br>
> > >> necessarily deliver the configuration in the same fashion.  It's about<br>
> > >> ease of configuration where moving service -> config files (on many<br>
> > >> hosts/containers) to service -> config via etcd (single source<br>
> > >> cluster).  It's also about an alternative to configuration management<br>
> > >> where today we have many tools handling the files in various ways<br>
> > >> (templates, from repo, via code providers) and trying to come to a<br>
> > >> more unified way of representing the configuration such that the end<br>
> > >> result is the same for every deployment tool.  All tools load configs<br>
> > >> into $place and services can be configured to talk to $place.  It<br>
> > >> should be noted that configuration files won't go away because many of<br>
> > >> the companion services still rely on them (rabbit/mysql/apache/etc) so<br>
> > >> we're really talking about services that currently use oslo.<br>
> > ><br>
> > > Thanks for the explanation!<br>
> > ><br>
> > > So in the future, you expect a node in a clustered OpenStack service to be deployed and run as a container, and then that node queries a centralized etcd (or other) k/v store to load config options. And other services running in the (container? cluster?) will load config from local text files managed in some other way.<br>
> ><br>
> > No the goal is in the etcd mode, that it  may not be necessary to load<br>
> > the config files locally at all.  That being said there would still be<br>
> > support for having some configuration from a file and optionally<br>
> > provide a kv store as another config point.  'service --config-file<br>
> > /etc/service/service.conf --config-etcd proto://ip:port/slug'<br>
> ><br>
> Hmm, not sure I like this.  Having a service magically read from 2 different<br>
> configuration source at run time, merge them, and reload, seems overly<br>
> complicated. And even harder to debug.<br>
><br>
> > ><br>
> > > No wait. It's not the *services* that will load the config from a kv store--it's the config management system? So in the process of deploying a new container instance of a particular service, the deployment tool will pull the right values out of the kv system and inject those into the container, I'm guessing as a local text file that the service loads as normal?<br>
> > ><br>
> ><br>
> > No the thought is to have the services pull their configs from the kv<br>
> > store via oslo.config.  The point is hopefully to not require<br>
> > configuration files at all for containers.  The container would get<br>
> > where to pull it's configs from (ie. <a target="_blank" rel="noreferrer" href="http://11.1.1.1:2730/magic/">http://11.1.1.1:2730/magic/</a> or<br>
> > /etc/myconfigs/).  At that point it just becomes another place to load<br>
> > configurations from via oslo.config.  Configuration management comes<br>
> > in as a way to load the configs either as a file or into etcd.  Many<br>
> > operators (and deployment tools) are already using some form of<br>
> > configuration management so if we can integrate in a kv store output<br>
> > option, adoption becomes much easier than making everyone start from<br>
> > scratch.<br>
> ><br>
> > > This means you could have some (OpenStack?) service for inventory management (like Karbor) that is seeding the kv store, the cloud infrastructure software itself is "cloud aware" and queries the central distributed kv system for the correct-right-now config options, and the cloud service itself gets all the benefits of dynamic scaling of available hardware resources. That's pretty cool. Add hardware to the inventory, the cloud infra itself expands to make it available. Hardware fails, and the cloud infra resizes to adjust. Apps running on the infra keep doing their thing consuming the resources. It's clouds all the way down :-)<br>
> > ><br>
> > > Despite sounding pretty interesting, it also sounds like a lot of extra complexity. Maybe it's worth it. I don't know.<br>
> > ><br>
> ><br>
> > Yea there's extra complexity at least in the<br>
> > deployment/management/<wbr>monitoring of the new service or maybe not.<br>
> > Keeping configuration files synced across 1000s of nodes (or<br>
> > containers) can be just as hard however.<br>
> ><br>
> Please correct me if I am wrong, because I still have my container training<br>
> wheels on. I understand the need for etcd, and operators to write their<br>
> configuration into it.  Why I am struggling with still, is why you need<br>
> oslo.config to support it.  There is nothing stopping an operator today from<br>
> using etcd / confd in a container, right?  I can only imagine countless other<br>
> services that run in containers using them.<br>
><br>
> Why do we, openstack, need to write our own custom thing and be different in<br>
> this regard?  Why do we need our services to talk directly to etcd? When things<br>
> like apache2, nginx, other non-openstack service just use etcd / confd?<br>
><br>
> From reading the thread, it seems the issue is more about keeping files inside<br>
> the container out of the container, which makes them easier to maintain.<br>
><br>
> And this is the part I need help with. If I was to do a POC this afternoon,<br>
> inside a container. I would do the following:<br>
><br>
> Create container with keystone<br>
> Create etcd service<br>
> Add confd into container<br>
>  - mkdir -p /etc/confd/{conf.d,templates}<br>
>  - vi /etc/confd/conf.d/myconfig.<wbr>toml<br>
>  - vi /etc/confd/templates/myconfig.<wbr>conf.tmpl<br>
>  - start confd<br>
><br>
> I would use ansible or puppet or Dockerfile to properly setup myconfg.toml for<br>
> keystone. Same with myconf.conf.tmpl, it would be a for d in dict: for key,<br>
> value in d thing, to glob down any thing from etcd into ini format.<br>
><br>
> This does mean you still need to manage confd templates however, but this is<br>
> okay, because if I deploy any other application with etcd, this is how I would<br>
> it.<br>
><br>
> Which gets me to my final question. How are you proposing we configure apache2<br>
> or nginx with etcd? I can only assume it is using something like the process<br>
> above?<br>
<br>
This is a good point, and another reason I think we need a bit more<br>
detail written down (spec?) before we start adding things to<br>
oslo.config.<br></blockquote><div><br></div><div>    +1 for  oslo-spec, centralized config values is really a intresting feature for oslo.config which keeping file based options.<br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
<br>
Doug<br>
<br>
><br>
> > > Thanks again for the explanation.<br>
> > ><br>
> > ><br>
> > > --John<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > >><br>
> > >> Thanks,<br>
> > >> -Alex<br>
> > >><br>
> > >>><br>
> > >>> --John<br>
> > >>><br>
> > >>><br>
> > >>><br>
> > >>><br>
> > >>> On 21 Mar 2017, at 14:26, Davanum Srinivas wrote:<br>
> > >>><br>
> > >>>> Jay,<br>
> > >>>><br>
> > >>>> the /v3alpha HTTP API  (grpc-gateway) supports watch<br>
> > >>>> <a target="_blank" rel="noreferrer" href="https://coreos.com/etcd/docs/latest/dev-guide/apispec/swagger/rpc.swagger.json">https://coreos.com/etcd/docs/<wbr>latest/dev-guide/apispec/<wbr>swagger/rpc.swagger.json</a><br>
> > >>>><br>
> > >>>> -- Dims<br>
> > >>>><br>
> > >>>> On Tue, Mar 21, 2017 at 5:22 PM, Jay Pipes <<a href="mailto:jaypipes@gmail.com">jaypipes@gmail.com</a>> wrote:<br>
> > >>>>> On 03/21/2017 04:29 PM, Clint Byrum wrote:<br>
> > >>>>>><br>
> > >>>>>> Excerpts from Doug Hellmann's message of 2017-03-15 15:35:13 -0400:<br>
> > >>>>>>><br>
> > >>>>>>> Excerpts from Thomas Herve's message of 2017-03-15 09:41:16 +0100:<br>
> > >>>>>>>><br>
> > >>>>>>>> On Wed, Mar 15, 2017 at 12:05 AM, Joshua Harlow <<a href="mailto:harlowja@fastmail.com">harlowja@fastmail.com</a>><br>
> > >>>>>>>> wrote:<br>
> > >>>>>>>><br>
> > >>>>>>>>> * How does reloading work (does it)?<br>
> > >>>>>>>><br>
> > >>>>>>>><br>
> > >>>>>>>> No. There is nothing that we can do in oslo that will make services<br>
> > >>>>>>>> magically reload configuration. It's also unclear to me if that's<br>
> > >>>>>>>> something to do. In a containerized environment, wouldn't it be<br>
> > >>>>>>>> simpler to deploy new services? Otherwise, supporting signal based<br>
> > >>>>>>>> reload as we do today should be trivial.<br>
> > >>>>>>><br>
> > >>>>>>><br>
> > >>>>>>> Reloading works today with files, that's why the question is important<br>
> > >>>>>>> to think through. There is a special flag to set on options that are<br>
> > >>>>>>> "mutable" and then there are functions within oslo.config to reload.<br>
> > >>>>>>> Those are usually triggered when a service gets a SIGHUP or something<br>
> > >>>>>>> similar.<br>
> > >>>>>>><br>
> > >>>>>>> We need to decide what happens to a service's config when that API<br>
> > >>>>>>> is used and the backend is etcd. Maybe nothing, because every time<br>
> > >>>>>>> any config option is accessed the read goes all the way through to<br>
> > >>>>>>> etcd? Maybe a warning is logged because we don't support reloads?<br>
> > >>>>>>> Maybe an error is logged? Or maybe we flush the local cache and start<br>
> > >>>>>>> reading from etcd on future accesses?<br>
> > >>>>>>><br>
> > >>>>>><br>
> > >>>>>> etcd provides the ability to "watch" keys. So one would start a thread<br>
> > >>>>>> that just watches the keys you want to reload on, and when they change<br>
> > >>>>>> that thread will see a response and can reload appropriately.<br>
> > >>>>>><br>
> > >>>>>> <a target="_blank" rel="noreferrer" href="https://coreos.com/etcd/docs/latest/dev-guide/api_reference_v3.html">https://coreos.com/etcd/docs/<wbr>latest/dev-guide/api_<wbr>reference_v3.html</a><br>
> > >>>>><br>
> > >>>>><br>
> > >>>>> Yep. Unfortunately, you won't be able to start an eventlet greenthread to<br>
> > >>>>> watch an etcd3/gRPC key. The python grpc library is incompatible with<br>
> > >>>>> eventlet/gevent's monkeypatching technique and causes a complete program<br>
> > >>>>> hang if you try to communicate with the etcd3 server from a greenlet. Fun!<br>
> > >>>>><br>
> > >>>>> So, either use etcd2 (the no-longer-being-worked-on HTTP API) or don't use<br>
> > >>>>> eventlet in your client service.<br>
> > >>>>><br>
> > >>>>> Best,<br>
> > >>>>> -jay<br>
> > >>>>><br>
> > >>>>><br>
> > >>>>> ______________________________<wbr>______________________________<wbr>______________<br>
> > >>>>> OpenStack Development Mailing List (not for usage questions)<br>
> > >>>>> Unsubscribe: <a target="_blank" rel="noreferrer" href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
> > >>>>> <a target="_blank" rel="noreferrer" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
> > >>>><br>
> > >>>><br>
> > >>>><br>
> > >>>> --<br>
> > >>>> Davanum Srinivas :: <a target="_blank" rel="noreferrer" href="https://twitter.com/dims">https://twitter.com/dims</a><br>
> > >>>><br>
> > >>>> ______________________________<wbr>______________________________<wbr>______________<br>
> > >>>> OpenStack Development Mailing List (not for usage questions)<br>
> > >>>> Unsubscribe: <a target="_blank" rel="noreferrer" href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
> > >>>> <a target="_blank" rel="noreferrer" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
> > >>><br>
> > >>> ______________________________<wbr>______________________________<wbr>______________<br>
> > >>> OpenStack Development Mailing List (not for usage questions)<br>
> > >>> Unsubscribe: <a target="_blank" rel="noreferrer" href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
> > >>> <a target="_blank" rel="noreferrer" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
> > >>><br>
> > >><br>
> > >> ______________________________<wbr>______________________________<wbr>______________<br>
> > >> OpenStack Development Mailing List (not for usage questions)<br>
> > >> Unsubscribe: <a target="_blank" rel="noreferrer" href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
> > >> <a target="_blank" rel="noreferrer" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
> > ><br>
> > > ______________________________<wbr>______________________________<wbr>______________<br>
> > > OpenStack Development Mailing List (not for usage questions)<br>
> > > Unsubscribe: <a target="_blank" rel="noreferrer" href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
> > > <a target="_blank" rel="noreferrer" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
> > ><br>
> ><br>
> > ______________________________<wbr>______________________________<wbr>______________<br>
> > OpenStack Development Mailing List (not for usage questions)<br>
> > Unsubscribe: <a target="_blank" rel="noreferrer" href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
> > <a target="_blank" rel="noreferrer" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
><br>
<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a target="_blank" rel="noreferrer" href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
<a target="_blank" rel="noreferrer" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>ChangBo Guo(gcb)</div></div></div>
</div></div>