Ask Your Question

kramer's profile - activity

2020-02-24 09:44:24 -0500 received badge  Nice Question (source)
2019-12-17 07:49:46 -0500 received badge  Famous Question (source)
2019-03-18 18:23:02 -0500 received badge  Good Question (source)
2018-04-13 11:04:37 -0500 marked best answer Port ... not present in bridge br-int

I try to create a instance on provider network. But the instance is created in failed status. I checked the nova-compute log, it has below infor

[req-524370a2-5944-45c0-9d19-e4109e1ad9d9 d190650a9cbb496385bc9bb7dc60891e e6d2515cc8544b33b2fa12c4af24e605 - - -] Instance failed network setup after 1 attempt(s)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1570, in _allocate_network_async
    bind_host_id=bind_host_id)
  File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 666, in allocate_for_instance
    self._delete_ports(neutron, instance, created_port_ids)
  File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
    self.force_reraise()
  File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
    six.reraise(self.type_, self.value, self.tb)
  File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 655, in allocate_for_instance
    security_group_ids, available_macs, dhcp_opts)
  File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 259, in _create_port
    raise exception.PortBindingFailed(port_id=port_id)
PortBindingFailed: Binding failed for port 9003cda0-9c96-4a9e-b60a-50d489ab57f2, please check neutron logs for more information.

Since nova suggest check neutron log. So I checked the neutron log on the compute node. The ovs-agent log. I found below in the log:

neutron.agent.common.ovs_lib [req-4573ff3f-50d6-4756-bfb1-c6d558697f66 - - - - -] Port 9d2b1814-a3be-448d-aa58-caa696b2119d not present in bridge br-int

neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-4573ff3f-50d6-4756-bfb1-c6d558697f66 - - - - -] port_unbound(): net_uuid None not in local_vlan_map

neutron.agent.securitygroups_rpc [req-4573ff3f-50d6-4756-bfb1-c6d558697f66 - - - - -] Remove device filter for [u'9d2b1814-a3be-448d-aa58-caa696b2119d']

My guess is that the tap device which connecting the vm is not created and plugged into the br-int. But I do not know why. So why this is happening?

2018-04-13 11:04:37 -0500 received badge  Teacher (source)
2018-04-13 11:04:37 -0500 received badge  Self-Learner (source)
2018-04-10 21:14:03 -0500 received badge  Good Question (source)
2018-03-15 16:02:38 -0500 received badge  Famous Question (source)
2018-01-30 08:33:13 -0500 received badge  Famous Question (source)
2018-01-22 05:27:43 -0500 marked best answer How to understand the bridge_mappings?
# Comma-separated list of <physical_network>:<bridge> tuples mapping physical
# network names to the agent's node-specific Open vSwitch bridge names to be
# used for flat and VLAN networks. The length of bridge names should be no more
# than 11. Each bridge must exist, and should have a physical network interface
# configured as a port. All physical networks configured on the server should
# have mappings to appropriate bridges on each agent. Note: If you remove a
# bridge from this mapping, make sure to disconnect it from the integration
# bridge as it won't be managed by the agent anymore. Deprecated for ofagent.
# (list value)
bridge_mappings =

I am trying to setup vlan type tenant network use ml2 + ovs. But the configure bridge_mappings confused me. Above said it is physical network names map to ovs bridge. But!!! What is a physical network name? The network you created with neutron net-create command? But that network should not be created yet at the time I edit this config.

Another guess here is that there is some predefined network names that neutron understand. But where I can find those predefined name if it is the case?

I am using ovs + ml2 to create vlan tenant network.

I try to create two tenant network net1 and net2, both with vlan type. Then try to create provider network external with flat type.

I want the net1 and net2 use ovs bridge called br-vlan and external use ovs-bridge called br-ex.

So I config the bridge_mappings to

bridge_mappings = net1:br-vlan, net2:br-vlan, external:br-ex

But this is wrong. The server said

Parsing bridge_mappings failed: Value br-vlan in mapping: 'vlan2:br-vlan' not unique. Agent terminated!

So how should I config?

2017-03-14 22:08:06 -0500 commented answer How to configure Placement Service for Compute Node on Ocata

Did you miss to config the apache? Because the 8780 should be listened somewhere

2017-02-22 23:13:14 -0500 asked a question How is the history release document are managed?

Hi

Where I can find the documents of liberty?

The url I used to access now always be redirected to below URL

https://docs.openstack.org/index.html

This is happened after the Ocata released.

2017-02-21 02:04:48 -0500 received badge  Notable Question (source)
2017-02-12 21:12:31 -0500 received badge  Famous Question (source)
2017-02-06 02:10:01 -0500 received badge  Popular Question (source)
2017-02-05 23:11:24 -0500 asked a question What are service plugin vs service provider ?

While reading docs for neutron, some times you will see the term service provider. It seems the same thing as service plugin. But I am not sure. Can anyone tell what are they and they?

2017-02-05 22:24:43 -0500 asked a question What are core plugin, service plugin and extension of neutron?

