Devstack / Quantum / Security Groups

Asked by Coulin Jean-Luc

Hello All,

I try to get Devstack / Quantum with NEC plugin working.

Currently I can create networks and the NEC PFC creates them on its side.

When I try to go launch an instance from Horizon I get an error "Error: An error occurred. Please try again" !

I found somewhere in the logs that there is a trouble with the security groups.

If I issue the nova secgroup-list command line I get :
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-28840a89-f1d6-49de-a030-d95716234838)

Then If I try the quantum command line : quantum -v security-group-list
I get :
DEBUG: quantumclient.quantum.v2_0.securitygroup.ListSecurityGroup get_data(Namespace(columns=[], fields=[], formatter='table', page_size=None, quote_mode='nonnumeric', request_format='json', show_details=False, sort_dir=[], sort_key=[]))
DEBUG: quantumclient.client
REQ: curl -i http://10.10.10.10:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-quantumclient" -d '{"auth": {"tenantName": "demo", "passwordCredentials": {"username": "admin", "password": "nw4cloud"}}}'

DEBUG: quantumclient.client RESP:{'date': 'Tue, 02 Apr 2013 09:57:39 GMT', 'vary': 'X-Auth-Token', 'content-length': '6538', 'status': '200', 'content-type': 'application/json'} {"access": {"token": {"issued_at": "2013-04-02T09:57:39.367054", "expires": "2013-04-03T09:57:39Z", "id": "MIILew ... cut to reduce the output length... mvgow", "tenant": {"description": null, "enabled": true, "id": "2e3091c87bbd46f7801bcdc0f73b7a00", "name": "demo"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://10.10.10.10:8774/v2/2e3091c87bbd46f7801bcdc0f73b7a00", "region": "RegionOne", "internalURL": "http://10.10.10.10:8774/v2/2e3091c87bbd46f7801bcdc0f73b7a00", "id": "b50eb0bdadca4a2eae45121c3d9658f8", "publicURL": "http://10.10.10.10:8774/v2/2e3091c87bbd46f7801bcdc0f73b7a00"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://10.10.10.10:9696/", "region": "RegionOne", "internalURL": "http://10.10.10.10:9696/", "id": "00c2a1ef75944c3395fb2bea53a3bb66", "publicURL": "http://10.10.10.10:9696/"}], "endpoints_links": [], "type": "network", "name": "quantum"}, {"endpoints": [{"adminURL": "http://10.10.10.10:3333", "region": "RegionOne", "internalURL": "http://10.10.10.10:3333", "id": "4e8e3d773b424651bf877d279867d4c1", "publicURL": "http://10.10.10.10:3333"}], "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL": "http://10.10.10.10:9292", "region": "RegionOne", "internalURL": "http://10.10.10.10:9292", "id": "4cbb5a011d7e4569a4cb7e9a980af108", "publicURL": "http://10.10.10.10:9292"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://10.10.10.10:8776/v1/2e3091c87bbd46f7801bcdc0f73b7a00", "region": "RegionOne", "internalURL": "http://10.10.10.10:8776/v1/2e3091c87bbd46f7801bcdc0f73b7a00", "id": "6b8461f0caa7478ca6079f564a5c36aa", "publicURL": "http://10.10.10.10:8776/v1/2e3091c87bbd46f7801bcdc0f73b7a00"}], "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": [{"adminURL": "http://10.10.10.10:8773/services/Admin", "region": "RegionOne", "internalURL": "http://10.10.10.10:8773/services/Cloud", "id": "0a6641c8df314ca89a4680bb70b860fd", "publicURL": "http://10.10.10.10:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://10.10.10.10:35357/v2.0", "region": "RegionOne", "internalURL": "http://10.10.10.10:5000/v2.0", "id": "026eef3239a941689ca6f4bf4882f78c", "publicURL": "http://10.10.10.10:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "3a2ef1e5af004121b7f820254808e6c6", "roles": [{"name": "admin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["3e62bb7a12a6413292eb3e3a346bc749"]}}}

DEBUG: quantumclient.client
REQ: curl -i http://10.10.10.10:9696/v2.0/security-groups.json -X GET -H "User-Agent: python-quantumclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: MIIL ... cut to reduce the message length ...fmvgow"

DEBUG: quantumclient.client RESP:{'date': 'Tue, 02 Apr 2013 09:57:39 GMT', 'status': '404', 'content-length': '52', 'content-type': 'text/plain; charset=UTF-8'} 404 Not Found

The resource could not be found.

DEBUG: quantumclient.v2_0.client Error message: 404 Not Found

The resource could not be found.

ERROR: quantumclient.shell 404 Not Found

The resource could not be found.

DEBUG: quantumclient.shell clean_up ListSecurityGroup
DEBUG: quantumclient.shell got an error: 404 Not Found

Here is my endpoint list :
keystone endpoint-list
+----------------------------------+-----------+--------------------------------------------+--------------------------------------------+--------------------------------------------+----------------------------------+
| id | region | publicurl | internalurl | adminurl | service_id |
+----------------------------------+-----------+--------------------------------------------+--------------------------------------------+--------------------------------------------+----------------------------------+
| 1ff81daa4c2540f9b92c5eb0ba7d2141 | RegionOne | http://10.10.10.10:8776/v1/$(tenant_id)s | http://10.10.10.10:8776/v1/$(tenant_id)s | http://10.10.10.10:8776/v1/$(tenant_id)s | 2a7c555d1aba4237957fdb6eec63c045 |
| 3ecbae4df219473fbc63cecc40ff97c9 | RegionOne | http://10.10.10.10:9292 | http://10.10.10.10:9292 | http://10.10.10.10:9292 | 62542effb7e441d8a9e2a4e0c65fbd23 |
| 63e3a37a30f9467294317f652a910bcc | RegionOne | http://10.10.10.10:8773/services/Cloud | http://10.10.10.10:8773/services/Cloud | http://10.10.10.10:8773/services/Admin | 15e9f0896e724eefa79a84bdad794f88 |
| 9c4d55dbbdb942cc8687e01b15c5a2b5 | RegionOne | http://10.10.10.10:8774/v2/$(tenant_id)s | http://10.10.10.10:8774/v2/$(tenant_id)s | http://10.10.10.10:8774/v2/$(tenant_id)s | 4ced9dbd43af4883bc80f684a9d8f553 |
| a0dc0e0c0ae947f089af14922fca40e5 | RegionOne | http://10.10.10.10:3333 | http://10.10.10.10:3333 | http://10.10.10.10:3333 | 580980744556472a9e1edc4db0351c70 |
| e32493080a1a457db14b43ac71f04d2a | RegionOne | http://10.10.10.10:9696/ | http://10.10.10.10:9696/ | http://10.10.10.10:9696/ | 73b887e4b0df41fca1cadff139d42ca8 |
| eb9d0441c75847b7be22fcc2cbe12bce | RegionOne | http://10.10.10.10:5000/v2.0 | http://10.10.10.10:5000/v2.0 | http://10.10.10.10:35357/v2.0 | 809495bb855f4f09a9bab2c7d0456d2b |
+----------------------------------+-----------+--------------------------------------------+--------------------------------------------+--------------------------------------------+----------------------------------+

I don't figure out how the url of the security group endpoint get a v2.0 ???

Any help will be appreciated.

Question information

Language:
English Edit question
Status:
Solved
For:
neutron Edit question
Assignee:
No assignee Edit question
Solved by:
Coulin Jean-Luc
Solved:
Last query:
Last reply:
Revision history for this message
Eugene Nikanorov (enikanorov) said :
#1

Can you post /etc/quantum/quantum.conf as well as a piece of logs of quantum server at the moment when you send this request?

Revision history for this message
Coulin Jean-Luc (jean-luc-coulin) said :
#2

Here are some configuration files

quantum.conf file :
[DEFAULT]
auth_strategy = keystone
allow_overlapping_ips = True
policy_file = /etc/quantum/policy.json
debug = True
verbose = True
# ******* Modif NEC *******
# core_plugin = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2
core_plugin = quantum.plugins.nec.nec_plugin.NECPluginV2
# ******* FIN Modif NEC *******
rabbit_password = passwd
rabbit_host = localhost
rpc_backend = quantum.openstack.common.rpc.impl_kombu
state_path = /opt/stack/data/quantum
# Default log level is INFO
# verbose and debug has the same result.
# One of them will set DEBUG log level output
# debug = False
# verbose = False

# Where to store Quantum state files. This directory must be writable by the
# user executing the agent.
# state_path = /var/lib/quantum

# Where to store lock files
lock_path = $state_path/lock

# log_format = %(asctime)s %(levelname)8s [%(name)s] %(message)s
# log_date_format = %Y-%m-%d %H:%M:%S

# use_syslog -> syslog
# log_file and log_dir -> log_dir/log_file
# (not log_file) and log_dir -> log_dir/{binary_name}.log
# use_stderr -> stderr
# (not user_stderr) and (not log_file) -> stdout
# publish_errors -> notification system

# use_syslog = False
# syslog_log_facility = LOG_USER

# use_stderr = True
# log_file =
# log_dir =

# publish_errors = False

# Address to bind the API server
bind_host = 0.0.0.0

# Port the bind the API server to
bind_port = 9696

# Path to the extensions. Note that this can be a colon-separated list of
# paths. For example:
# api_extensions_path = extensions:/path/to/more/extensions:/even/more/extensions
# The __path__ of quantum.extensions is appended to this, so if your
# extensions are in there you don't need to specify them here
# api_extensions_path =
# ******* Modif NEC *******
api_extensions_path = /opt/stack/quantum/quantum/plugins/nec/extensions/
# ******* FIN Modif NEC *******

# Quantum plugin provider module
# core_plugin =

# Advanced service modules
# service_plugins =

# Paste configuration file
api_paste_config = api-paste.ini

# The strategy to be used for auth.
# Supported values are 'keystone'(default), 'noauth'.
# auth_strategy = keystone

# Base MAC address. The first 3 octets will remain unchanged. If the
# 4h octet is not 00, it will also used. The others will be
# randomly generated.
# 3 octet
# base_mac = fa:16:3e:00:00:00
# 4 octet
# base_mac = fa:16:3e:4f:00:00

# Maximum amount of retries to generate a unique MAC address
# mac_generation_retries = 16

# DHCP Lease duration (in seconds)
# dhcp_lease_duration = 120

# Allow sending resource operation notification to DHCP agent
# dhcp_agent_notification = True

# Enable or disable bulk create/update/delete operations
# allow_bulk = True
# Enable or disable pagination
# allow_pagination = False
# Enable or disable sorting
# allow_sorting = False
# Enable or disable overlapping IPs for subnets
# Attention: the following parameter MUST be set to False if Quantum is
# being used in conjunction with nova security groups and/or metadata service.
# allow_overlapping_ips = False
# Ensure that configured gateway is on subnet
# force_gateway_on_subnet = False

# RPC configuration options. Defined in rpc __init__
# The messaging module to use, defaults to kombu.
# rpc_backend = quantum.openstack.common.rpc.impl_kombu
# Size of RPC thread pool
# rpc_thread_pool_size = 64,
# Size of RPC connection pool
# rpc_conn_pool_size = 30
# Seconds to wait for a response from call or multicall
# rpc_response_timeout = 60
# Seconds to wait before a cast expires (TTL). Only supported by impl_zmq.
# rpc_cast_timeout = 30
# Modules of exceptions that are permitted to be recreated
# upon receiving exception data from an rpc call.
# allowed_rpc_exception_modules = quantum.openstack.common.exception, nova.exception
# AMQP exchange to connect to if using RabbitMQ or QPID
control_exchange = quantum

# If passed, use a fake RabbitMQ provider
# fake_rabbit = False

# Configuration options if sending notifications via kombu rpc (these are
# the defaults)
# SSL version to use (valid only if SSL enabled)
# kombu_ssl_version =
# SSL key file (valid only if SSL enabled)
# kombu_ssl_keyfile =
# SSL cert file (valid only if SSL enabled)
# kombu_ssl_certfile =
# SSL certification authority file (valid only if SSL enabled)'
# kombu_ssl_ca_certs =
# IP address of the RabbitMQ installation
# rabbit_host = localhost
# Password of the RabbitMQ server
# rabbit_password = guest
# Port where RabbitMQ server is running/listening
# rabbit_port = 5672
# User ID used for RabbitMQ connections
# rabbit_userid = guest
# Location of a virtual RabbitMQ installation.
# rabbit_virtual_host = /
# Maximum retries with trying to connect to RabbitMQ
# (the default of 0 implies an infinite retry count)
# rabbit_max_retries = 0
# RabbitMQ connection retry interval
# rabbit_retry_interval = 1

# QPID
# rpc_backend=quantum.openstack.common.rpc.impl_qpid
# Qpid broker hostname
# qpid_hostname = localhost
# Qpid broker port
# qpid_port = 5672
# Username for qpid connection
# qpid_username = ''
# Password for qpid connection
# qpid_password = ''
# Space separated list of SASL mechanisms to use for auth
# qpid_sasl_mechanisms = ''
# Seconds between connection keepalive heartbeats
# qpid_heartbeat = 60
# Transport to use, either 'tcp' or 'ssl'
# qpid_protocol = tcp
# Disable Nagle algorithm
# qpid_tcp_nodelay = True

# ZMQ
# rpc_backend=quantum.openstack.common.rpc.impl_zmq
# ZeroMQ bind address. Should be a wildcard (*), an ethernet interface, or IP.
# The "host" option should point or resolve to this address.
# rpc_zmq_bind_address = *

# ============ Notification System Options =====================

# Notifications can be sent when network/subnet/port are create, updated or deleted.
# There are three methods of sending notifications: logging (via the
# log_file directive), rpc (via a message queue) and
# noop (no notifications sent, the default)

# Notification_driver can be defined multiple times
# Do nothing driver
# notification_driver = quantum.openstack.common.notifier.no_op_notifier
# Logging driver
# notification_driver = quantum.openstack.common.notifier.log_notifier
# RPC driver. DHCP agents needs it.
notification_driver = quantum.openstack.common.notifier.rpc_notifier

# default_notification_level is used to form actual topic name(s) or to set logging level
default_notification_level = INFO

# default_publisher_id is a part of the notification payload
# host = myhost.com
# default_publisher_id = $host

# Defined in rpc_notifier, can be comma separated values.
# The actual topic names will be %s.%(default_notification_level)s
notification_topics = notifications

# Default maximum number of items returned in a single response,
# value == infinite and value < 0 means no max limit, and value must
# greater than 0. If the number of items requested is greater than
# pagination_max_limit, server will just return pagination_max_limit
# of number of items.
# pagination_max_limit = -1

# Maximum number of DNS nameservers per subnet
# max_dns_nameservers = 5

# Maximum number of host routes per subnet
# max_subnet_host_routes = 20

# Maximum number of fixed ips per port
# max_fixed_ips_per_port = 5

# =========== items for agent management extension =============
# Seconds to regard the agent as down.
# agent_down_time = 5
# =========== end of items for agent management extension =====

# =========== items for agent scheduler extension =============
# Driver to use for scheduling network to DHCP agent
# network_scheduler_driver = quantum.scheduler.dhcp_agent_scheduler.ChanceScheduler
# Driver to use for scheduling router to a default L3 agent
# router_scheduler_driver = quantum.scheduler.l3_agent_scheduler.ChanceScheduler

# Allow auto scheduling networks to DHCP agent. It will schedule non-hosted
# networks to first DHCP agent which sends get_active_networks message to
# quantum server
# network_auto_schedule = True

# Allow auto scheduling routers to L3 agent. It will schedule non-hosted
# routers to first L3 agent which sends sync_routers message to quantum server
# router_auto_schedule = True
# =========== end of items for agent scheduler extension =====

[QUOTAS]
# resource name(s) that are supported in quota features
# quota_items = network,subnet,port

# default number of resource allowed per tenant, minus for unlimited
# default_quota = -1

# number of networks allowed per tenant, and minus means unlimited
# quota_network = 10

# number of subnets allowed per tenant, and minus means unlimited
# quota_subnet = 10

# number of ports allowed per tenant, and minus means unlimited
# quota_port = 50

# default driver to use for quota checks
# quota_driver = quantum.quota.ConfDriver

[DEFAULT_SERVICETYPE]
# Description of the default service type (optional)
# description = "default service type"
# Enter a service definition line for each advanced service provided
# by the default service type.
# Each service definition should be in the following format:
# <service>:<plugin>[:driver]

[AGENT]
root_helper = sudo /usr/local/bin/quantum-rootwrap /etc/quantum/rootwrap.conf
# Use "sudo quantum-rootwrap /etc/quantum/rootwrap.conf" to use the real
# root filter facility.
# Change to "sudo" to skip the filtering and just run the comand directly
# root_helper = sudo

# =========== items for agent management extension =============
# seconds between nodes reporting state to server, should be less than
# agent_down_time
# report_interval = 4

# =========== end of items for agent management extension =====

[keystone_authtoken]
auth_host = 10.10.10.10
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = quantum
admin_password = passwd
signing_dir = /var/cache/quantum

************* End of quantum.conf **********************

nova.conf file :
[DEFAULT]
firewall_driver = nova.virt.firewall.NoopFirewallDriver
compute_driver = libvirt.LibvirtDriver
service_quantum_metadata_proxy = True
linuxnet_interface_driver =
libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver
security_group_api = quantum
quantum_url = http://10.10.10.10:9696
quantum_admin_tenant_name = service
quantum_auth_strategy = keystone
quantum_admin_auth_url = http://10.10.10.10:35357/v2.0
quantum_admin_password = passwd
quantum_admin_username = quantum
network_api_class = nova.network.quantumv2.api.API
glance_api_servers = 10.10.10.10:9292
rabbit_password = passwd
rabbit_host = localhost
rpc_backend = nova.openstack.common.rpc.impl_kombu
ec2_dmz_host = 10.10.10.10
vncserver_proxyclient_address = 127.0.0.1
vncserver_listen = 127.0.0.1
vnc_enabled = true
xvpvncproxy_base_url = http://10.10.10.10:6081/console
novncproxy_base_url = http://10.10.10.10:6080/vnc_auto.html
logging_exception_prefix = %(color)s%(asctime)s.%(msecs)03d TRACE %(name)s %(instance)s
logging_debug_format_suffix = from (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d
logging_default_format_string = %(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [-%(color)s] %(instance)s%(color)s%(message)s
logging_context_format_string = %(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [%(request_id)s %(user_name)s %(project_name)s%(color)s] %(instance)s%(color)s%(message)s
send_arp_for_ha = True
multi_host = True
instances_path = /opt/stack/data/nova/instances
lock_path = /opt/stack/data/nova
state_path = /opt/stack/data/nova
volume_api_class = nova.volume.cinder.API
enabled_apis = ec2,osapi_compute,metadata
instance_name_template = instance-%08x
libvirt_cpu_mode = none
libvirt_type = kvm
sql_connection = mysql://root:passwd@localhost/nova?charset=utf8
my_ip = 10.10.10.10
osapi_compute_extension = nova.api.openstack.compute.contrib.standard_extensions
s3_port = 3333
s3_host = 10.10.10.10
default_floating_pool = nova
fixed_range =
force_dhcp_release = True
dhcpbridge_flagfile = /etc/nova/nova.conf
compute_scheduler_driver = nova.scheduler.simple.SimpleScheduler
rootwrap_config = /etc/nova/rootwrap.conf
api_paste_config = /etc/nova/api-paste.ini
allow_resize_to_same_host = True
auth_strategy = keystone
debug = True
verbose = True

[spice]
enabled = false
html5proxy_base_url = http://10.10.10.10:6082/spice_auto.html

************* End of nova.conf **********************

nec.ini file :
# Sample Configurations

[DATABASE]
# This line MUST be changed to actually run the plugin.
# Example:
# sql_connection = mysql://root:nova@127.0.0.1:3306/ovs_quantum
# Replace 127.0.0.1 above with the IP address of the database used by the
# main quantum server. (Leave it as is if the database runs on this host.)
sql_connection = mysql://root:passwd@localhost/quantum_nec?charset=utf8
# Database reconnection retry times - in event connectivity is lost
# set to -1 implies an infinite retry count
# sql_max_retries = 10
# Database reconnection interval in seconds - if the initial connection to the
# database fails
reconnect_interval = 2
# Enable the use of eventlet's db_pool for MySQL. The flags sql_min_pool_size,
# sql_max_pool_size and sql_idle_timeout are relevant only if this is enabled.
# sql_dbpool_enable = False
# Minimum number of SQL connections to keep open in a pool
# sql_min_pool_size = 1
# Maximum number of SQL connections to keep open in a pool
# sql_max_pool_size = 5
# Timeout in seconds before idle sql connections are reaped
# sql_idle_timeout = 3600

[OVS]
# Do not change this parameter unless you have a good reason to.
# This is the name of the OVS integration bridge. There is one per hypervisor.
# The integration bridge acts as a virtual "patch port". All VM VIFs are
# attached to this bridge and then "patched" according to their network
# connectivity.
integration_bridge = br-int

[AGENT]
# Agent's polling interval in seconds
polling_interval = 2
# Use "sudo quantum-rootwrap /etc/quantum/rootwrap.conf" to use the real
# root filter facility.
# Change to "sudo" to skip the filtering and just run the comand directly
root_helper = sudo /usr/local/bin/quantum-rootwrap /etc/quantum/rootwrap.conf

[OFC]
api_retry_interval = OFC_RETRY_INTERVAL
api_retry_max = OFC_RETRY_MAX
# Specify OpenFlow Controller Host, Port and Driver to connect.
host = 10.10.10.57
port = 8888
# Drivers are in quantum/plugins/nec/drivers/ .
driver = pfc_v4
# PacketFilter is available when it's enabled in this configuration
# and supported by the driver.
enable_packet_filter = true

************* End of nec.ini **********************

Thank you for your help.

Revision history for this message
Coulin Jean-Luc (jean-luc-coulin) said :
#3

Hello, no one has idea(s) ?

Revision history for this message
Coulin Jean-Luc (jean-luc-coulin) said :
#4

It seems to be a NEC plugin trouble.

When I use the OVS plugins, everything works !!

Revision history for this message
Coulin Jean-Luc (jean-luc-coulin) said :
#5

I found the trouble.

I don't know why, but devstack/lib/quantum_plugin/nec was not in the devstack tree !!?

A new git clone solved my problem.