<div>For what its worth, this init-runonce script was never meant for production usage. Ops *shouldn't* be running it like you suggest. It was historically for use in the gate and a quick-n-dirty environment setup for testing.<br></div><div><br></div><div>If you want to get into writing operations scripts, thats your prerogative, but it was discussed before and mostly considered a bad idea.<br></div><div><br></div><div>Thanks,<br></div><div>SamYaple<br></div><div class="protonmail_signature_block protonmail_signature_block-empty"><div class="protonmail_signature_block-user protonmail_signature_block-empty"><br></div><div class="protonmail_signature_block-proton protonmail_signature_block-empty"><br></div></div><div><br></div><blockquote type="cite" class="protonmail_quote"><div>-------- Original Message --------<br></div><div>Subject: Re: [openstack-dev] [kolla] Ansiblize init-runonce script<br></div><div>Local Time: November 28, 2017 8:10 AM<br></div><div>UTC Time: November 28, 2017 1:10 PM<br></div><div>From: zhang.lei.fly@gmail.com<br></div><div>To: OpenStack Development Mailing List (not for usage questions) <openstack-dev@lists.openstack.org><br></div><div><br></div><div dir="ltr"><span style="font-family:monospace, monospace" class="font"><div>in my opinion, <br></div><div class="gmail_default" style="font-size:small;display:inline"><br></div><div class="gmail_default" style="display:inline"><br></div><div>idempotent scrip<br></div><div class="gmail_default" style="font-size:small;display:inline">t is very necessary.<br></div></span><div><div class="gmail_default" style="font-size:small;display:inline"><span style="font-family:monospace, monospace" class="font">for several reason</span><br></div></div><div><div class="gmail_default" style="font-size:small;display:inline"><span style="font-family:monospace, monospace" class="font"></span><br></div></div><div><div class="gmail_default" style="font-size:small;display:inline"><span style="font-family:monospace, monospace" class="font">- there is already some idempotent logical in the script</span><br></div></div><div><div class="gmail_default" style="font-size:small;display:inline"><span style="font-family:monospace, monospace" class="font">- it is common that this script failed by wrong configuration, </span><br></div></div><div><span style="font-family:monospace, monospace" class="font"><div class="gmail_default" style="font-size:small;display:inline">  after fix the config,<br></div><div>ops will want to run this script again.<br></div></span></div></div><div class="gmail_extra"><div><br></div><div class="gmail_quote"><div>On Tue, Nov 28, 2017 at 7:14 PM, Paul Bourke <span dir="ltr"><<a href="mailto:paul.bourke@oracle.com">paul.bourke@oracle.com</a>></span> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I think this came up before at one stage. My position is I don't see the need to ansible-ise small shell scripts. init-runonce is currently just an easy to understand sequence of openstack commands provided to help people test/demo their setups. Unless we want to make it more than that, i.e. make it idempotent, customizable, etc. I don't see the need to wheel in Ansible.<span class=""><br> <br> On 28/11/17 03:23, Jeffrey Zhang wrote:<br> </span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><span class="">hi<br> <br> check this [0]. I tried to convert it  to ansible playbooks.<br> <br> [0] <a href="https://review.openstack.org/523072" rel="noreferrer">https://review.openstack.org/5<wbr>23072</a><br> <br></span><span class=""> On Tue, Nov 28, 2017 at 2:57 AM, Ravi Shekhar Jethani <<a href="mailto:rsjethani@gmail.com">rsjethani@gmail.com</a> <mailto:<a href="mailto:rsjethani@gmail.com">rsjethani@gmail.com</a>>> wrote:<br> <br>     Hi,<br> <br>     While exploring kolla-ansible I ran into a few issues with<br>     init-runonce script. This lead to following bugs and patches:<br> <br></span>     <a href="https://launchpad.net/bugs/1732963" rel="noreferrer">https://launchpad.net/bugs/173<wbr>2963</a> <<a href="https://launchpad.net/bugs/1732963" rel="noreferrer">https://launchpad.net/bugs/17<wbr>32963</a>></div><div>     <a href="https://review.openstack.org/522221" rel="noreferrer">https://review.openstack.org/5<wbr>22221</a><br></div><div>     <<a href="https://review.openstack.org/522221" rel="noreferrer">https://review.openstack.org/<wbr>522221</a>><br></div><div>     <a href="https://review.openstack.org/521190" rel="noreferrer">https://review.openstack.org/5<wbr>21190</a><span class=""><br>     <<a href="https://review.openstack.org/521190" rel="noreferrer">https://review.openstack.org/<wbr>521190</a>><br> <br>     But it was highlighted that instead of fixing/changing the<br>     script, 'ansibilzing' it would be the ideal solution.<br>     Hence I hereby formally propose the same.<br> <br>     My thoughts:<br>     * Playbook Name: init-stack.yml<br> <br>     * Playbook path can be:<br>     kolla-ansible/ansible/init-sta<wbr>ck.yml<br> <br>     * The play can be executed like:<br>     $ kolla-ansible init-stack -i <inventory_file><br> <br>     * The cirros test image should be downloaded in /tmp<br> <br>     * What should be the behavior if the play is run multiple times<br>     against the same stack?<br>        - some error message OR<br>        - simply ignore the action<br> <br>     Kindly provide suggestions.<br> <br>     --<br>     Best Regards,<br>     Ravi J.<br> <br>     ______________________________<wbr>______________________________<wbr>______________<br>     OpenStack Development Mailing List (not for usage questions)<br>     Unsubscribe:<br>     <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer">OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br></span>     <<a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer">http://OpenStack-dev-request@<wbr>lists.openstack.org?subject:un<wbr>subscribe</a>></div><div>     <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><span class=""><br>     <<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer">http://lists.openstack.org/cg<wbr>i-bin/mailman/listinfo/opensta<wbr>ck-dev</a>><br> <br> <br> <br> <br> -- <br> Regards,<br> Jeffrey Zhang<br></span> Blog: <a href="http://xcodest.me" rel="noreferrer">http://xcodest.me</a> <<a href="http://xcodest.me/" rel="noreferrer">http://xcodest.me/</a>><span class=""><br> <br> <br> ______________________________<wbr>______________________________<wbr>______________<br> OpenStack Development Mailing List (not for usage questions)<br> Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer">OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br> </span></div></blockquote><div class="HOEnZb"><div class="h5"><div><br></div><div>______________________________<wbr>______________________________<wbr>______________<br></div><div> OpenStack Development Mailing List (not for usage questions)<br></div><div> Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer">OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br></div><div> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br></div></div></div></blockquote></div><div><br></div><div><br></div><div><br></div><div>-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-size:13px" class="size"><span style="font-family:monospace, monospace" class="font">Regards,</span></span><br></div><div><span style="font-size:13px" class="size"><span style="font-family:monospace, monospace" class="font">Jeffrey Zhang</span></span><br></div><div><span style="font-family:monospace, monospace" class="font"><span style="font-size:12.8px" class="size">Blog: </span></span><a href="http://xcodest.me/" style="font-family:monospace,monospace;font-size:12.8px">http://xcodest.me</a><span style="font-family:monospace, monospace" class="font"></span><br></div></div></div></div></div></div></div></div></div></div></blockquote><div><br></div>