OpenStack Create instance failed, bug (1) solution

Source: Internet
Author: User
Tags openvswitch

First say I find out where the error is, although it is a small mistake, but still have to pay attention to
1, the host name of the control node was accidentally modified, then caused the Keystone work is not normal, the message mechanism error. The host name of the control node can be changed back to the original host name.
2, an error occurred creating the instance:

Look at what Nova-compute.log see:

Starting Instan
Ce...
2017-05-16 15:10:55.461 3677 WARNING nova.compute.resource_tracker [-] [instance: 9cd465f8-76ec-40c2-8222-04796818f552] Host field should not is set on the instance Unt
Il resources have been claimed.
2017-05-16 15:10:55.461 3677 WARNING nova.compute.resource_tracker [-] [instance: 9cd465f8-76ec-40c2-8222-04796818f552] Node field should not is set on the instance Unt
Il resources have been claimed.
2017-05-16 15:10:55.464 3677 AUDIT nova.compute.claims [-] [instance:9cd465f8-76ec-40c2-8222-04796818f552] Attempting claim:memory MB, disk 1 GB
2017-05-16 15:10:55.464 3677 AUDIT nova.compute.claims [-] [instance:9cd465f8-76ec-40c2-8222-04796818f552] Total memory:9891 MB, used:8192.00 MB
2017-05-16 15:10:55.465 3677 AUDIT nova.compute.claims [-] [instance:9cd465f8-76ec-40c2-8222-04796818f552] Memory Limit not specified, defaulting to unlimited
2017-05-16 15:10:55.465 3677 AUDIT nova.compute.claims [-] [instance:9cd465f8-76ec-40c2-8222-04796818f552] Total disk: 196 GB, used:93.00 GB
2017-05-16 15:10:55.466 3677 AUDIT nova.compute.claims [-] [instance:9cd465f8-76ec-40c2-8222-04796818f552] disk limit Not specified, defaulting to unlimited
2017-05-16 15:10:55.482 3677 AUDIT nova.compute.claims [-] [instance:9cd465f8-76ec-40c2-8222-04796818f552] Claim Successful
2017-05-16 15:10:55.818 3677 INFO nova.scheduler.client.report [-] Compute_service record updated for (' Sles11sp3x64-hsm1-vm3 ', ' sles11sp3x64-hsm1-vm3.istl.chd.edu.cn ')
2017-05-16 15:10:55.871 3677 INFO nova.network.neutronv2.api [-] [instance:9cd465f8-76ec-40c2-8222-04796818f552] Unable to reset device ID for Port None
2017-05-16 15:10:56.350 3677 INFO nova.scheduler.client.report [-] Compute_service record updated for (' Sles11sp3x64-hsm1-vm3 ', ' sles11sp3x64-hsm1-vm3.istl.chd.edu.cn ')
2017-05-16 15:10:56.657 3677 INFO nova.virt.libvirt.driver [-] [instance:9cd465f8-76ec-40c2-8222-04796818f552] Creating image
2017-05-16 15:10:56.752 3677 INFO Nova.virt.disk.vfs.api [-] Unable to import guestfsfalling back to Vfslocalfs
2017-05-16 15:10:56.754 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:10:56.754 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:10:56.943 3677 INFO nova.scheduler.client.report [-] Compute_service record updated for (' Sles11sp3x64-hsm1-vm3 ', ' sles11sp3x64-hsm1-vm3.istl.chd.edu.cn ')
2017-05-16 15:10:58.755 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:10:58.756 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:00.758 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:11:00.759 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:02.762 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:11:02.763 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:04.766 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:11:04.767 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:06.769 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:11:06.770 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:08.771 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:11:08.772 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:10.774 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:11:10.775 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:10.775 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:12.778 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:11:12.779 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:14.781 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:11:14.782 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:16.784 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:11:16.785 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:18.786 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:11:18.788 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:20.790 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:11:20.791 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:22.793 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:11:22.794 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:24.795 3677 ERROR nova.virt.disk.mount.nbd [-] NBD module not loaded
2017-05-16 15:11:24.796 3677 INFO nova.virt.disk.mount.api [-] Device allocation. Would retry in 2 seconds.
2017-05-16 15:11:26.797 3677 WARNING nova.virt.disk.mount.api [-] Device allocation after failed repeated.
2017-05-16 15:11:26.798 3677 INFO nova.virt.libvirt.driver [-] [instance:9cd465f8-76ec-40c2-8222-04796818f552] Using Config drive
2017-05-16 15:11:26.892 3677 INFO nova.virt.libvirt.driver [-] [instance:9cd465f8-76ec-40c2-8222-04796818f552] Creating config Drive at/var/lib/nova/instances/9cd465f
8-76ec-40c2-8222-04796818f552/disk.config
2017-05-16 15:11:26.987 3677 ERROR Nova.compute.manager [-] [instance:9cd465f8-76ec-40c2-8222-04796818f552] Instance Failed to spawn
2017-05-16 15:11:26.987 3677 TRACE nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552] Traceback ( Most recent call last):
2017-05-16 15:11:26.987 3677 TRACE nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552] File "/usr/ Lib64/python2.6/site-packages/nova/compute/manager
. py ", line 2317, in _build_resources
2017-05-16 15:11:26.987 3677 TRACE nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552] Yield Resources
2017-05-16 15:11:26.987 3677 TRACE nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552] File "/usr/ Lib64/python2.6/site-packages/nova/compute/manager
. py ", line 2187, in _build_and_run_instance
2017-05-16 15:11:26.987 3677 TRACE nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552] Block_device _info=block_device_info)
2017-05-16 15:11:26.987 3677 TRACE nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552] File "/usr/ lib64/python2.6/site-packages/nova/virt/libvirt/driver.py ", line 2682, in Spawn
2017-05-16 15:11:26.987 3677 TRACE nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552] Write_to_ Disk=true)
2017-05-16 15:11:26.987 3677 TRACE nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552] File "/usr/ Lib64/python2.6/site-packages/nova/virt/libvirt/dr
iver.py ", line 4212, in _get_guest_xml
2017-05-16 15:11:26.987 3677 TRACE Nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552] context)
2017-05-16 15:11:26.987 3677 TRACE nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552] File "/usr/ Lib64/python2.6/site-packages/nova/virt/libvirt/dr
iver.py ", line 3990, in _get_guest_config
2017-05-16 15:11:26.987 3677 TRACE nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552] flavor, CONF.libvirt.virt_type)
2017-05-16 15:11:26.987 3677 TRACE nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552] File "/usr/ lib64/python2.6/site-packages/nova/virt/libvirt/vif.py ", Line 358, in Get_config
2017-05-16 15:11:26.987 3677 TRACE Nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552] _ (" Unexpected vif_type=%s ")% Vif_type)
2017-05-16 15:11:26.987 3677 TRACE nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552] Novaexception:unexpected vif_type=binding_failed
2017-05-16 15:11:26.987 3677 TRACE nova.compute.manager [instance:9cd465f8-76ec-40c2-8222-04796818f552]
2017-05-16 15:11:26.989 3677 AUDIT nova.compute.manager [req-50e1bc3a-ebb8-4ec5-979d-c3db0f0e2fe0 None] [instance: 9CD465F8-76EC-40C2-8222-04796818F552] Terminating INS
Tance

