<StarlingX 2.0> Unable to create VLAN network

Bug #1844223 reported by ANIRUDH GUPTA
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
StarlingX
Invalid
High
YaoLe

Bug Description

Brief Description:

I have installed StarlingX 2.0 and installed Openstack on it.
Further I am trying to create a VLAN network, but getting an error.

I have 2 Datanetworks - One for Flat and another for VLAN
My Flat network creation is a success, but VLAN network is getting failed to create.

Severity
--------
Major: Cannot Create VLAN network

Steps to Reproduce
------------

Install StarlingX 2.0 with Openstack and Create VLAN network

Expected Behaviour
---------

VLAN network should get create

Actual Behaviour
----------

HttpException: 503, Unable to create the network. No tenant network is available for allocation

Setup and Issue Detail
------------------

[root@controller-0 sysadmin(keystone_admin)]# system datanetwork-list
+--------------------------------------+----------+--------------+------+
| uuid | name | network_type | mtu |
+--------------------------------------+----------+--------------+------+
| 0fd39744-7cd3-4bc4-84fc-ec6c3c5597d3 | physnet0 | vlan | 1500 |
| 81d13825-fcb0-44b4-a39c-ecee31dbac5b | physnet1 | flat | 1500 |
+--------------------------------------+----------+--------------+------+

[root@controller-0 sysadmin(keystone_admin)]# system interface-datanetwork-list controller-0
+--------------+--------------------------------------+--------+------------------+
| hostname | uuid | ifname | datanetwork_name |
+--------------+--------------------------------------+--------+------------------+
| controller-0 | 01fd4e1b-5855-4340-9ea2-e307281981c0 | data0 | physnet0 |
| controller-0 | 0c9a925b-6ec9-429c-b445-b77b06d45109 | data1 | physnet1 |
+--------------+--------------------------------------+--------+------------------+

But when I try to create a VLAN network, using the command

openstack --debug network create vlan_net --provider-network-type vlan

Response

Starting new HTTP connection (1): neutron-server.openstack.svc.cluster.local
http://neutron-server.openstack.svc.cluster.local:9696 "POST /v2.0/networks HTTP/1.1" 503 153
RESP: [503] Connection: keep-alive Content-Length: 153 Content-Type: application/json Date: Tue, 17 Sep 2019 06:30:00 GMT X-Openstack-Request-Id: req-f911a29d-9a25-4120-b7ac-56849d7e3a20
RESP BODY: {"NeutronError": {"message": "Unable to create the network. No tenant network is available for allocation.", "type": "NoNetworkAvailable", "detail": ""}}
POST call to network for http://neutron-server.openstack.svc.cluster.local:9696/v2.0/networks used request id req-f911a29d-9a25-4120-b7ac-56849d7e3a20
Error while executing command: HttpException: 503, Unable to create the network. No tenant network is available for allocation.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 402, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 116, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/site-packages/openstackclient/network/common.py", line 224, in take_action
    raise exceptions.CommandError(msg)
CommandError: Error while executing command: HttpException: 503, Unable to create the network. No tenant network is available for allocation.
clean_up CreateNetwork: Error while executing command: HttpException: 503, Unable to create the network. No tenant network is available for allocation.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 135, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 281, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 175, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 402, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 116, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/site-packages/openstackclient/network/common.py", line 224, in take_action
    raise exceptions.CommandError(msg)
CommandError: Error while executing command: HttpException: 503, Unable to create the network. No tenant network is available for allocation

Revision history for this message
Ghada Khalil (gkhalil) wrote :

Marking as stx.2.0 / high priority as this is a basic config.

tags: added: stx.2.0 stx.networking
Changed in starlingx:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Assigning to Forrest (networking mgr) to assign to someone in his team to investigate

Changed in starlingx:
assignee: nobody → Forrest Zhao (forrest.zhao)
Changed in starlingx:
assignee: Forrest Zhao (forrest.zhao) → YaoLe (yaole)
Revision history for this message
YaoLe (yaole) wrote :

Hi,GUPTA

Can you show your command to create the vlan network.

And maybe you can do as following steps:

#Check if the application has been re-applied successfully.
system application-list

#Check the neutron OVS agents are initialized correctly
kubectl -n openstack get pod | grep neutron

