I am attempting to configure OpenStack to launch instances on a specific VLAN on one of the interfaces on my compute nodes. The VMswitch name is Back-end zone
. I want to launch VMs on VLAN 150 on this VMswitch.
I have installed the latest Cloudbase Nova driver for Ocata and am using the default Hyper-V neutron agent.
Do I need to do anything with the segment_id
directive for the subnet?
I have tried setting the router:external
directive for the network to 'internal' but this doesn't seem to help.
All relevant information I could think of has been included below. Please let me know if there is any additional info you would like to see. Any help would be greatly appreciated.
Here is my network agent list on the controller:
# openstack network agent list
+--------------------------------------+----------------+---------------+-------------------+-------+-------+------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+----------------+---------------+-------------------+-------+-------+------------------------+
| 1f512938-132e-47d3-b1a5-eb0be5aed61c | DHCP agent | gcp-openstack | nova | True | UP | neutron-dhcp-agent |
| 46d88273-4245-4206-b636-6944addb1c1f | Metadata agent | gcp-openstack | None | True | UP | neutron-metadata-agent |
| 4d1ca29e-ece8-4380-bde7-17d167d6a103 | L3 agent | gcp-openstack | nova | True | UP | neutron-l3-agent |
| da6107b9-c6ac-41cd-8063-28ce0d702c24 | HyperV agent | T-Cloud-1 | None | True | UP | neutron-hyperv-agent |
+--------------------------------------+----------------+---------------+-------------------+-------+-------+------------------------+
Here are my VMswitches:
PS C:\Windows\system32> get-vmswitch
Name SwitchType NetAdapterInterfaceDescription
---- ---------- ------------------------------
Back-end zone External Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #40
Proxy zone External Broadcom NetXtreme Gigabit Ethernet
Web zone External Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #39
I receive the following error message in Horizon when launching an instance:
2017-05-16 16:53:33.328 2112 ERROR nova.compute.manager [req-df281722-7a6a-45d8-a5e1-96cf329a669d 0797a3b035234af49fa8fc8a80680060 f0d140af365f4c65b8144f9d5a784bd8 - - -] Instance failed network setup after 1 attempt(s)
2017-05-16 16:53:33.328 2112 ERROR nova.compute.manager Traceback (most recent call last):
[...]
2017-05-16 16:53:33.328 2112 ERROR nova.compute.manager PortBindingFailed: Binding failed for port 5c6b4f72-635e-44ed-8681-01fde769998b, please check neutron logs for more information.
2017-05-16 16:53:33.375 2112 ERROR nova.compute.manager [req-df281722-7a6a-45d8-a5e1-96cf329a669d 0797a3b035234af49fa8fc8a80680060 f0d140af365f4c65b8144f9d5a784bd8 - - -] [instance: 109a7120-b447-4313-8050-20a7099118d4] Instance failed to spawn
2017-05-16 16:53:33.375 2112 ERROR nova.compute.manager [instance: 109a7120-b447-4313-8050-20a7099118d4] Traceback (most recent call last):
[...]
2017-05-16 16:53:33.375 2112 ERROR nova.compute.manager [instance: 109a7120-b447-4313-8050-20a7099118d4] PortBindingFailed: Binding failed for port 5c6b4f72-635e-44ed-8681-01fde769998b, please check neutron logs for more information.
I don't see any new logs in the neutron-hyperv-agent.log
file on the compute node.
I see the following errors in /var/log/neutron/server.log
on the controller:
2017-05-16 16:53:29.701 7634 WARNING neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api [req-0825988b-430f-41e6-83f3-422bb61927ff - - - - -] Unable to schedule network c8321bc0-f38c-4943-988b-f298313ae1be: no agents available; will retry on subsequent port and subnet creation events.
2017-05-16 16:53:29.890 7634 INFO neutron.wsgi [req-0825988b-430f-41e6-83f3-422bb61927ff - - - - -] 10.9.47.71 - - [16/May/2017 16:53:29] "POST /v2.0/ports.json HTTP/1.1" 201 1087 1.430238
2017-05-16 16:53:30.174 7634 INFO neutron.wsgi [req-b6a0a893-439c-4bf1-a548-7f924ed19755 - - - - -] 10.9.47.71 - - [16/May/2017 16:53:30] "GET /v2.0/extensions.json HTTP/1.1" 200 7503 0.278365
2017-05-16 16:53:31.892 7634 ERROR neutron.plugins.ml2.managers [req-69aaa9cb-d10b-49fd-8812-5a973b188d11 - - - - -] Failed to bind port 5c6b4f72-635e-44ed-8681-01fde769998b on host T-Cloud-1 for vnic_type normal using segments [{'segmentation_id': 150, 'physical_network': u'provider', 'id': u'f2fa8cbe-08ed-4491-9be3-d200f4f4000b', 'network_type': u'vlan'}]
[... attempts repeat same message ...]
2017-05-16 16:53:32.054 7634 INFO neutron.plugins.ml2.plugin [req-69aaa9cb-d10b-49fd-8812-5a973b188d11 - - - - -] Attempt 10 to bind port 5c6b4f72-635e-44ed-8681-01fde769998b
2017-05-16 16:53:32.074 7634 ERROR neutron.plugins.ml2.managers [req-69aaa9cb-d10b-49fd-8812-5a973b188d11 - - - - -] Failed to bind port 5c6b4f72-635e-44ed-8681-01fde769998b on host T-Cloud-1 for vnic_type normal using segments [{'segmentation_id': 150, 'physical_network': u'provider', 'id': u'f2fa8cbe-08ed-4491-9be3-d200f4f4000b', 'network_type': u'vlan'}]
This is my neutron_hyperv_agent.conf
on the compute node:
[DEFAULT]
verbose=false
control_exchange=neutron
rpc_backend=rabbit
log_dir=C:\OpenStack\Log\
log_file=neutron-hyperv-agent.log
[AGENT]
polling_interval=2
physical_network_vswitch_mappings=*:Back-end zone
enable_metrics_collection=false
enable_qos_extension=false
worker_count=12
[SECURITYGROUP]
firewall_driver=hyperv
enable_security_group=true
[oslo_messaging_rabbit]
rabbit_host=controller
rabbit_port=5672
rabbit_userid=openstack
rabbit_password=[redacted]
This is my nova.conf
on the compute node:
[DEFAULT]
network_api_class=nova.network.neutronv2.api.API
compute_driver=compute_hyperv.driver.HyperVDriver
instances_path=C:\ClusterStorage\Volume1\VMs
use_cow_images=true
flat_injected=true
mkisofs_cmd=C:\Program Files\Cloudbase Solutions\OpenStack\Nova\bin\mkisofs.exe
verbose=false
allow_resize_to_same_host=true
running_deleted_instance_poll_interval=120
resize_confirm_window=5
resume_guests_state_on_host_boot=true
rpc_response_timeout=1800
lock_path=C:\OpenStack\Log\
vif_plugging_is_fatal=false
vif_plugging_timeout=60
rpc_backend=rabbit
log_dir=C:\OpenStack\Log\
log_file=nova-compute.log
force_config_drive=True
[placement]
auth_strategy=keystone
auth_plugin=v3password
auth_type=password
auth_url=http://controller:35357/v3
project_name=service
username=placement
password=[redacted]
project_domain_name=Default
user_domain_name=Default
os_region_name=RegionOne
[notifications]
[glance]
api_servers=http://controller:9292
[hyperv]
vswitch_name=Back-end zone
limit_cpu_features=true
config_drive_inject_password=true
qemu_img_cmd=C:\Program Files\Cloudbase Solutions\OpenStack\Nova\bin\qemu-img.exe
config_drive_cdrom=true
dynamic_memory_ratio=1
enable_instance_metrics_collection=false
[rdp]
enabled=true
html5_proxy_base_url=http://controller:8000/
[neutron]
url=http://controller:9696
auth_strategy=keystone
project_name=service
username=neutron
password=[redacted]
auth_url=http://controller:35357/v3
project_domain_name=Default
user_domain_name=Default
os_region_name=RegionOne
auth_plugin=v3password
[oslo_messaging_rabbit]
rabbit_host=controller
rabbit_port=5672
rabbit_userid=openstack
rabbit_password=[redacted]
Here is the show output for the network I am using for the instances that fail to launch:
# openstack network show c8321bc0-f38c-4943-988b-f298313ae1be
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2017-05-16T20:47:01Z |
| description | |
| dns_domain | None |
| id | c8321bc0-f38c-4943-988b-f298313ae1be |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | False |
| mtu | 1500 |
| name | mgmt-net2 |
| port_security_enabled | True |
| project_id | f0d140af365f4c65b8144f9d5a784bd8 |
| provider:network_type | vlan |
| provider:physical_network | provider |
| provider:segmentation_id | 150 |
| qos_policy_id | None |
| revision_number | 9 |
| router:external | External |
| segments | None |
| shared | True |
| status | ACTIVE |
| subnets | 7f81cf8b-32f1-44e1-bafa-19d6906e1e13 |
| updated_at | 2017-05-16T20:49:27Z |
+---------------------------+--------------------------------------+
Here is the show output for the subnet being used:
# openstack subnet show 7f81cf8b-32f1-44e1-bafa-19d6906e1e13
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| allocation_pools | 10.9.48.240-10.9.48.250 |
| cidr | 10.9.48.0/24 |
| created_at | 2017-05-16T20:49:27Z |
| description | |
| dns_nameservers | 8.8.4.4 |
| enable_dhcp | True |
| gateway_ip | 10.9.48.1 |
| host_routes | |
| id | 7f81cf8b-32f1-44e1-bafa-19d6906e1e13 |
| ip_version | 4 |
| ipv6_address_mode | None |
| ipv6_ra_mode | None |
| name | mgmt-net_tso_test_range2 |
| network_id | c8321bc0-f38c-4943-988b-f298313ae1be |
| project_id | f0d140af365f4c65b8144f9d5a784bd8 |
| revision_number | 2 |
| segment_id | None |
| service_types | |
| subnetpool_id | None |
| updated_at | 2017-05-16T20:49:27Z |
+-------------------+--------------------------------------+