<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2018-07-06 2:55 GMT+08:00 melanie witt <span dir="ltr"><<a href="mailto:melwittt@gmail.com" target="_blank">melwittt@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">+openstack-dev@<br>
<br>
On Wed, 4 Jul 2018 14:50:26 +0000, Bogdan Katynski wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
But, I can not use nova command, endpoint nova have been redirected from https to http. Here:<a href="http://prntscr.com/k2e8s6" rel="noreferrer" target="_blank">http://prntscr.com/k2e8s6</a><wbr>  (command: nova –insecure service list)<br>
</blockquote>
First of all, it seems that the nova client is hitting /v2.1 instead of /v2.1/ URI and this seems to be triggering the redirect.<br>
<br>
Since openstack CLI works, I presume it must be using the correct URL and hence it’s not getting redirected.<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  And this is error log: Unable to establish connection tohttp://<a href="http://192.168.30.70:8774/v2.1/" rel="noreferrer" target="_blank">192.168.30.70:8774/v2<wbr>.1/</a>: ('Connection aborted.', BadStatusLine("''",))<br>
  <br>
</blockquote>
Looks to me that nova-api does a redirect to an absolute URL. I suspect SSL is terminated on the HAProxy and nova-api itself is configured without SSL so it redirects to an http URL.<br>
<br>
In my opinion, nova would be more load-balancer friendly if it used a relative URI in the redirect but that’s outside of the scope of this question and since I don’t know the context behind choosing the absolute URL, I could be wrong on that.<br>
</blockquote>
<br>
Thanks for mentioning this. We do have a bug open in python-novaclient around a similar issue [1]. I've added comments based on this thread and will consult with the API subteam to see if there's something we can do about this in nova-api.<br>
<br></blockquote><div><br></div><div>Emm...check with the RFC, it said the value of Location header is absolute URL <a href="https://tools.ietf.org/html/rfc2616.html#section-14.30">https://tools.ietf.org/html/rfc2616.html#section-14.30</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
-melanie<br>
<br>
[1] <a href="https://bugs.launchpad.net/python-novaclient/+bug/1776928" rel="noreferrer" target="_blank">https://bugs.launchpad.net/pyt<wbr>hon-novaclient/+bug/1776928</a><br>
<br>
<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" target="_blank">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" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
</blockquote></div><br></div></div>