Ask Your Question
1

Unable to create net-create ext-net Failed to read some config files: /etc/neutron/plugin.ini [closed]

asked 2014-10-08 00:43:37 -0500

updated 2014-10-13 05:22:32 -0500

smaffulli gravatar image

Hi Experts,

After neutron configuration,, I am getting below error while executing command to create external network on my controller node. Please guide me to fix this issue..

@control ~]# neutron --debug net-create ext-net --shared --router:external=True
DEBUG: neutronclient.neutron.v2_0.network.CreateNetwork get_data(Namespace(admin_state=True, columns=[], formatter='table', name=u'ext-net', prefix='', request_format='json', shared=True, tenant_id=None, variables=[]))
DEBUG: neutronclient.client
REQ: curl -i http://control:35357/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-neutronclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "labs123"}}}'

DEBUG: neutronclient.client RESP:{'date': 'Wed, 08 Oct 2014 05:38:43 GMT', 'vary': 'X-Auth-Token', 'content-length': '143', 'status': '500', 'content-type': 'application/json'} {"error": {"message": "An unexpected error prevented the server from fulfilling your request.", "code": 500, "title": "Internal Server Error"}}

ERROR: neutronclient.shell {"error": {"message": "An unexpected error prevented the server from fulfilling your request.", "code": 500, "title": "Internal Server Error"}}
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/neutronclient/shell.py", line 526, in run_subcommand
    return run_command(cmd, cmd_parser, sub_argv)
  File "/usr/lib/python2.6/site-packages/neutronclient/shell.py", line 79, in run_command
    return cmd.run(known_args)
  File "/usr/lib/python2.6/site-packages/neutronclient/common/command.py", line 34, in run
    return super(OpenStackCommand, self).run(parsed_args)
  File "/usr/lib/python2.6/site-packages/cliff/display.py", line 84, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.6/site-packages/neutronclient/common/command.py", line 40, in take_action
    return self.get_data(parsed_args)
  File "/usr/lib/python2.6/site-packages/neutronclient/neutron/v2_0/__init__.py", line 410, in get_data
    neutron_client = self.get_client()
  File "/usr/lib/python2.6/site-packages/neutronclient/neutron/v2_0/__init__.py", line 350, in get_client
    return self.app.client_manager.neutron
  File "/usr/lib/python2.6/site-packages/neutronclient/common/clientmanager.py", line 40, in __get__
    self._handle = self.factory(instance)
  File "/usr/lib/python2.6/site-packages/neutronclient/neutron/client.py", line 36, in make_client
    instance.initialize()
  File "/usr/lib/python2.6/site-packages/neutronclient/common/clientmanager.py", line 94, in initialize
    httpclient.authenticate()
  File "/usr/lib/python2.6/site-packages/neutronclient/client.py", line 244, in authenticate
    raise exceptions.Unauthorized(message=resp_body)
Unauthorized: {"error": {"message": "An unexpected error prevented the server from fulfilling your request.", "code": 500, "title": "Internal Server Error"}}
DEBUG: neutronclient.shell clean_up CreateNetwork
DEBUG: neutronclient.shell Got an error: {"error": {"message": "An unexpected error prevented the server from fulfilling your request.", "code": 500, "title": "Internal Server Error"}}

I am still getting DB synch error..

[root@control ~]# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head" neutron
Traceback (most recent call last):
  File "/usr/bin/neutron-db-manage", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.6/site-packages/neutron/db/migration/cli.py", line 166, in main
    CONF()
  File "/usr/lib/python2.6/site-packages/oslo/config/cfg.py", line 1638, in __call__
    raise ConfigFilesNotFoundError(self._namespace.files_not_found)
oslo.config.cfg.ConfigFilesNotFoundError: Failed to read some config files: /etc/neutron/plugin.ini ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Pradipta_OS_M
close date 2015-01-10 11:46:57.742770

Comments

Could you post ovs-vsctl show

dbaxps gravatar imagedbaxps ( 2014-10-08 05:34:52 -0500 )edit

4 answers

Sort by ยป oldest newest most voted
2

answered 2014-10-08 01:55:47 -0500