#Create a vlan network connected to the vlan datanetwork.
export OS_CLOUD=openstack_helm
ADMINID=`openstack project list | grep admin | awk '{print $2}'`

openstack network create --project ${ADMINID} --provider-network-type=vlan --provider-physical-network=${Your vlan datanetwork name} netvlan

openstack subnet create --project ${ADMINID} netvlan-subnet --network netvlan --subnet-range 192.168.103.0/24

Revision history for this message
Akshay (yadavakshay58) wrote :

Hi YaoLe,

1. The application is applied successfully.
2. OVS agents are up and running.
3. Still getting the same error.

Revision history for this message
Zhang Kunpeng (zhangkunpeng) wrote :

Maybe you need to execute these commands before creating network

Example:

ADMINID=`openstack project list | grep admin | awk '{print $2}'`
PHYSNET0='physnet0'

openstack network segment range create ${PHYSNET0}-a --network-type vlan --physical-network ${PHYSNET0} --minimum 400 --maximum 499 --private --project ${ADMINID}

Revision history for this message
Akshay (yadavakshay58) wrote :

Hi Zhang,

Thanks Zhang, I saw the neutron and ml2 files and I was sure that we need to create it as it is not defined in the files as we generally do while creating the OpenStack setup manually. I did it and it is working fine.

I am able to create vlan network as well only after "network segment range create". Please mention it in the document so it will be easy for people like me. Also we can define it in the ml2 file so that we need not to create it by command just to avoid these type of gaps (only a suggestion).

Revision history for this message
YaoLe (yaole) wrote :

This bug is an issue with steps. So this bug can be marked as invalid.

Changed in starlingx:
status: Triaged → Invalid
Revision history for this message
ANIRUDH GUPTA (anyrude10) wrote :

The bug was related to issue in steps only, but this step is not being mentioned anywhere in the Document.
Hence, it can't be considered as Invalid.
Also, the Document needs to be updated corresponding to the step that needs to be performed.

Revision history for this message
Forrest Zhao (forrest.zhao) wrote :

@YaoLe, please update the documentation accordingly.

Changed in starlingx:
status: Invalid → In Progress
Revision history for this message
YaoLe (yaole) wrote :

Hi, Akshay

Which is the document you have seen to setup your vlan network with wrongs.

I will check and update the documentation accordingly.

Thanks

Revision history for this message
ANIRUDH GUPTA (anyrude10) wrote :

Hi YaoLe,

https://docs.starlingx.io/deploy_install_guides/r2_release/virtual/aio_simplex_install_kubernetes.html

This is the link which I was following for Simplex Virtual Release 2.0

There is no reference of newtork segment range create command, due to which VLAN network was not being created.

Under section "Configure controller-0" Step 4 where we are Configuring data interfaces, this command needs to be added.

Similarly in all the variants, this command needs to be updated Under section "Configure controller-0" Step 4 where we are Configuring data interfaces. Be it in Simplex Virtual, Simplex Bare Metal, Duplex Virtual, Duplex Baremetal

Revision history for this message
YaoLe (yaole) wrote :

Hi, GUPTA

The docunment in
https://docs.starlingx.io/deploy_install_guides/r2_release/virtual/aio_simplex_install_kubernetes.html
is only the guide to configure data interfaces for controller-0

And the network create is the issues with OpenStack, and the docs of OpenStack
https://docs.openstack.org/ocata/networking-guide/deploy-lb-provider.html#create-initial-networks
shows the correct steps to create openstack network. Although it's not clear, but it mentioned in note that
"
To create a VLAN network instead of a flat network, change --provider:network_type flat to --provider-network-type vlan and add --provider-segment with a value referencing the VLAN ID.
"

And the clearly steps guide to setup vlan network can be seen on
https://wiki.openstack.org/wiki/StarlingX/Networking#Useful_Networking_Commands

You can follow the guide in tag:"Pass through a physical NIC to VM by binding a port with vnic_type direct_physical to the VM."
It include the steps to create vlan network.

YaoLe (yaole)
Changed in starlingx:
status: In Progress → Invalid
Revision history for this message
AlexFeng (fsh201) wrote :

I have get the same problem,and work fine accorss above steps,than you!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.