Ask Your Question
1

Access Denied when creating ext-net thru neutron

asked 2014-06-11 10:19:54 -0500

anonymous user

Anonymous

updated 2014-06-27 12:49:29 -0500

smaffulli gravatar image

I am installing Openstack on the Ubuntu platform:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04 LTS
Release:        14.04
Codename:       trusty

I am at the stage of creating the external network. There are no errors in neutron's server.log, but the command does not succeed.

http://docs.openstack.org/trunk/install-guide/install/apt/content/basics-neutron-networking-verify.html

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://os-controller: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": "somepass"}}}'

DEBUG: neutronclient.client throwing ConnectionFailed : (403, 'Access Denied')
ERROR: neutronclient.shell Connection to neutron failed: (403, 'Access Denied')
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/neutronclient/shell.py", line 526, in run_subcommand
    return run_command(cmd, cmd_parser, sub_argv)
  File "/usr/lib/python2.7/dist-packages/neutronclient/shell.py", line 79, in run_command
    return cmd.run(known_args)
  File "/usr/lib/python2.7/dist-packages/neutronclient/common/command.py", line 34, in run
    return super(OpenStackCommand, self).run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 84, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/dist-packages/neutronclient/common/command.py", line 40, in take_action
    return self.get_data(parsed_args)
  File "/usr/lib/python2.7/dist-packages/neutronclient/neutron/v2_0/__init__.py", line 410, in get_data
    neutron_client = self.get_client()
  File "/usr/lib/python2.7/dist-packages/neutronclient/neutron/v2_0/__init__.py", line 350, in get_client
    return self.app.client_manager.neutron
  File "/usr/lib/python2.7/dist-packages/neutronclient/common/clientmanager.py", line 40, in __get__
    self._handle = self.factory(instance)
  File "/usr/lib/python2.7/dist-packages/neutronclient/neutron/client.py", line 36, in make_client
    instance.initialize()
  File "/usr/lib/python2.7/dist-packages/neutronclient/common/clientmanager.py", line 94, in initialize
    httpclient.authenticate()
  File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 239, in authenticate
    content_type="application/json")
  File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 154, in _cs_request
    raise exceptions.ConnectionFailed(reason=e)
ConnectionFailed: Connection to neutron failed: (403, 'Access Denied')
DEBUG: neutronclient.shell clean_up CreateNetwork
DEBUG: neutronclient.shell Got an error: Connection to neutron failed: (403, 'Access Denied')

If I run the above curl command manaully, i successfully get a token. I have checked all config files for mistakes & leading/trailing spaces. Not sure where to go from here.

edit retag flag offensive close merge delete

Comments

Restart neutron.

SGPJ ( 2014-06-19 03:47:57 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-06-27 07:31:49 -0500

akshay-thakare gravatar image

updated 2014-06-27 12:51:03 -0500

smaffulli gravatar image

I just faced the same problem today morning here's what i did to make it work. Go to /etc/neutron/neutron.conf and check if your id is there or no in nova_admin_tenant_id. Mine looks like

nova_admin_tenant_id = 1f2e985adf974065ba7fcfe513a0ec74

Next, open up mysql and go to neutron database and type the following:

mysql> alter table agents engine=innodb;
mysql> CREATE TABLE networkdhcpagentbindings (network_id VARCHAR(36) NOT NULL, dhcp_agent_id
VARCHAR(36) NOT NULL, PRIMARY KEY (network_id, dhcp_agent_id), FOREIGN KEY(network_id) REFERENCES
networks (id) ON DELETE CASCADE, FOREIGN KEY(dhcp_agent_id) REFERENCES agents (id) ON DELETE CASCADE)ENGINE=InnoDB;
mysql> show create table agents;

The above query should now show the table agent as InnoDB and not MyISAM

edit flag offensive delete link more

Comments

That looks like a bug to me. Have you filed a defect against Ubuntu's package?

smaffulli ( 2014-07-16 11:00:16 -0500 )edit
0

answered 2014-07-16 01:54:25 -0500

vances gravatar image

Yes, this solved it for me:

mysql> alter table agents engine=innodb;

CentOS 6.5

2.6.32-431.20.3.el6.x86_64

mysql Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Get to know Ask OpenStack

Resources for moderators

Question Tools

Follow
2 followers

Stats

Asked: 2014-06-11 10:19:54 -0500

Seen: 508 times

Last updated: Jun 27 '14