RHK gravatar image

updated 2014-10-13 00:03:51 -0500

Hi Pradip,

Are you able to create tenants from keystone?

Once check the neutron configuration mysql section, also check the connectivity to mysql server and check permissions to neutron user correctly.

neutron net-create --tenant-id $put_id_of_admin_tenant ext_net --router:external=True

Let me know the issue fixed or not.

# # # # # # # # #

Try this,

Install the Neutron server and the OpenVSwitch packages

apt-get install -y neutron-server neutron-plugin-ml2

Create a MySql database for Neutron

mysql -u root -p
CREATE DATABASE neutron;
GRANT ALL PRIVILEGES ON neutron.* TO neutron@'localhost' IDENTIFIED BY 'NEUTRON_DBPASS';
GRANT ALL PRIVILEGES ON neutron.* TO neutron@'%' IDENTIFIED BY 'NEUTRON_DBPASS';
exit;

Configure service user and role

keystone user-create --name=neutron --pass=service_pass --email=neutron@domain.com
keystone user-role-add --user=neutron --tenant=service --role=admin

Register the service and create the endpoint

keystone service-create --name=neutron --type=network --description="OpenStack Networking"

keystone endpoint-create \
--service-id=$(keystone service-list | awk '/ network / {print $2}') \
--publicurl=http://192.168.100.11:9696 \
--internalurl=http://controller:9696 \
--adminurl=http://controller:9696

Check the neutron configuration with below reference.

vi /etc/neutron/neutron.conf

[database]

replace connection = sqlite:////var/lib/neutron/neutron.sqlite with connection = mysql://neutron:NEUTRON_DBPASS@controller/neutron

[DEFAULT]

replace core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin with core_plugin = ml2 service_plugins = router allow_overlapping_ips = True

auth_strategy = keystone
rpc_backend = neutron.openstack.common.rpc.impl_kombu
rabbit_host = controller

notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True
nova_url = http://controller:8774/v2
nova_admin_username = nova

Replace the SERVICE_TENANT_ID with the output of this command (keystone tenant-list | awk '/ service / { print $2 }')

nova_admin_tenant_id = SERVICE_TENANT_ID
nova_admin_password = service_pass
nova_admin_auth_url = http://controller:35357/v2.0

[keystone_authtoken]

auth_uri = http://controller:5000
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = neutron
admin_password = service_pass

Configure the Modular Layer 2 (ML2) plug-in

vi /etc/neutron/plugins/ml2/ml2_conf.ini

[ml2]

type_drivers = gre
tenant_network_types = gre
mechanism_drivers = openvswitch

[ml2_type_gre]

tunnel_id_ranges = 1:1000

[securitygroup]

firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
enable_security_group = True

Restart the Networking service

service neutron-server restart

Regards,
RHK

edit flag offensive delete link more

Comments

Hi,RHK,

Sorry for the delay....

I could see that I am getting error while synch with mysql db.. also mysql db deamon got stop .. I pasted errors in my main query .. ^^ Please have a look and please sugest me how can I fix it ..

Regards, Pradipta

Pradipta_OS_M gravatar imagePradipta_OS_M ( 2014-10-10 01:05:56 -0500 )edit

Hi RHK,

I have already done with the above commands.. But Can u please help why the mySql DB is got stopped.. and I am unable to loging with my root credential.. I hve pasted the query in above .. Please sugest me why this error are comming. I assume for this issue I m unable to neutron query.

Pradipta_OS_M gravatar imagePradipta_OS_M ( 2014-10-12 21:15:17 -0500 )edit

you can check in MySQL configuration file /etc/my.cnf
socket=/var/lib/mysql/mysql.sock Try this,
service mysql stop
rm -f /var/lib/mysql/mysql.sock
service mysql start
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock

RHK gravatar imageRHK ( 2014-10-12 23:24:59 -0500 )edit

The My SQL DB error have fixed.. But I am unable to start neutron-server.. Please be inform u I m configruning Openstack on CentOS..

I have pasted the error in the bottom of the main query section.. Please have a look and advise

Pradipta_OS_M gravatar imagePradipta_OS_M ( 2014-10-13 01:13:46 -0500 )edit