I already have some understanding after search through the internet. But I do not know if they are right. So I will list them here, please help to correct me if I am wrong.

Please note that my understanding are based on the version liberty and mitaka

Core Plugin

Neutron have 4 core resources: network/subnet/subnet-pool/port. Core Plugin are used to manage these resources. For example, ML2 Plugin will create subnet in database and configure them on the linuxbridge or openvswitch

Service Plugin

Besides those core resource, neutron also support higher level services like route, firewall, loadbalance. This are managed by service plugins. For example, l3_route_plugin are used for CURD router. One thing I know from the code is that neutron will convert the core plugin to service plugin in future.

Extensions

There are three kinds of extensions:

First kind, this kind of extensions are used to manage some type of resources just like service plugins.(I do not know why we need this type of extension since we already have service plugin)

Second kind, this kind of extensions are used to add some attributes to a resources. For example, we have port resources and we want to add bind action to this resource. So we use an extension to do this.(Also confused here, why we just modify the corresponding plugin to add attributes)

Third kind, this kind of extensions are used to add some parameters to an API. For example, you need 3 parameters to create an port before. After add an extension to the api, you will need 4 parameters to do this.

OK. The above are my understanding of core/service plugin and extension. Please help to correct me if it is wrong. The extension part is the most uncertain part.

2017-01-28 19:25:16 -0500 received badge  Notable Question (source)
2017-01-26 14:32:48 -0500 received badge  Nice Question (source)
2017-01-04 23:23:28 -0500 received badge  Famous Question (source)
2017-01-03 08:02:45 -0500 received badge  Famous Question (source)
2016-12-30 10:24:15 -0500 received badge  Notable Question (source)
2016-12-30 08:28:02 -0500 received badge  Famous Question (source)
2016-12-29 20:42:42 -0500 commented question cirros instance hang at boot time, console show"Starting up"

Hi Sgordon

I added those information at the end of my post. Can you help to check please?

2016-12-29 20:37:08 -0500 received badge  Popular Question (source)
2016-12-29 08:19:33 -0500 asked a question cirros instance hang at boot time, console show"Starting up"

I am using Mitaka openstack on CentOS7. I use cirros image to create a vm. The openstack server list command shows the instance is active

[root@controller rabbitmq]# openstack server list
+--------------------------------------+------+--------+-----------------------+
| ID                                   | Name | Status | Networks              |
+--------------------------------------+------+--------+-----------------------+
| ac7ae80e-52ed-4b68-b241-37a9eee9ab7d | c2   | ACTIVE | provider=************ |
+--------------------------------------+------+--------+-----------------------+

But when access the instance by vnc, it only shows Starting up ... and it hang there like forever.

I also try to use other image like CentOS7. But it also hang at boot time. This time the VNC console shows Probing edd. Also I find the file in /var/lib/nova/{instance id}/console.log. I guess this is the console output of the instance. It shows below content

  CentOS Linux (3.10.0-327.28.3.el7.x86_64) 7 (Core)                        
  CentOS Linux (0-rescue-56d65f493d8f854534fe792ecf014b83) 7 (Core)        














  Use the ^ and v keys to change the selection.                       
  Press 'e' to edit the selected item, or 'c' for a command prompt.   
  The selected entry will be started automatically in 0s.

I also checked the nova-compute.log on the corresponding compute node. Below are the output

