问题描述
故障现象:缺少network节点上的neutron的三个服务,只有compute1节点上的服务;root@controller:~#neutronagent-list+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+|id|agent_type|host|alive|admin_state_up|binary|+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+|23084054-276f-45bb-83b1-4eddd307e5b5|OpenvSwitchagent|compute1|:-)|True|neutron-openvswitch-agent|+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+root@controller:~#neutron--debugagent-listDEBUG:keystoneclient.sessionREQ:curl-g-i-XGEThttp://controller:35357/v2.0-H"Accept:application/json"-H"User-Agent:python-keystoneclient"DEBUG:keystoneclient.sessionRESP:[200]content-length:337vary:X-Auth-Tokenkeep-alive:timeout=5,max=100server:Apache/2.4.7(Ubuntu)connection:Keep-Alivedate:Sat,21May201602:47:33GMTx-openstack-request-id:req-c00e3ab1-0e8b-4c5d-941a-fb4b6d272ea1content-type:application/jsonx-distribution:UbuntuRESPBODY:{"version":{"status":"stable","updated":"2014-04-17T00:00:00Z","media-types":[{"base":"application/json","type":"application/vnd.openstack.identity-v2.0+json"}],"id":"v2.0","links":[{"href":"http://controller:35357/v2.0/","rel":"self"},{"href":"http://docs.openstack.org/","type":"text/html","rel":"describedby"}]}}DEBUG:stevedore.extensionfoundextensionEntryPoint.parse('yaml=clifftablib.formatters:YamlFormatter')DEBUG:stevedore.extensionfoundextensionEntryPoint.parse('json=clifftablib.formatters:JsonFormatter')DEBUG:stevedore.extensionfoundextensionEntryPoint.parse('html=clifftablib.formatters:HtmlFormatter')DEBUG:stevedore.extensionfoundextensionEntryPoint.parse('table=cliff.formatters.table:TableFormatter')DEBUG:stevedore.extensionfoundextensionEntryPoint.parse('csv=cliff.formatters.commaseparated:CSVLister')DEBUG:neutronclient.neutron.v2_0.agent.ListAgentget_data(Namespace(columns=[],fields=[],formatter='table',max_width=0,quote_mode='nonnumeric',request_format='json',show_details=False,sort_dir=[],sort_key=[]))DEBUG:keystoneclient.auth.identity.v2Makingauthenticationrequesttohttp://controller:35357/v2.0/tokensDEBUG:keystoneclient.sessionREQ:curl-g-i-XGEThttp://controller:9696/v2.0/agents.json-H"User-Agent:python-neutronclient"-H"Accept:application/json"-H"X-Auth-Token:{SHA1}8dad1a13af2586ac79bacb6e2e0b9f6c95758ac2"DEBUG:keystoneclient.sessionRESP:[200]date:Sat,21May201602:47:33GMTconnection:keep-alivecontent-type:application/json;charset=UTF-8content-length:585x-openstack-request-id:req-baa0c3d8-3d1e-48d2-9d90-23c4bf7745f7RESPBODY:{"agents":[{"binary":"neutron-openvswitch-agent","description":null,"admin_state_up":true,"heartbeat_timestamp":"2016-05-2102:47:24","alive":true,"topic":"N/A","host":"compute1","agent_type":"OpenvSwitchagent","created_at":"2016-05-2019:24:57","started_at":"2016-05-2020:17:57","id":"23084054-276f-45bb-83b1-4eddd307e5b5","configurations":{"in_distributed_mode":false,"arp_responder_enabled":false,"tunneling_ip":"10.0.1.31","devices":0,"l2_population":false,"tunnel_types":["gre"],"enable_distributed_routing":false,"bridge_mappings":{}}}]}+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+|id|agent_type|host|alive|admin_state_up|binary|+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+|23084054-276f-45bb-83b1-4eddd307e5b5|OpenvSwitchagent|compute1|:-)|True|neutron-openvswitch-agent|+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+2016-05-2111:21:52.2021428TRACEneutron.agent.metadata.agentImportError:Nomodulenamedrabbit2016-05-2111:21:52.2021428TRACEneutron.agent.metadata.agent2016-05-2111:22:22.2311428ERRORneutron.agent.metadata.agent[req-c633cdef-9cb2-4d7e-b60f-0e1e3d81673fNone]Failedreportingstate!2016-05-2111:22:22.2311428TRACEneutron.agent.metadata.agentTraceback(mostrecentcalllast):2016-05-2111:22:22.2311428TRACEneutron.agent.metadata.agentFile"/usr/lib/python2.7/dist-packages/neutron/agent/metadata/agent.py",line339,in_report_state2016-05-2111:22:22.2311428TRACEneutron.agent.metadata.agentuse_call=self.agent_state.get('start_flag'))2016-05-2111:22:22.2311428TRACEneutron.agent.metadata.agentFile"/usr/lib/python2.7/dist-packages/neutron/agent/rpc.py",line72,inreport_state2016-05-2111:22:22.2311428TRACEneutron.agent.metadata.agentreturnself.call(context,msg,topic=self.topic)2016-05-2111:22:22.2311428TRACEneutron.agent.metadata.agentFile"/usr/lib/python2.7/dist-packages/neutron/openstack/common/rpc/proxy.py",line125,incall2016-05-2111:22:22.2311428TRACEneutron.agent.metadata.agentresult=rpc.call(context,real_topic,msg,timeout)2016-05-2111:22:22.2311428TRACEneutron.agent.metadata.agentFile"/usr/lib/python2.7/dist-packages/neutron/openstack/common/rpc/__init__.py",line112,incall2016-05-2111:22:22.2311428TRACEneutron.agent.metadata.agentreturn_get_impl().call(CONF,context,topic,msg,timeout)2016-05-2111:22:22.2311428TRACEneutron.agent.metadata.agentFile"/usr/lib/python2.7/dist-packages/neutron/openstack/common/rpc/__init__.py",line274,in_get_impl2016-05-2111:22:22.2311428TRACEneutron.agent.metadata.agent_RPCIMPL=importutils.import_module(impl)2016-05-2111:22:22.2311428TRACEneutron.agent.metadata.agentFile"/usr/lib/python2.7/dist-packages/neutron/openstack/common/importutils.py",line57,inimport_module2016-05-2111:22:22.2311428TRACEneutron.agent.metadata.agent__import__(import_str)2016-05-2111:22:22.2311428TRACEneutron.agent.metadata.agentImportError:Nomodulenamedrabbit
解决方案
解决方案二:
-----------------------------------------------------------------------------------------------------------------------------------------------------root@controller:~#sourceadmin-openrc.shroot@controller:~#keystoneservice-list+----------------------------------+----------+----------+-------------------------+|id|name|type|description|+----------------------------------+----------+----------+-------------------------+|cb6d9e0b143b4e6abe36ce2e10b9f640|glance|image|OpenStackImageservice||2b04cc2932914cefb4cdbcea32db0fc0|keystone|identity|OpenStackIdentity||f32335bdff974844ae96684a825847c6|neutron|network|OpenStackNetworking||0f4c617862204303a810c6f53a3eef12|nova|compute|OpenStackCompute|+----------------------------------+----------+----------+-------------------------+root@controller:~#keystoneuser-list+----------------------------------+---------+---------+-------+|id|name|enabled|email|+----------------------------------+---------+---------+-------+|aae368b25f5b487aae8268f5c51a8493|admin|True|||1b64e816766a4995a3ef03fe16b38bf2|demo|True|||f20643b82e2a4cb2b83aadc5a3506523|glance|True|||01845f8ada8e4dfcb4802aacb59cb7be|neutron|True|||b9048f16dd2142c492523559237a043b|nova|True||+----------------------------------+---------+---------+-------+root@controller:~#keystoneendpoint-list+----------------------------------+-----------+-----------------------------------------+-----------------------------------------+-----------------------------------------+----------------------------------+|id|region|publicurl|internalurl|adminurl|service_id|+----------------------------------+-----------+-----------------------------------------+-----------------------------------------+-----------------------------------------+----------------------------------+|0911ab61f6be4f2eb8b9601a87c05b27|RegionOne|http://controller:9696|http://controller:9696|http://controller:9696|f32335bdff974844ae96684a825847c6||7c2152e52bc645618c351da89828e614|RegionOne|http://controller:8774/v2/%(tenant_id)s|http://controller:8774/v2/%(tenant_id)s|http://controller:8774/v2/%(tenant_id)s|0f4c617862204303a810c6f53a3eef12||a930539821ef48beb7d6892f55878746|RegionOne|http://controller:5000/v2.0|http://controller:5000/v2.0|http://controller:35357/v2.0|2b04cc2932914cefb4cdbcea32db0fc0||aa01c160279841fa985bdfe60f831a3f|RegionOne|http://controller:9292|http://controller:9292|http://controller:9292|cb6d9e0b143b4e6abe36ce2e10b9f640|+----------------------------------+-----------+-----------------------------------------+-----------------------------------------+-----------------------------------------+----------------------------------+root@controller:~#neutronext-list+-----------------------+-----------------------------------------------+|alias|name|+-----------------------+-----------------------------------------------+|security-group|security-group||l3_agent_scheduler|L3AgentScheduler||net-mtu|NetworkMTU||ext-gw-mode|NeutronL3Configurableexternalgatewaymode||binding|PortBinding||provider|ProviderNetwork||agent|agent||quotas|Quotamanagementsupport||subnet_allocation|SubnetAllocation||dhcp_agent_scheduler|DHCPAgentScheduler||l3-ha|HARouterextension||multi-provider|MultiProviderNetwork||external-net|Neutronexternalnetwork||router|NeutronL3Router||allowed-address-pairs|AllowedAddressPairs||extraroute|NeutronExtraRoute||extra_dhcp_opt|NeutronExtraDHCPopts||dvr|DistributedVirtualRouter|+-----------------------+-----------------------------------------------+
解决方案三:
OpenStackInstallationGuideforUbuntu14.04kilo安装openstack-install-guide-apt-kilo文档进行的部署;root@controller:~#rabbitmqctllist_queuesListingqueues...cert0cert.controller0cert_fanout_277669c609bc4b94956cc55cb8436efa0compute0compute.compute10compute_fanout_37689e95f18a445099c47f6b57db600f0conductor0conductor.controller0conductor_fanout_deaf632ecfea4ce59683acf65df293ba0consoleauth0consoleauth.controller0consoleauth_fanout_3290bbe98111436ca9218d0428c353500q-agent-notifier-dvr-update0q-agent-notifier-dvr-update.compute10q-agent-notifier-dvr-update_fanout_90183ea3cb7e4fe1843812a4add940450q-agent-notifier-network-delete0q-agent-notifier-network-delete.compute10q-agent-notifier-network-delete_fanout_000f7050883c48edb8bcd1eab7d715ec0q-agent-notifier-port-delete0q-agent-notifier-port-delete.compute10q-agent-notifier-port-delete_fanout_83edfcd5b0b344acbf1e6d1f7a6452ff0q-agent-notifier-port-update0q-agent-notifier-port-update.compute10q-agent-notifier-port-update_fanout_5c94b43a217043bd87137ed1714f97a00q-agent-notifier-security_group-update0q-agent-notifier-security_group-update.compute10q-agent-notifier-security_group-update_fanout_cfc660dfc7d4426db39185df4f5eea9e0q-agent-notifier-tunnel-delete0q-agent-notifier-tunnel-delete.compute10q-agent-notifier-tunnel-delete_fanout_8e3107928d404ebf8b952339835dcdef0q-agent-notifier-tunnel-update0q-agent-notifier-tunnel-update.compute10q-agent-notifier-tunnel-update_fanout_83926f9ae0bc4d5abe4ba6f23c71b0c90q-l3-plugin0q-l3-plugin.controller0q-l3-plugin_fanout_f12a2136b73c44998ecf45f54cdaea700q-plugin0q-plugin.controller0q-plugin_fanout_6bca454e88ca40588f0245543a0341960reply_50218262b9cb42eaa36c343eb41e93550reply_cce9b00e62d04bc5be75b3f6c69a5e550scheduler0scheduler.controller0scheduler_fanout_ed082b0c9c4e4350b3857cd42fc7a14a0root@controller:~#rabbitmq-serverERROR:nodewithname"rabbit"alreadyrunningon"controller"
解决方案四:
root@network:~#cat/etc/neutron/neutron.conf[DEFAULT]state_path=/var/lib/neutronlock_path=$state_path/lockcore_plugin=neutron.plugins.ml2.plugin.Ml2Pluginnotification_driver=neutron.openstack.common.notifier.rpc_notifierrpc_backend=rabbit#rpc_backend=neutron.openstack.common.rpc.impl_kombuauth_strategy=keystonecore_plugin=ml2service_plugins=routerallow_overlapping_ips=Trueverbose=True[quotas][agent]root_helper=sudo/usr/bin/neutron-rootwrap/etc/neutron/rootwrap.conf[keystone_authtoken]auth_uri=http://controller:5000auth_url=http://controller:35357auth_plugin=passwordproject_domain_id=defaultuser_domain_id=defaultproject_name=serviceusername=neutronpassword=1234#auth_host=127.0.0.1#auth_port=35357#auth_protocol=http#admin_tenant_name=%SERVICE_TENANT_NAME%#admin_user=%SERVICE_USER%#admin_password=%SERVICE_PASSWORD%#signing_dir=$state_path/keystone-signing[database]#connection=sqlite:////var/lib/neutron/neutron.sqlite[service_providers]service_provider=LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:defaultservice_provider=VPN:openswan:neutron.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default[oslo_messaging_rabbit]rabbit_host=controllerrabbit_userid=openstackrabbit_password=1234
root@network:~#cat/etc/neutron/plugins/ml2/ml2_conf.ini[ml2]type_drivers=flat,vlan,gre,vxlantenant_network_types=gremechanism_drivers=openvswitch[ml2_type_flat]flat_networks=external[ml2_type_vlan][ml2_type_gre]tunnel_id_ranges=1:1000[ml2_type_vxlan][securitygroup]enable_security_group=Trueenable_ipset=Truefirewall_driver=neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver[ovs]local_ip=10.0.1.21bridge_mappings=external:br-ex[agent]tunnel_types=gre
root@network:~#cat/etc/neutron/l3_agent.ini[DEFAULT]interface_driver=neutron.agent.linux.interface.OVSInterfaceDriverexternal_network_bridge=router_delete_namespaces=Trueverbose=True
root@network:~#cat/etc/neutron/dhcp_agent.ini[DEFAULT]interface_driver=neutron.agent.linux.interface.OVSInterfaceDriverdhcp_driver=neutron.agent.linux.dhcp.Dnsmasqdhcp_delete_namespaces=Trueverbose=True
root@network:~#cat/etc/neutron/metadata_agent.ini[DEFAULT]auth_uri=http://controller:5000auth_url=http://controller:35357auth_region=RegionOneauth_plugin=passwordproject_domain_id=defaultuser_domain_id=defaultproject_name=serviceusername=neutronpassword=1234nova_metadata_ip=controllermetadata_proxy_shared_secret=1234verbose=True