测试如下:
测试一
root@node-1:/var/log/kolla/octavia# curl -X GET -H "X-Auth-Token: $Token" -H "Cookie: $Cookie" -H "Content-Type: application/json" http://192.168.27.253:9999/api/openstack/regionone/octavia/v2/lbaas/loadbalancers
<html>
<head>
<title>404 Not Found</title>
</head>
<body>
<h1>404 Not Found</h1>
The resource could not be found.<br /><br />
通过skyline访问octa via失败,详情见https: //bugs. launchpad. net/skyline- console/ +bug/2047624
测试如下: 1:/var/ log/kolla/ octavia# curl -X GET -H "X-Auth-Token: $Token" -H "Cookie: $Cookie" -H "Content-Type: application/json" http:// 192.168. 27.253: 9999/api/ openstack/ regionone/ octavia/ v2/lbaas/ loadbalancers
测试一
root@node-
<html>
<head>
<title>404 Not Found</title>
</head>
<body>
<h1>404 Not Found</h1>
The resource could not be found.<br /><br />
</body>
测试二 1:/var/ log/kolla/ skyline# curl -X GET -H "X-Auth-Token: $Token" -H "Cookie: $Cookie" -H "Content-Type: application/json" http:// 192.168. 27.253: 9999/api/ openstack/ regionone/ octavia/ 11T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.1", "status": "SUPPORTED", "updated": "2018-04- 20T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.2", "status": "SUPPORTED", "updated": "2018-07- 31T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.3", "status": "SUPPORTED", "updated": "2018-12- 18T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.4", "status": "SUPPORTED", "updated": "2018-12- 19T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.5", "status": "SUPPORTED", "updated": "2019-01- 21T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.6", "status": "SUPPORTED", "updated": "2019-01- 25T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.7", "status": "SUPPORTED", "updated": "2018-01- 25T12:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.8", "status": "SUPPORTED", "updated": "2019-02- 12T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.9", "status": "SUPPORTED", "updated": "2019-03- 04T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.10", "status": "SUPPORTED", "updated": "2019-03- 05T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.11", "status": "SUPPORTED", "updated": "2019-06- 24T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.12", "status": "SUPPORTED", "updated": "2019-09- 11T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.13", "status": "SUPPORTED", "updated": "2019-09- 13T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.14", "status": "SUPPORTED", "updated": "2019-11- 10T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.15", "status": "SUPPORTED", "updated": "2020-03- 10T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.16", "status": "SUPPORTED", "updated": "2020-03- 15T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.17", "status": "SUPPORTED", "updated": "2020-04- 29T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.18", "status": "SUPPORTED", "updated": "2020-04- 29T01:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.19", "status": "SUPPORTED", "updated": "2020-05- 12T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.20", "status": "SUPPORTED", "updated": "2020-08- 02T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.21", "status": "SUPPORTED", "updated": "2020-09- 03T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.22", "status": "SUPPORTED", "updated": "2020-09- 04T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}, {"id": "v2.23", "status": "CURRENT", "updated": "2020-09- 07T00:00: 00Z", "links": [{"href": "http:// 192.168. 27.253: 9999//v2", "rel": "self"}]}]}
root@node-
{"versions": [{"id": "v2.0", "status": "SUPPORTED", "updated": "2016-12-
测试三 1:/opt/ kolla-ansible/ ansible/ roles/skyline/ templates# curl -X GET -H "X-Auth-Token: $Token" -H "Cookie: $Cookie" -H "Content-Type: application/json" http:// 192.168. 27.253: 9999/api/ openstack/ regionone/ octaviav2
root@node-
"v2"
通过测试可知调用skyline -console地址http: //192.168. 27.253: 9999/api/ openstack/ regionone/ octavia/ 访问octavia- api时,skyline的ng inx会将http: //192.168. 27.253: 9999/api/ openstack/ regionone/ octavia重定向成http ://192. 168.27. 253:9876/ /v2,导致资源访问失败。
修复方案: //opendev. org/openstack/ kolla-ansible/ src/branch/ master/ ansible/ roles/skyline/ templates/ nginx.conf. j2第184行
将https:
location {{ skyline_ nginx_prefix }}/{{ openstack_ region_ name | lower }}/octavia {
改为:
location {{ skyline_ nginx_prefix }}/{{ openstack_ region_ name | lower }}/octavia/ {