环境:在单节点上一个模块一个模块的搭建出openstack-M版;
Centos7.2 + rdo.repo;
问题现象:
[root@lijiejun ~(keystone_admin)]# openstack compute service list
Unknown Error (HTTP 503) (Request-ID: req-626a283b-b4cf-49de-87ca-d4ffa8693ef2)调试方法一:
查看“# vim /var/log/nova/nova-api.log”
“”“[root@lijiejun ~]# openstack compute service list --debug
START with options: ['compute', 'service', 'list', '--debug']
options: Namespace(access_token_endpoint='', auth_type='', auth_url='http://192.168.215.103:35357/v3', cacert='', client_id='', client_secret='***', cloud='', debug=True, default_domain='default', deferred_help=False, domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='', log_file=None, os_compute_api_version='', os_data_processing_api_version='1.1', os_data_processing_url='', os_identity_api_version='3', os_image_api_version='2', os_network_api_version='', os_object_api_version='', os_orchestration_api_version='1', os_project_id=None, os_project_name=None, os_volume_api_version='', password='***', project_domain_id='', project_domain_name='default', project_id='', project_name='admin', protocol='', region_name='', scope='', service_provider_endpoint='', timing=False, token='***', trust_id='', url='http://192.168.215.103:5000/v3', user_domain_id='', user_domain_name='default', user_id='', username='admin', verbose_level=3, verify=None)
defaults: {u'auth_type': 'password', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'api_timeout': None, u'baremetal_api_version': u'1', u'image_api_version': u'2', 'cacert': None, u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', u'interface': None, u'network_api_version': u'2', u'image_format': u'qcow2', u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'verify': True, u'identity_api_version': u'2.0', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'dns_api_version': u'2', u'object_store_api_version': u'1', u'disable_vendor_agent': {}}
cloud cfg: {'auth_type': 'password', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'data_processing_api_version': '1.1', u'network_api_version': u'2', u'image_format': u'qcow2', u'image_api_version': '2', 'verify': True, u'dns_api_version': u'2', u'object_store_api_version': u'1', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'username': 'admin', 'project_name': 'admin', 'user_domain_name': 'default', 'auth_url': 'http://192.168.215.103:35357/v3', 'password': '***', 'project_domain_name': 'default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': '1', 'timing': False, 'cacert': None, u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'url': 'http://192.168.215.103:5000/v3', u'identity_api_version': '3', u'volume_api_version': u'2', 'deferred_help': False, 'cert': None, u'secgroup_source': u'neutron', 'debug': True, u'interface': None, u'disable_vendor_agent': {}}
compute API version 2, cmd group openstack.compute.v2
network API version 2, cmd group openstack.network.v2
image API version 2, cmd group openstack.image.v2
volume API version 2, cmd group openstack.volume.v2
identity API version 3, cmd group openstack.identity.v3
object_store API version 1, cmd group openstack.object_store.v1
orchestration API version 1, cmd group openstack.orchestration.v1
data_processing API version 1.1, cmd group openstack.data_processing.v1
command: compute service list -> openstackclient.compute.v2.service.ListService
Auth plugin password selected
auth_type: password
Using auth plugin: password
Using parameters {'username': 'admin', 'project_name': 'admin', 'auth_url': 'http://192.168.215.103:35357/v3', 'user_domain_name': 'default', 'password': '***', 'project_domain_name': 'default'}
Get auth_ref
REQ: curl -g -i -X GET http://192.168.215.103:35357/v3 -H "Accept: application/json" -H "User-Agent: python-openstackclient keystoneauth1/2.4.1 python-requests/2.10.0 CPython/2.7.5"
Starting new HTTP connection (1): 192.168.215.103
"GET /v3 HTTP/1.1" 200 255
RESP: [200] Date: Mon, 22 Aug 2016 09:30:28 GMT Server: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 Vary: X-Auth-Token x-openstack-request-id: req-ad02b0c2-386b-4aac-9392-ce0b2b746024 Content-Length: 255 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json
RESP BODY: {"version": {"status": "stable", "updated": "2016-04-04T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.6", "links": [{"href": "http://192.168.215.103:35357/v3/", "rel": "self"}]}}
Making authentication request to http://192.168.215.103:35357/v3/auth/tokens
"POST /v3/auth/tokens HTTP/1.1" 201 1781
run(Namespace(columns=[], formatter='table', host=None, max_width=0, noindent=False, quote_mode='nonnumeric', service=None))
Instantiating compute client for VAPI Version Major: 2, Minor: 0
Making authentication request to http://192.168.215.103:35357/v3/auth/tokens
"POST /v3/auth/tokens HTTP/1.1" 201 1781
REQ: curl -g -i -X GET http://192.168.215.103:8774/v2.1/3dd37dde2d3549a7856ab377326178a4/os-services -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}4c27391610a1b6e96d431c3a2daf7aade68f845e"
Starting new HTTP connection (1): 192.168.215.103
"GET /v2.1/3dd37dde2d3549a7856ab377326178a4/os-services HTTP/1.1" 503 100
RESP: [503] Content-Length: 100 Content-Type: text/plain; charset=UTF-8 X-Compute-Request-Id: req-05472f8e-d26e-40c5-8564-924cd2d65e75 Date: Mon, 22 Aug 2016 09:30:29 GMT Connection: keep-alive
RESP BODY: 503 Service Unavailable
The server is currently unavailable. Please try again at a later time.
Unknown Error (HTTP 503) (Request-ID: req-05472f8e-d26e-40c5-8564-924cd2d65e75)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/cliff/app.py", line 346, in run_subcommand
result = cmd.run(parsed_args)
File "/usr/lib/python2.7/site-packages/openstackclient/common/command.py", line 38, in run
return super(Command, self).run(parsed_args)
File "/usr/lib/python2.7/site-packages/cliff/display.py", line 79, in run
column_names, data = self.take_action(parsed_args)
File "/usr/lib/python2.7/site-packages/openstackclient/compute/v2/service.py", line 66, in take_action
parsed_args.service)
File "/usr/lib/python2.7/site-packages/novaclient/v2/services.py", line 52, in list
return self._list(url, "services")
File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 242, in _list
resp, body = self.api.client.get(url)
File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 173, in get
return self.request(url, 'GET', **kwargs)
File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 94, in request
raise exceptions.from_response(resp, body, url, method)
ClientException: Unknown Error (HTTP 503) (Request-ID: req-05472f8e-d26e-40c5-8564-924cd2d65e75)
clean_up ListService: Unknown Error (HTTP 503) (Request-ID: req-05472f8e-d26e-40c5-8564-924cd2d65e75)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 118, in run
ret_val = super(OpenStackShell, self).run(argv)
File "/usr/lib/python2.7/site-packages/cliff/app.py", line 226, in run
result = self.run_subcommand(remainder)
File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 153, in run_subcommand
ret_value = super(OpenStackShell, self).run_subcommand(argv)
File "/usr/lib/python2.7/site-packages/cliff/app.py", line 346, in run_subcommand
result = cmd.run(parsed_args)
File "/usr/lib/python2.7/site-packages/openstackclient/common/command.py", line 38, in run
return super(Command, self).run(parsed_args)
File "/usr/lib/python2.7/site-packages/cliff/display.py", line 79, in run
column_names, data = self.take_action(parsed_args)
File "/usr/lib/python2.7/site-packages/openstackclient/compute/v2/service.py", line 66, in take_action
parsed_args.service)
File "/usr/lib/python2.7/site-packages/novaclient/v2/services.py", line 52, in list
return self._list(url, "services")
File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 242, in _list
resp, body = self.api.client.get(url)
File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 173, in get
return self.request(url, 'GET', **kwargs)
File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 94, in request
raise exceptions.from_response(resp, body, url, method)
ClientException: Unknown Error (HTTP 503) (Request-ID: req-05472f8e-d26e-40c5-8564-924cd2d65e75)
END return value: 1
根本原因:当你执行"openstack user create --domain default --password-prompt nova"会提示你输入nova用户的密码,