post the updated neutron logs.

Regards,
RHK

RHK gravatar imageRHK ( 2014-10-13 01:45:48 -0500 )edit
1

answered 2014-10-13 04:57:14 -0500

rahulrajvn gravatar image

The DB sync error shows "Failed to read some config files: /etc/neutron/plugin.ini". Please make sure that the softlink of ml2_conf.ini is made properly.

ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
edit flag offensive delete link more
1

answered 2014-10-13 05:06:55 -0500

dbaxps gravatar image

View http://bderzhavets.blogspot.com/2014/...

[root@icehouse1 neutron(keystone_admin)]# ls -l
total 72
-rw-r--r--. 1 root root      193 Sep 30 17:08 api-paste.ini
-rw-r-----. 1 root neutron  3901 Sep 30 19:19 dhcp_agent.ini
-rw-r--r--. 1 root root       86 Sep 30 19:20 dnsmasq.conf
-rw-r-----. 1 root neutron   208 Sep 30 17:08 fwaas_driver.ini
-rw-r-----. 1 root neutron  3431 Sep 30 17:08 l3_agent.ini
-rw-r-----. 1 root neutron  1400 Aug  8 02:56 lbaas_agent.ini
-rw-r-----. 1 root neutron  1863 Sep 30 17:08 metadata_agent.ini
lrwxrwxrwx. 1 root root       37 Sep 30 18:41 ml2_conf.ini -> /etc/neutron/plugins/ml2/ml2_conf.ini
-rw-r-----. 1 root neutron 19187 Sep 30 17:08 neutron.conf
lrwxrwxrwx. 1 root root       55 Sep 30 18:40 plugin.ini -> /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
-rw-r--r--. 1 root root      211 Sep 30 17:30 plugin.out
drwxr-xr-x. 4 root root     4096 Sep 30 17:08 plugins
-rw-r-----. 1 root neutron  6148 Aug  8 02:56 policy.json
-rw-r--r--. 1 root root       79 Aug 11 15:27 release
-rw-r--r--. 1 root root     1216 Aug  8 02:56 rootwrap.conf

[root@icehouse1 neutron(keystone_admin)]# cat ml2_conf.ini
[ml2]
type_drivers = gre
tenant_network_types = gre
mechanism_drivers = openvswitch
[ml2_type_flat]
[ml2_type_vlan]
[ml2_type_gre]
tunnel_id_ranges = 1:1000
[ml2_type_vxlan]
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
enable_security_group = True
[ovs]
local_ip = 192.168.0.127
[agent]
tunnel_types = gre
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf

[root@icehouse1 neutron(keystone_admin)]# cat plugin.ini
[ml2]
type_drivers = gre
tenant_network_types = gre
mechanism_drivers = openvswitch
[ml2_type_flat]
[ml2_type_vlan]
[ml2_type_gre]
tunnel_id_ranges = 1:1000
[ml2_type_vxlan]
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
enable_security_group = True
[ovs]
local_ip = 192.168.0.127
[agent]
tunnel_types = gre
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
edit flag offensive delete link more
0

answered 2014-10-15 13:08:18 -0500

updated 2014-10-15 13:09:09 -0500

Now this issue I have fixed,, The neutron server didn't started due to configuration issue for the link file..

ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini

Now the server got started and I am able to create the initial network..

@control ~]# neutron net-create ext-net --shared --router:external=True
Created a new network:
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | True                                 |
| id                        | 760febd5-5f21-4783-9e8f-f672bde8f360 |
| name                      | ext-net                              |
| provider:network_type     | gre                                  |
| provider:physical_network |                                      |
| provider:segmentation_id  | 1                                    |
| router:external           | True                                 |
| shared                    | True                                 |
| status                    | ACTIVE                               |
| subnets                   |                                      |
| tenant_id                 | f87792686f494a959c7c312ecba2f233     |
+---------------------------+--------------------------------------+

Please request don't close this issue for this time, Because I am still working on this neutronpart . I will close this once configure network server successfully.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-10-08 00:43:37 -0500

Seen: 2,402 times

Last updated: Oct 15 '14