openstack network create: bad request (HTTP 400)

asked 2017-06-21 04:54:38 -0500

Wintermute gravatar image

updated 2017-06-21 06:15:48 -0500


I am new to OpenStack (sorry) and I am trying to configure it to be used with Open Source MANO ( I have installed the DevStack distribution on a Ubuntu 16.02.4 VM (VirtualBox). There is a step for creating a management network, so I entered the following command using openstack CLI (neutron seems to be deprecated):

openstack network create mgmt --provider-network-type vlan --provider-physical-network physnet_em1 --provider-segment 500 --share

But I have this error message:

Error while executing command: Bad Request (HTTP 400) (Request-ID: ...)

Before ending up with this, I made source openrc in the devstack folder because there was an issue with auth_url.

Is there a problem with environment variables OS_* or something else?


Here is the openrc file:

#!/usr/bin/env bash
# source openrc [username] [projectname]
# Configure a set of credentials for $PROJECT/$USERNAME:
#   Set OS_PROJECT_NAME to override the default project 'demo'
#   Set OS_USERNAME to override the default user name 'demo'
#   Set ADMIN_PASSWORD to set the password for 'admin' and 'demo'

# NOTE: support for the old NOVA_* novaclient environment variables has
# been removed.

if [[ -n "$1" ]]; then
if [[ -n "$2" ]]; then

# Find the other rc files
RC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)

# Import common functions
source $RC_DIR/functions

# Load local configuration
source $RC_DIR/stackrc

# Load the last env variables if available
if [[ -r $RC_DIR/.stackenv ]]; then
    source $RC_DIR/.stackenv

# Get some necessary configuration
source $RC_DIR/lib/tls

# The OpenStack ecosystem has standardized the term **project** as the
# entity that owns resources.  In some places **tenant** remains
# referenced, but in all cases this just means **project**.  We will
# warn if we need to turn on legacy **tenant** support to have a
# working environment.

echo "WARNING: setting legacy OS_TENANT_NAME to support cli tools."

# In addition to the owning entity (project), nova stores the entity performing
# the action as the **user**.

# With Keystone you pass the keystone password instead of an api key.
# Recent versions of novaclient use OS_PASSWORD instead of NOVA_API_KEYs

# Region

# Set the host API endpoint. This will default to HOST_IP if SERVICE_IP_VERSION
# is 4, else HOST_IPV6 if it's 6. SERVICE_HOST may also be used to specify the
# endpoint, which is convenient for some localrc configurations. Additionally,
# some exercises call Glance directly. On a single-node installation, Glance
# should be listening on a local IP address, depending on the setting of
# SERVICE_IP_VERSION. If its running elsewhere, it can be set here.
if [[ $SERVICE_IP_VERSION == 6 ]]; then

# Identity API version

# Ask keystoneauth1 to use keystone
export OS_AUTH_TYPE=password

# Authenticating against an OpenStack cloud using Keystone returns a **Token**
# and **Service Catalog**.  The catalog contains the endpoints for all services
# the user/project has access to - including ...
edit retag flag offensive close merge delete


Can you give your file? By the way as per my experiance either the problem is in openrc file or the configuration file whether authentication url is defined properly or not.

avinash_k_singh gravatar imageavinash_k_singh ( 2017-06-21 06:09:14 -0500 )edit

400 means user error, and I wonder if your provider parameters are correct?

You could run the command with the --debug option to see more clearly.

Otherwise, use the request ID to find relevant messages in the log files.

Bernd Bausch gravatar imageBernd Bausch ( 2017-06-21 06:22:25 -0500 )edit

I ran the command with --debug and got this message:

RESP BODY: {"NeutronError": {"message": "Invalid input for operation: physical_network 'physnet_em1' unknown for VLAN provider network.", "type": "InvalidInput", "detail": ""}}

Should I record the provider parameters in a configuration file?

Wintermute gravatar imageWintermute ( 2017-06-21 07:37:08 -0500 )edit

Yes, exactly! See point 4 in, in case you use Openvswitch. The bridge_mappings parameter defines how the provider network is accessed. You need physnet_em1 before the colon.

Bernd Bausch gravatar imageBernd Bausch ( 2017-06-21 07:47:28 -0500 )edit

2 answers

Sort by » oldest newest most voted

answered 2017-06-21 09:23:18 -0500

Wintermute gravatar image

Thank you Bernd Bausch, I followed the steps in the OpenStack documentation and this site: (

  • modified /opt/stack/neutron/etc/oslo-config-generator/openvswitch_agent.ini:


    bridge_mappings = physnet:br-ex

  • modified /etc/neutron/plugins/ml2/ml2_conf.ini:


    network_vlan_ranges = physnet

Then I rebooted the VM, ran source (file downloaded from the Horizon UI where I logged in as admin) and the command for creating the network worked.

edit flag offensive delete link more

answered 2019-01-19 16:38:26 -0500

amer.hwitat gravatar image

I have an Openstack installation allinone .. but I have configuered the br-ex before the installation is that a reason for this Error , I'm on OSP 13, Red Hat flavor, which is not like the regular RDO OSP, I have tried all the solutions including your solution, but I have payed attention to the fact that br-ex state in ip a command is Unknown , is that a reason ... I can ping in and out the machine ...

have done the plugin.ini and openvswitch_agent.ini and still the same error (400) from openstack CLI , and the same unknow for flat proveder from neutron ...

can you please help me ..

edit flag offensive delete link more


Don’t create an answer when you ask a question. Create a new question instead.

I don’t know much about OSP, but I don’t think it can be installed on a single server.

Did you follow the suggestions I made in June 2017, and what are the results?

Bernd Bausch gravatar imageBernd Bausch ( 2019-01-19 17:02:07 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2017-06-21 04:54:38 -0500

Seen: 5,085 times

Last updated: Jun 21 '17