Ask Your Question
0

Unable to create the flavor using the CLI on openstack controller getting an http 503 error

asked 2019-03-05 07:47:03 -0500

opensourceengineer gravatar image

updated 2019-03-05 07:49:41 -0500

I tried with ---debug and this is what I got:

Starting new HTTP connection (1): xx.xx.xx.109 http://172.25.1.109:8774 "POST /v2.1/flavors HTTP/1.1" 503 170 RESP: [503] Connection: keep-alive Content-Length: 170 Content-Type: application/json Date: Tue, 05 Mar 2019 13:41:25 GMT X-Compute-Request-Id: req-1d398f4a-703e-4261-b024-4a7b835cf05a X-Openstack-Request-Id: req-1d398f4a-703e-4261-b024-4a7b835cf05a RESP BODY: {"message": "The server is currently unavailable. Please try again at a later time.

\n\n\n", "code": "503 Service Unavailable", "title": "Service Unavailable"} POST call to compute for http://xx.xx.xx.109:8774/v2.1/flavors used request id req-1d398f4a-703e-4261-b024-4a7b835cf05a The server is currently unavailable. Please try again at a later time.

(HTTP 503) (Request-ID: req-1d398f4a-703e-4261-b024-4a7b835cf05a) Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand result = cmd.run(parsed_args) File "/usr/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run return super(Command, self).run(parsed_args) File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 116, in run column_names, data = self.take_action(parsed_args) File "/usr/lib/python2.7/dist-packages/openstackclient/compute/v2/flavor.py", line 173, in take_action flavor = compute_client.flavors.create(args) File "/usr/lib/python2.7/dist-packages/novaclient/v2/flavors.py", line 246, in create return self._create("/flavors", body, "flavor") File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 366, in _create resp, body = self.api.client.post(url, body=body) File "/usr/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 334, in post return self.request(url, 'POST', *kwargs) File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 83, in request raise exceptions.from_response(resp, body, url, method) ClientException: The server is currently unavailable. Please try again at a later time.

From my compute node , i checked the nova-api log and we could see the below error :

2019-03-05 08:44:26.184 6246 INFO nova.osapi_compute.wsgi.server [-] 172.25.1.109 "GET /v2.1/resource_providers?in_tree=aed33da6-02e6-4a41-9115-dee91bb042c2 HTTP/1.1" status: 503 len: 450 time: 3.5525379 2019-03-05 08:45:27.165 6246 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Unable to establish connection to http://127.0.0.1:5000/v3/auth/tokens: HTTPConnectionPool(host='127.0.0.1', port=5000): Max retries exceeded with url: /v3/auth/tokens (Caused by NewConnectionError('<urllib3.connection.httpconnection 0x7f4dcb2d3dd0="" at="" object="">: Failed to establish a new connection: [Errno 111] ECONNREFUSED',)): ConnectFailure: Unable to establish connection to http://127.0.0.1:5000/v3/auth/tokens: HTTPConnectionPool(host='127.0.0.1', port=5000): Max retries exceeded with url: /v3/auth/tokens (Caused by NewConnectionError('<urllib3.connection.httpconnection 0x7f4dcb2d3dd0="" at="" object="">: Failed to establish a new connection: [Errno 111] ECONNREFUSED',)) 2019-03-05 08:45:27.177 6246 INFO nova.osapi_compute.wsgi.server [-] 172.25.1.109 "GET /v2.1/resource_providers?in_tree=aed33da6-02e6-4a41-9115-dee91bb042c2 HTTP/1.1" status: 503 len: 450 time: 3.5313060</urllib3.connection.httpconnection></urllib3.connection.httpconnection>

edit retag flag offensive close merge delete

Comments

xx.xx.xx.107 is my controller node and xx.xx.xx.109 is my compute node.

opensourceengineer gravatar imageopensourceengineer ( 2019-03-05 07:48:13 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2019-03-05 18:13:48 -0500

The CLI client tries to access http://172.25.1.109:8774. This is your compute node, and since nova-api is normally not running on compute nodes, the request is bound to fail.

I guess that the address is not correctly configured in the catalog. What does openstack endpoint list tell you about Nova?

edit flag offensive delete link more

Comments

root@controller-node:~# openstack endpoint list --service=nova +----------------------------------+-----------+--------------+--------------+---------+-----------+----------------------------+ | ID | Region | Service Name | Service Type | Enabled | Interface | URL

opensourceengineer gravatar imageopensourceengineer ( 2019-03-11 08:27:06 -0500 )edit
0

answered 2019-03-11 08:26:54 -0500

opensourceengineer gravatar image

root@controller-node:~# openstack endpoint list --service=nova +----------------------------------+-----------+--------------+--------------+---------+-----------+----------------------------+ | ID | Region | Service Name | Service Type | Enabled | Interface | URL | +----------------------------------+-----------+--------------+--------------+---------+-----------+----------------------------+ | 7245febc60c44898a2b256652ad97607 | RegionOne | nova | compute | True | public | http://127.0.0.1:8774/v2.1 | | 814939da3d5d4224b193255f4fc5ec2c | RegionOne | nova | compute | True | internal | http://127.0.0.1:8774/v2.1 | | 8be146c6c3954fe18e060c360852d2e2 | RegionOne | nova | compute | True | admin | http://127.0.0.1:8774/v2.1 | +----------------------------------+-----------+--------------+--------------+---------+-----------+----------------------------+

edit flag offensive delete link more

Comments

Your endpoint list uses 127.0.0.1, which is neither 172.25.1.109 nor 172.25.1.107. I suggest you correct that. You should use ...107 (controller) for all endpoints.

It's not clear to me why your client tries to reach ...109.

Bernd Bausch gravatar imageBernd Bausch ( 2019-03-11 10:06:29 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-03-05 07:47:03 -0500

Seen: 74 times

Last updated: Mar 11