pkw1155402 发表于 2016-3-25 14:39 楼主这个有问题啊 这是Juno版的: [neutron] ... url = http://controller:9696 auth_strategy = keystone admin_auth_url = http://controller:35357/v2.0 admin_tenant_name = service admin_username = neutron admin_password = NEUTRON_PASS 上面根据自己的实际情况,查看响应版本的 |
怎么解决的,我的Mitaka、版本也遇到了这个问题了。 |
已经解决,谢谢 |
[neutron] # # From nova.api # # Set flag to indicate Neutron will proxy metadata requests and resolve # instance ids. (boolean value) service_metadata_proxy=True # Shared secret to validate proxies Neutron metadata requests (string value) metadata_proxy_shared_secret = abc123!! # # From nova.network # # URL for connecting to neutron (string value) url=http://controller:9696 # User id for connecting to neutron in admin context. DEPRECATED: specify an # auth_plugin and appropriate credentials instead. (string value) # This option is deprecated for removal. # Its value may be silently ignored in the future. #admin_user_id=<None> # Username for connecting to neutron in admin context DEPRECATED: specify an # auth_plugin and appropriate credentials instead. (string value) # This option is deprecated for removal. # Its value may be silently ignored in the future. #admin_username=neutron # Password for connecting to neutron in admin context DEPRECATED: specify an # auth_plugin and appropriate credentials instead. (string value) # This option is deprecated for removal. # Its value may be silently ignored in the future. #admin_password=abc123!! # Tenant id for connecting to neutron in admin context DEPRECATED: specify an # auth_plugin and appropriate credentials instead. (string value) # This option is deprecated for removal. # Its value may be silently ignored in the future. #admin_tenant_id=<None> # Tenant name for connecting to neutron in admin context. This option will be # ignored if neutron_admin_tenant_id is set. Note that with Keystone V3 tenant # names are only unique within a domain. DEPRECATED: specify an auth_plugin and # appropriate credentials instead. (string value) # This option is deprecated for removal. # Its value may be silently ignored in the future. #admin_tenant_name=service # Region name for connecting to neutron in admin context (string value) #region_name=<None> # Authorization URL for connecting to neutron in admin context. DEPRECATED: # specify an auth_plugin and appropriate credentials instead. (string value) # This option is deprecated for removal. # Its value may be silently ignored in the future. #admin_auth_url=http://controller:5000/v2.0 # Authorization strategy for connecting to neutron in admin context. # DEPRECATED: specify an auth_plugin and appropriate credentials instead. If an # auth_plugin is specified strategy will be ignored. (string value) # This option is deprecated for removal. # Its value may be silently ignored in the future. #auth_strategy=keystone # Name of Integration Bridge used by Open vSwitch (string value) #ovs_bridge=br-int # Number of seconds before querying neutron for extensions (integer value) #extension_sync_interval=600 # # From nova.network.neutronv2 # # Authentication URL (string value) #auth_url=<None> auth_url=http://controller:35357 # Name of the plugin to load (string value) #auth_plugin=<None> auth_plugin=password # PEM encoded Certificate Authority to use when verifying HTTPs connections. # (string value) # Deprecated group;name - [neutron]/ca_certificates_file #cafile=<None> # PEM encoded client certificate cert file (string value) #certfile=<None> # Domain ID to scope to (string value) #domain_id=<None> # Domain name to scope to (string value) #domain_name=<None> # Verify HTTPS connections. (boolean value) # Deprecated group;name - [neutron]/api_insecure #insecure=false # PEM encoded client certificate key file (string value) #keyfile=<None> # User's password (string value) #password=<None> password=abc123!! # Domain ID containing project (string value) #project_domain_id=<None> project_domain_id=default # Domain name containing project (string value) #project_domain_name=<None> # Project ID to scope to (string value) #project_id=<None> # Project name to scope to (string value) #project_name=<None> project_name=RegionOne # Tenant ID to scope to (string value) #tenant_id=<None> # Tenant name to scope to (string value) #tenant_name=<None> # Timeout value for http requests (integer value) # Deprecated group;name - [neutron]/url_timeout #timeout=<None> # Trust ID (string value) #trust_id=<None> # User's domain id (string value) #user_domain_id=<None> user_domain_id=default # User's domain name (string value) #user_domain_name=<None> # User id (string value) #user_id=<None> # Username (string value) # Deprecated group;name - DEFAULT;username #username=<None> username=neutron |
/etc/nova/nova.conf这里面检查下[neutron]标签的配置,其它相关也检测下 |
下面是我在Web上点击启动云主机后,输入名称点击确定后输出的log日志: 2016-03-25 09:43:33.457 23258 INFO nova.osapi_compute.wsgi.server [req-7da237e8-4174-4fb6-bce5-72ef9da83c61 b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/extensions HTTP/1.1" status: 200 len: 21880 time: 0.2940869 2016-03-25 09:43:40.724 23258 INFO nova.osapi_compute.wsgi.server [req-2b86fee5-86e0-4ce2-9363-5284bfcd7858 b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/os-availability-zone HTTP/1.1" status: 200 len: 293 time: 0.0634470 2016-03-25 09:43:40.776 23258 INFO nova.osapi_compute.wsgi.server [req-a0e1c6ad-92ff-4f6a-8546-70f8077225c9 b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/flavors/detail HTTP/1.1" status: 200 len: 2267 time: 0.0457721 2016-03-25 09:43:41.428 23255 INFO nova.osapi_compute.wsgi.server [req-24f85cfc-8910-4e98-9d7d-a8f62ed2bde6 b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/os-keypairs HTTP/1.1" status: 200 len: 724 time: 0.1978891 2016-03-25 09:43:42.135 23258 INFO nova.osapi_compute.wsgi.server [req-6e05233b-f524-45ca-971f-873fc833b013 b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/extensions HTTP/1.1" status: 200 len: 21880 time: 0.1284668 2016-03-25 09:43:42.504 23257 INFO nova.osapi_compute.wsgi.server [req-53c58799-11a4-4355-b546-af6f160c0ded b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/limits HTTP/1.1" status: 200 len: 708 time: 0.2304540 2016-03-25 09:43:54.985 23257 INFO nova.osapi_compute.wsgi.server [req-5c517c5f-5fe5-454a-885b-167c757aae72 b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/os-availability-zone HTTP/1.1" status: 200 len: 293 time: 0.0618520 2016-03-25 09:43:55.043 23257 INFO nova.osapi_compute.wsgi.server [req-813d7892-84fb-4aea-a464-6818ef1ec4db b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/flavors/detail HTTP/1.1" status: 200 len: 2267 time: 0.0512972 2016-03-25 09:43:55.327 23258 INFO nova.osapi_compute.wsgi.server [req-b60f0493-96b1-4a35-a8bf-dac2e5020939 b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/os-quota-sets/50728f300ff04a5596df4127985e0ab1 HTTP/1.1" status: 200 len: 568 time: 0.0238168 2016-03-25 09:43:55.479 23258 INFO nova.osapi_compute.wsgi.server [req-138c5949-e3c2-4d6d-b956-c6e4369ff40a b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/servers/detail?all_tenants=True&tenant_id=50728f300ff04a5596df4127985e0ab1 HTTP/1.1" status: 200 len: 211 time: 0.1216240 2016-03-25 09:43:55.953 23257 INFO nova.osapi_compute.wsgi.server [req-89c86138-ae8b-4f09-b447-e7845c10e22f b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/os-keypairs HTTP/1.1" status: 200 len: 724 time: 0.0150409 2016-03-25 09:43:56.428 23258 INFO nova.osapi_compute.wsgi.server [req-21c6913d-b49c-4163-a8d7-2e68f1640ea9 b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/extensions HTTP/1.1" status: 200 len: 21880 time: 0.1085079 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions [req-eb9445fd-df9a-4270-8191-fedf73bac3ac b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] Unexpected exception in API method 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions Traceback (most recent call last): 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/extensions.py", line 478, in wrapped 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions return f(*args, **kwargs) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 73, in wrapper 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions return func(*args, **kwargs) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 73, in wrapper 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions return func(*args, **kwargs) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 611, in create 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions **create_kwargs) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/hooks.py", line 149, in inner 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions rv = f(*args, **kwargs) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1581, in create 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions check_server_group_quota=check_server_group_quota) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1181, in _create_instance 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions auto_disk_config, reservation_id, max_count) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 955, in _validate_and_build_base_options 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions pci_request_info, requested_networks) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 1059, in create_pci_requests_for_sriov_ports 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions neutron = get_client(context, admin=True) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 237, in get_client 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions auth_token = _ADMIN_AUTH.get_token(_SESSION) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/keystoneclient/auth/identity/base.py", line 200, in get_token 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions return self.get_access(session).auth_token 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/keystoneclient/auth/identity/base.py", line 240, in get_access 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions self.auth_ref = self.get_auth_ref(session) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/keystoneclient/auth/identity/generic/base.py", line 186, in get_auth_ref 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions return self._plugin.get_auth_ref(session, **kwargs) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/keystoneclient/auth/identity/v3/base.py", line 190, in get_auth_ref 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions authenticated=False, log=False, **rkwargs) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 501, in post 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions return self.request(url, 'POST', **kwargs) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/keystoneclient/utils.py", line 337, in inner 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions return func(*args, **kwargs) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 401, in request 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions raise exceptions.from_response(resp, method, url) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-49b60c3a-f1e5-41d0-9d65-95b675470575) 2016-03-25 09:43:57.265 23258 ERROR nova.api.openstack.extensions 2016-03-25 09:43:57.268 23258 INFO nova.api.openstack.wsgi [req-eb9445fd-df9a-4270-8191-fedf73bac3ac b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. <class 'keystoneclient.exceptions.Unauthorized'> 2016-03-25 09:43:57.270 23258 INFO nova.osapi_compute.wsgi.server [req-eb9445fd-df9a-4270-8191-fedf73bac3ac b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "POST /v2/50728f300ff04a5596df4127985e0ab1/servers HTTP/1.1" status: 500 len: 443 time: 0.8290629 2016-03-25 09:43:57.864 23256 INFO nova.osapi_compute.wsgi.server [req-0d709a50-4b69-476d-84ff-095eb0655566 b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/servers/detail?limit=21&project_id=50728f300ff04a5596df4127985e0ab1 HTTP/1.1" status: 200 len: 211 time: 0.3183470 2016-03-25 09:43:58.038 23258 INFO nova.osapi_compute.wsgi.server [req-e132d382-4c2d-4207-a29e-37754930ea45 b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/extensions HTTP/1.1" status: 200 len: 21880 time: 0.1090808 2016-03-25 09:43:58.143 23258 INFO nova.osapi_compute.wsgi.server [req-e00a73f2-a5c5-4164-a0a9-f267f70395d2 b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/limits?reserved=1 HTTP/1.1" status: 200 len: 708 time: 0.0421340 2016-03-25 09:43:58.200 23258 INFO nova.osapi_compute.wsgi.server [req-1fb98d12-cc4b-452a-87ce-4fca83469e06 b5fc9f343ca64d28a09e7dfab98cd444 50728f300ff04a5596df4127985e0ab1 - - -] 192.168.20.101 "GET /v2/50728f300ff04a5596df4127985e0ab1/limits?reserved=1 HTTP/1.1" status: 200 len: 708 time: 0.0399029 |
还是看日志。不能成功的原因很多,比如镜像有问题,controller有问题。等 先看看Nova api日志吧 |