<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="auto"><div>Sorry for the delay. I didn't want to try and write this on my phone...<br><br><div class="gmail_quote"><div dir="ltr">On Sun, Feb 3, 2019, 9:39 PM Michael Still <<a href="mailto:mikal@stillhq.com" target="_blank">mikal@stillhq.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">That sounds interesting... So if I only wanted to redeploy say the ironic_neutron_agent container, how would I do that with a tag?</div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">To roll it out, update it's config, or upgrade to a new ticker tag, you'd just do</div><div dir="auto"><br></div><div dir="auto">kolla-ansible --tags neutron deploy | reconfigure | upgrade</div><div dir="auto"><br></div><div dir="auto">I don't think its granular enough to do just the agent and I'm not sure you'd want to anyway.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div>Its not immediately obvious to me where the command line for docker comes from in the ansible. Is that just in ansible/roles/neutron/defaults/main.yml ? If so, I could tweak the container definition for the container I want to hack with the get its code from a volume, and then redeploy just that one container, yes?</div><div></div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I suppose that's one way to go about quick hacks. You could add a new volume in that main.yml and then modify things in it. I think that would get messy though. There aren't any volume definitions explicitly for that container, so you'd have to add a whole section in there for it and I don't know what other side effects that might have. </div><div dir="auto"><br></div><div dir="auto">The slow but safe way to do it would be to point Kolla at your feature branch and rebuild the image each time you want to test a new patch set.</div><div dir="auto"><br></div><div>In kolla-build.conf do something like:</div><div><br></div><div><div>[neutron-base-plugin-networking-baremetal]</div><div>type = url<br></div><div>location = <a href="https://github.com/openstack/networking-baremetal.git">https://github.com/openstack/networking-baremetal.git</a><br></div><div>reference = tonys-hacks<br></div><div><br></div></div><div>then something like </div><div><br></div><div>kolla-build --config-file /etc/kolla/kolla-build.conf --base centos --type source --push --registry localhost:5000 --logs-dir /tmp ironic-neutron-agent<br></div><div><br></div><div>The really dirty but useful way to test small changes would be to just push them into the container with 'docker cp' and restart the container. Note that this will not work for config changes as those files get clobbered at startup, but for hacking the actual python bits, it'll do.</div><div><br></div><div>Hope that's what you're looking for. If you drop by #opensatck-kolla during US daylight hours you might get more suggestions from Eduardo or one of the actual project devs. They probably have fancier methods.</div><div><br></div><div>Cheers,</div><div>Erik</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><br>Thanks for your help!</div><div><br></div><div>Michael</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 4, 2019 at 1:36 PM Erik McCormick <<a href="mailto:emccormick@cirrusseven.com" rel="noreferrer" target="_blank">emccormick@cirrusseven.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">On Sun, Feb 3, 2019, 9:17 PM Michael Still <<a href="mailto:mikal@stillhq.com" rel="noreferrer noreferrer" target="_blank">mikal@stillhq.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Heya,<div><br></div><div>I'm chasing a bug at the moment, and have been able to recreate it with a stock kolla-ansible install. The next step is to add more debugging to the OpenStack code to try and chase down what's happening.</div><div><br></div><div>Before I go off and do something wildly bonkers, does anyone have a nice way of overriding locally the container image that kolla is using for a given container?</div><div><br></div><div>The best I've come up with at the moment is something like:</div><div><br></div><div>- copy the contents of the container out to a directory on the host node</div><div>- delete the docker container</div><div>- create a new container which mimics the previous container (docker inspect and some muttering) and have that container mount the copied out stuff as a volume</div><div><br></div><div>I considered just snapshotting the image being used by the current container, but I want a faster edit cycle than edit, snapshot, start provides.</div><div><br></div><div>Thoughts?</div><div>Michael</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Easiest way would be to deploy from a local registry. You can pull everything from docker hub and just use kolla-build to build and push the ones you're working on.</div><div dir="auto"><br></div><div dir="auto">Then just delete the image from wherever it's running, run a deploy with --tags of the project you're messing with, and it'll deploy the new image, or increment the docker tag when you push it and run upgrade.</div><div dir="auto"><br></div><div dir="auto">If I'm missing something and oversimplifying, let me know :).</div><div dir="auto"><br></div><div dir="auto">-Erik</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote></div></div></div>
</blockquote></div>
</blockquote></div></div></div>
</div></div></div></div></div></div></div>