The first thing we have to do is:
1, check the OpenStack components are normal work
To view the Nova component:

Command: Nova Service-list

To see if the neutron component is working correctly:
Command: Neutron agent-list



It feels like this neutron-openvswitch-agent problem.

Neutron-openvswitch-agent is just a neutron network plug-in, then what is openvswitch, here we need to know:

Openvswitch, abbreviated as OVS, is a virtual switching software that is used primarily for virtual machine VM environments, as a virtual switch that supports Xen/xenserver, KVM, and VirtualBox virtualization technologies.

In this virtualized environment for one machine, a virtual switch (vswitch) has two main functions: passing the traffic between VM VMS, and implementing the communication between VM and the outside network.

The more L2 layer agent currently used in OpenStack should be the Openvswitch agent. This article roughly analyzed what the OPENVSWITHC agent did.

Look at the start of the Openvswitch agent:
1.neutron/plugins/openvswitch/agent/ovs_neutron_agent.py:main ()
2. Plugin = ovsneutronagent (**agent_config)
3. SELF.SETUP_RPC ()
4. Self.plugin_rpc = Ovspluginapi (topics. PLUGIN)
5. Self.state_rpc = Agent_rpc. Pluginreportstateapi (Topics. PLUGIN)
6. self.connection = Agent_rpc.create_consumers (...)
7. Heartbeat = Loopingcall. Fixedintervalloopingcall (Self._report_state)
8. SELF.SETUP_INTEGRATION_BR ()
9. Self.setup_physical_bridges (bridge_mappings)
Self.sg_agent = Ovssecuritygroupagent (...)
Plugin.daemon_loop ()
Self.rpc_loop ()
Port_info = Self.update_ports (ports)
Sync = self.process_network_ports (port_info)
Copy Code

The following work was done at startup:
1. Set PLUGIN_RPC, which is used to communicate with Neutron-server.
2. Set up STATE_RPC for agent status information escalation.
3. Set connection to receive Neutron-server messages.
4. Launch status cycle escalation.
5. Set Br-int.
6. Set the bridge_mapping corresponding to the Network bridge.
7. Initialize sg_agent for handling security group.
8. Cycle detection Br-int on the port changes, call Process_network_ports processing Add/Remove ports.
First boot virtual machine, Nova-compute send a message to Neutron-server request to create port. After the port is established on the Br-int in driver, the Neutron-openvswitch-port loop detection Br-int discovers the new ports, sets the appropriate OpenFlow rules and Localvlan, Finally, the port state is set to active.

So what we're going to do is turn the neutron-openvswitch-agent on the vm3 to normal,
Command:/sbin/service openstack-neutron-openvswitch-agent restart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.