<p dir="ltr">Hi Steve,<br>
I'v tried stopping all container then modify VIP then do "kolla-ansible deploy" again. It works as expected and i saw that the endpoint in keystone database also changed ...magically.</p>
<div class="gmail_quote">2016年6月5日 下午3:04,"Steven Dake (stdake)" <<a href="mailto:stdake@cisco.com">stdake@cisco.com</a>>写道:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>Hu,</div>
<div><br>
</div>
<div>Thinking more about my proposed workarounds, I don’t think they will work because services are registered with keystone using the kolla external fqdn and internal fqdn. If you didn't specify those originally (and instead are using IP addresses which fqdn
defaults to if not specified) kolla won't change endpoint registrations magically.</div>
<div><br>
</div>
<div>A solution for changing VIPs must involve some kind of keystone reregistration.</div>
<div><br>
</div>
<div>For each config value in globals.yml, this kind of individual analysis must be carried out and implemented throughout the playbooks. As you can see by this single case, the implementation requires lots of experimentation on each variable to permit changes.
I'm not certain in what development cycle that work will begin or end. It definitely wont be backported as its a feature.</div>
<div><br>
</div>
<div>Regards</div>
<div>-steve</div>
<div><br>
</div>
<div><br>
</div>
<span>
<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>Steven Dake <<a href="mailto:stdake@cisco.com" target="_blank">stdake@cisco.com</a>><div class="quoted-text"><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" target="_blank">openstack-dev@lists.openstack.org</a>><br>
</div><span style="font-weight:bold">Date: </span>Saturday, June 4, 2016 at 1:01 AM<div class="quoted-text"><br>
<span style="font-weight:bold">To: </span>"OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>
</div><span style="font-weight:bold">Subject: </span>Re: [openstack-dev] 答复: [probably forge email可能是仿冒邮件]Re: [Kolla] About kolla-ansible reconfigure<br>
</div><div class="elided-text">
<div><br>
</div>
<blockquote style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5">
<div>
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>Hu,</div>
<div><br>
</div>
<div>Comments inline.</div>
<div><br>
</div>
<span>
<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:hu.zhijiang@zte.com.cn" target="_blank">hu.zhijiang@zte.com.cn</a>" <<a href="mailto:hu.zhijiang@zte.com.cn" target="_blank">hu.zhijiang@zte.com.cn</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" target="_blank">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Date: </span>Saturday, June 4, 2016 at 12:11 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" target="_blank">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>[openstack-dev] 答复: [probably forge email可能是仿冒邮件]Re: [Kolla] About kolla-ansible reconfigure<br>
</div>
<div><br>
</div>
<blockquote style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5">
<div>
<div><font size="2" face="sans-serif">Hi Steven,</font> <br>
<br>
<font size="2" face="sans-serif"><br>
Thanks for the information. Some further questions:</font> <br>
<br>
<font size="2" face="Calibri">> Reconfigure was not designed to handle changes to globals.yml. I think its a good goal that it should be able to do so, but it does not today.</font><br>
<br>
<font size="2" face="sans-serif">So waht is the prefered method to change kolla_internal_vip_address and make it
</font><font size="2">effective?</font> <br>
</div>
</div>
</blockquote>
</span>
<div><br>
</div>
<div>I can't think of any known way to do this. Internal VIPs are typically permanent allocations. Reconfigure iIRC does not copy configuration files if there are no changes to the relevant /etc/kolla/config/* file (such as nova.conf). Since you can't get
new config files generated on your deployed targets, the containers won't pick them up. If they did pick them up, they wouldn't actually restart because they are designed to only restart on a reconfigure operation that reconfigures something (I.e. there is
new config content).</div>
<div><br>
</div>
<div>One option that comes to mind is to login to every host in your cluster, sed replace the original internal VIP address in every file in /etc/kolla/* with the new one, then docker stop every container on every node, then docker start every container on
every node. I know, not optimal and only works with COPY_ALWAYS. This could be automated in an ansible playbook with relative ease.</div>
<div><br>
</div>
<div>Another way that may work (less confidence here) is to stop every container on every node, and run kolla-ansible deploy. There is no stop operation in kolla-ansible – but you can look at the cleanup code here to craft your own:</div>
<div><br>
</div>
<div><a href="https://github.com/openstack/kolla/blob/master/ansible/cleanup.yml" target="_blank">https://github.com/openstack/kolla/blob/master/ansible/cleanup.yml</a></div>
<div><a href="https://github.com/openstack/kolla/blob/master/tools/kolla-ansible#L45" target="_blank">https://github.com/openstack/kolla/blob/master/tools/kolla-ansible#L45</a></div>
<div><a href="https://github.com/openstack/kolla/blob/master/ansible/roles/cleanup/tasks/main.yml#L1-L4" target="_blank">https://github.com/openstack/kolla/blob/master/ansible/roles/cleanup/tasks/main.yml#L1-L4</a></div>
<div><br>
</div>
<div>Make certain to leave out line 6 – as that removes named volumes (you would lose your persistent data). You only need lines 1-4 (of main.yml).</div>
<div><br>
</div>
<div>Please file a bug.</div>
<div><br>
</div>
<div>Maybe someone else has a more elegant solution.</div>
<div><br>
</div>
<span>
<blockquote style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5">
<div>
<div><br>
<font size="2" face="Calibri">> Reconfigure was designed to handle changes to /etc/kolla/config/* (where custom config for services live). Reconfigure in its current incarnation in all our branches and master is really a misnomer – it should be service-reconfgiure
– but that is wordy and we plan to make globals.yml reconfigurable if feasible – but probably not anytime soon.</font><br>
<br>
<font size="2" face="sans-serif">There is no </font><font size="2" face="Calibri">/etc/kolla/config/*</font><font size="2" face="sans-serif"> located in my env before or after successful deployment. Is that right?
</font><br>
</div>
</div>
</blockquote>
</span>
<div><br>
</div>
<div>That is right. To provide custom configuration for nova for example, you could add a /etc/kolla/config/nova.conf file and put:</div>
<div><br>
</div>
<div>[libvirt]</div>
<div>virt_typer=qemu</div>
<div><br>
</div>
<div>(documented here: <a href="http://docs.openstack.org/developer/kolla/deployment-philosophy.html" target="_blank">http://docs.openstack.org/developer/kolla/deployment-philosophy.html</a>)</div>
<div><br>
</div>
<div>Run reconfigure and from that point forward all of your machines would use QEMU software emulation instead of KVM hardware virt. The use case the reconfigure action was designed to handle was reconfiguring /etc/kolla/config files, (e.g. Merging custom
config with defaults while overriding when that is called for).</div>
<div><br>
</div>
<div>Handling a reconfiguration of globals.yml and passwords.yml is much more complex. I'd like to see us get reconfigure for passwords working next for password rotation required by various government regulations.</div>
<div><br>
</div>
<div>There are a lot of problems that come to mind with reconfiguring globals.yml. I'm not quite sure how it could sanely be implemented without a full cluster shutdown followed by a full cluster start. This would require adding a stop operation. Deploy
already starts containers for us.</div>
<div><br>
</div>
<div>Regards</div>
<div>-steve</div>
<div><br>
</div>
<span>
<blockquote style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5">
<div>
<div><br>
<br>
<br>
<br>
<br>
<font size="1" color="#5f5f5f" face="sans-serif">发件人: </font><font size="1" face="sans-serif">"Steven Dake (stdake)" <<a href="mailto:stdake@cisco.com" target="_blank">stdake@cisco.com</a>></font><br>
<font size="1" color="#5f5f5f" face="sans-serif">收件人: </font><font size="1" face="sans-serif">"<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>" <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>>,
</font><br>
<font size="1" color="#5f5f5f" face="sans-serif">日期: </font><font size="1" face="sans-serif">2016-06-03 06:16</font><br>
<font size="1" color="#5f5f5f" face="sans-serif">主题: </font><font size="1" face="sans-serif">[probably forge email可能是仿冒邮件]Re: [openstack-dev] [Kolla] About kolla-ansible reconfigure</font><br>
<hr noshade>
<br>
<br>
<br>
<font size="2" face="Calibri">Hu,</font> <br>
<br>
<font size="2" face="Calibri">Reconfigure was not designed to handle changes to globals.yml. I think its a good goal that it should be able to do so, but it does not today.</font><br>
<br>
<font size="2" face="Calibri">Reconfigure was designed to handle changes to /etc/kolla/config/* (where custom config for services live). Reconfigure in its current incarnation in all our branches and master is really a misnomer – it should be service-reconfgiure
– but that is wordy and we plan to make globals.yml reconfigurable if feasible – but probably not anytime soon.</font><br>
<br>
<font size="2" face="Calibri">Regards</font> <br>
<font size="2" face="Calibri">-steve</font> <br>
<br>
<br>
<font size="2" face="Calibri"><b>From: </b>"</font><a href="mailto:hu.zhijiang@zte.com.cn" target="_blank"><font size="2" color="blue" face="Calibri"><u>hu.zhijiang@zte.com.cn</u></font></a><font size="2" face="Calibri">" <</font><a href="mailto:hu.zhijiang@zte.com.cn" target="_blank"><font size="2" color="blue" face="Calibri"><u>hu.zhijiang@zte.com.cn</u></font></a><font size="2" face="Calibri">><b><br>
Reply-To: </b>"</font><a href="mailto:openstack-dev@lists.openstack.org" target="_blank"><font size="2" color="blue" face="Calibri"><u>openstack-dev@lists.openstack.org</u></font></a><font size="2" face="Calibri">" <</font><a href="mailto:openstack-dev@lists.openstack.org" target="_blank"><font size="2" color="blue" face="Calibri"><u>openstack-dev@lists.openstack.org</u></font></a><font size="2" face="Calibri">><b><br>
Date: </b>Wednesday, June 1, 2016 at 6:24 PM<b><br>
To: </b>"</font><a href="mailto:openstack-dev@lists.openstack.org" target="_blank"><font size="2" color="blue" face="Calibri"><u>openstack-dev@lists.openstack.org</u></font></a><font size="2" face="Calibri">" <</font><a href="mailto:openstack-dev@lists.openstack.org" target="_blank"><font size="2" color="blue" face="Calibri"><u>openstack-dev@lists.openstack.org</u></font></a><font size="2" face="Calibri">><b><br>
Subject: </b>[openstack-dev] [Kolla] About kolla-ansible reconfigure</font> <br>
<br>
<font size="2" face="sans-serif">Hi </font><font size="2" face="Calibri"><br>
</font><font size="2" face="sans-serif"><br>
After modifying the kolla_internal_vip_address in /etc/kolla/global.yml , I use kolla-ansible reconfigure to reconfigure OpenStack. But I got the following error.<br>
<br>
TASK: [mariadb | Restart containers] ******************************************<br>
skipping: [localhost] => (item=[{'group': 'mariadb', 'name': 'mariadb'}, {'KOLLA_BASE_DISTRO': 'centos', 'PS1': '$(tput bold)($(printenv KOLLA_SERVICE_NAME))$(tput sgr0)[$(id -un)@$(hostname -s) $(pwd)]$ ', 'KOLLA_INSTALL_TYPE': 'binary', 'changed': False,
'item': {'group': 'mariadb', 'name': 'mariadb'}, 'KOLLA_CONFIG_STRATEGY': 'COPY_ALWAYS', 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'invocation': {'module_name': u'kolla_docker', 'module_complex_args': {'action': 'get_container_env',
'name': u'mariadb'}, 'module_args': ''}, 'KOLLA_SERVICE_NAME': 'mariadb', 'KOLLA_INSTALL_METATYPE': 'rdo'}, {'cmd': ['docker', 'exec', 'mariadb', '/usr/local/bin/kolla_set_configs', '--check'], 'end': '2016-06-02 11:32:18.866276', 'stderr': 'INFO:__main__:Loading
config file at /var/lib/kolla/config_files/config.json\nINFO:__main__:Validating config file\nINFO:__main__:The config files are in the expected state', 'stdout': u'', 'item': {'group': 'mariadb', 'name': 'mariadb'}, 'changed': False, 'rc': 0, 'failed': False,
'warnings': [], 'delta': '0:00:00.075316', 'invocation': {'module_name': u'command', 'module_complex_args': {}, 'module_args': u'docker exec mariadb /usr/local/bin/kolla_set_configs --check'}, 'stdout_lines': [], 'failed_when_result': False, 'start': '2016-06-02
11:32:18.790960'}])</font><font size="2" face="Calibri"> <br>
</font><font size="2" face="sans-serif"><br>
TASK: [mariadb | Waiting for MariaDB service to be ready through VIP] *********<br>
failed: [localhost] => {"attempts": 6, "changed": false, "cmd": ["docker", "exec", "mariadb", "mysql", "-h", "<a href="http://10.43.114.148/24" target="_blank">10.43.114.148/24</a>", "-u", "haproxy", "-e", "show databases;"], "delta": "0:00:03.924516", "end": "2016-06-02 11:33:57.928139", "failed": true, "rc":
1, "start": "2016-06-02 11:33:54.003623", "stdout_lines": [], "warnings": []}<br>
stderr: ERROR 2005 (HY000): Unknown MySQL server host '<a href="http://10.43.114.148/24" target="_blank">10.43.114.148/24</a>' (-2)<br>
msg: Task failed as maximum retries was encountered</font><font size="2" face="Calibri"><br>
</font><font size="2" face="sans-serif"><br>
FATAL: all hosts have already failed -- aborting</font><font size="2" face="Calibri"><br>
<br>
</font><font size="2" face="sans-serif"><br>
It seems that mariadb was not restart as expected.</font><font size="2" face="Calibri"><br>
</font><br>
<font size="2" color="blue" face="Calibri"><br>
--------------------------------------------------------<br>
ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an intended recipient, any disclosure,
reproduction, distribution or other dissemination or use of the information contained is strictly prohibited. If you have received this mail in error, please delete it and notify us immediately.<br>
<br>
</font><br>
<tt><font size="2">__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org" target="_blank">OpenStack-dev-request@lists.openstack.org</a>?subject:unsubscribe<br>
</font></tt><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank"><tt><font size="2">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</font></tt></a><tt><font size="2"><br>
</font></tt><br>
<br>
<pre><font color="blue">
--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited. If you have received this mail in error, please delete it and notify us immediately.
</font></pre>
<br>
</div>
</div>
</blockquote>
</span></div>
</div>
</blockquote>
</div></span>
</div>
<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></blockquote></div>