2016-12-29 20:48:55.925 2263 INFO nova.compute.claims : [instance: ac7ae80e-52ed-4b68-b241-37a9eee9ab7d] Attempting claim: memory 64 MB, disk 1 GB, vcpus 1 CPU
2016-12-29 20:48:55.925 2263 INFO nova.compute.claims : [instance: ac7ae80e-52ed-4b68-b241-37a9eee9ab7d] Total memory: 16383 MB, used: 512.00 MB
2016-12-29 20:48:55.926 2263 INFO nova.compute.claims : [instance: ac7ae80e-52ed-4b68-b241-37a9eee9ab7d] memory limit: 24574.50 MB, free: 24062.50 MB
2016-12-29 20:48:55.926 2263 INFO nova.compute.claims : [instance: ac7ae80e-52ed-4b68-b241-37a9eee9ab7d] Total disk: 49 GB, used: 0.00 GB
2016-12-29 20:48:55.926 2263 INFO nova.compute.claims : [instance: ac7ae80e-52ed-4b68-b241-37a9eee9ab7d] disk limit: 49.00 GB, free: 49.00 GB
2016-12-29 20:48:55.927 2263 INFO nova.compute.claims : [instance: ac7ae80e-52ed-4b68-b241-37a9eee9ab7d] Total vcpu: 8 VCPU, used: 0.00 VCPU
2016-12-29 20:48:55.927 2263 INFO nova.compute.claims : [instance: ac7ae80e-52ed-4b68-b241-37a9eee9ab7d] vcpu limit not specified, defaulting to unlimited
2016-12-29 20:48:55.944 2263 INFO nova.compute.claims : [instance: ac7ae80e-52ed-4b68-b241-37a9eee9ab7d] Claim successful
2016-12-29 20:48:57.869 2263 WARNING nova.virt.osinfo : Cannot find OS information - Reason: (No configuration information found for operating system Empty)
2016-12-29 20:48:57.950 2263 WARNING nova.virt.osinfo : Cannot find OS information - Reason: (No configuration information found for operating system Empty)
2016-12-29 20:48:58.290 2263 WARNING nova.virt.osinfo : Cannot find OS information - Reason: (No configuration information found for operating system Empty)
2016-12-29 20:48:58.295 2263 INFO nova.virt.libvirt.driver : [instance: ac7ae80e-52ed-4b68-b241-37a9eee9ab7d] Creating image
2016-12-29 20:49:00.174 2263 WARNING nova.virt.osinfo : Cannot find OS information - Reason: (No configuration information found for operating system Empty)
2016-12-29 20:49:01.333 2263 INFO nova.compute.manager [-] [instance: ac7ae80e-52ed-4b68-b241-37a9eee9ab7d] VM Started (Lifecycle Event)
2016-12-29 20:49:01.472 2263 INFO nova.compute.manager : [instance: ac7ae80e-52ed-4b68-b241-37a9eee9ab7d] VM Paused (Lifecycle Event)
2016-12-29 20:49:01.666 2263 INFO nova.compute.manager : [instance: ac7ae80e-52ed-4b68-b241-37a9eee9ab7d] During sync_power_state the instance has a pending task (spawning). Skip.
2016-12-29 20:49:06.025 2263 INFO nova.compute.manager : [instance ...
(more)
2016-12-25 20:21:59 -0500 received badge  Popular Question (source)
2016-12-22 20:27:28 -0500 commented answer Does this code is wrong? neutron.api.extensions.get_extensions_path

thanks for the answer. but i do not understand. I know paths is a ordered dict but do know what you mean. could you give some more details? also i add something to my question to make it more clear. could you kindly check it again?

2016-12-22 02:23:19 -0500 asked a question Does this code is wrong? neutron.api.extensions.get_extensions_path

I am reading the code of liberty version neutron and I find a place very confusing. Sorry if this is not the right place to talk about code. In that case please kindly tell me where should I go.

OK, this is my question. The code location is at

neutron/aip/extensions.py

The function is

# Returns the extension paths from a config entry and the __path__
# of neutron.extensions
def get_extensions_path(service_plugins=None):
    paths = collections.OrderedDict()

    # Add Neutron core extensions
    paths[neutron.extensions.__path__[0]] = 1
    if service_plugins:
        # Add Neutron *-aas extensions
        for plugin in service_plugins.values():
            neutron_mod = provider_configuration.NeutronModule(
                plugin.__module__.split('.')[0])
            try:
                paths[neutron_mod.module().extensions.__path__[0]] = 1
            except AttributeError:
                # Occurs normally if module has no extensions sub-module
                pass

The problem is this line

plugin.__module__.split('.')[0]

No matter what does the plugin is, the plugin.__module__ must be some string start with

neutron.

Because they all belong to the package neutron. So split['.'][0] will return only the string "neutron".

So the line

paths[neutron_mod.module().extensions.__path__[0]] = 1

Will be doing the exactly same thing with the line

paths[neutron.extensions.__path__[0]] = 1

Because the neutron_mod.module() will be just "neutron" module..

So... what is the point of doing it again here?

Add some thing to make my question more clear

From the comment we know that it said this functions return a collection of paths. The paths should include

  1. neutron.extensions.__path__ (which is /usr/lib/python/site/packages/neutron/extensions)
  2. service plugin extension paths (for example : extension sub directory of L3_ROUTER_Plugin which is a service plugin )

The first one like neutron.extensions.__path__ will be get by the line

paths[neutron.extensions.__path__[0]] = 1

But the part of getting service plugin extension paths which is the below lines:

            neutron_mod = provider_configuration.NeutronModule(
                plugin.__module__.split('.')[0])
            try:
                paths[neutron_mod.module().extensions.__path__[0]] = 1

These lines seems have some problem. Because the plugin.__module__.split('.')[0] will always return string "neutron". So neutron_mod is nothing but the neutron module. So paths[neutron_mod.module().extensions.__path__] is exactly the neutron.extensions.__path__ which we already get before.

It is not the extension path of service plugin. So I am confused here. Is there anything wrong with my understanding or it is wrong?

2016-11-28 02:47:20 -0500 received badge  Famous Question (source)
2016-11-09 02:14:23 -0500 received badge  Famous Question (source)
2016-10-21 14:47:00 -0500 received badge  Notable Question (source)
2016-10-10 04:51:27 -0500 marked best answer What is the physnet?

When configure the bridge_mappings of ovs-agent configuration. Some docs will give examples like

bridge_mappings = physnet:br-ex,vlan:br-vlan

or

bridge_mappings = provider:br-ex, vlan:br-int

From my understanding, the word provider,vlan,physnet should be network names. Like the object you created with neutron net-create

But during the time you config the bridge_mappings. Those network may not be created yet. Does it matter? Does it mean we must create networks with same name latter?