NSXV - SQL Exception while creating Metadata edges
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vmware-nsx |
New
|
Undecided
|
Unassigned |
Bug Description
M Release, RDO Trunk repo.
CentOS 7, SELinux permissive.
NSX 6.2.4.4292526 (Manager) 6.2.47844 (Controllers)
vSphere 6.x
When attempting to provision edges for metadata proxy appliances it fails at two stages;
I will describe both underneath each other with the respective python dump (apologies for the wall of text already)
=======
It creates a Logical Switch and a Security Group.
It ends with an exception: This session is in 'prepared' state; no further SQL can be emitted within this transaction.
=======
2016-10-22 09:09:30.116 25641 DEBUG oslo_concurrenc
2016-10-22 09:09:30.202 25641 DEBUG oslo_concurrenc
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.266 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.269 25641 ERROR oslo_db.
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.270 25641 ERROR vmware_
2016-10-22 09:09:30.287 25641 DEBUG oslo_concurrenc
2016-10-22 09:09:30.288 25641 DEBUG oslo_concurrenc
2016-10-22 09:09:30.288 25641 ERROR neutron.service [req-1fe2d564-
2016-10-22 09:09:30.288 25641 ERROR neutron.service Traceback (most recent call last):
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service service.start()
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service self.wsgi_app = _run_wsgi(
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service app = config.
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service app = loader.
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return deploy.
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return loadobj(APP, uri, name=name, **kw)
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return context.create()
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return self.object_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service **context.
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service val = callable(*args, **kw)
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service app = loader.
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service name=name, global_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return self.object_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service **context.
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service val = callable(*args, **kw)
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service app = loader.
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service name=name, global_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return self.object_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return fix_call(
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service val = callable(*args, **kw)
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return cls(**local_config)
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service plugin = manager.
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return weakref.
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service cls._create_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return f(*args, **kwargs)
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service cls._instance = cls()
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service plugin_provider)
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return plugin_class()
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return f(*args, **kwargs)
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service nsx_v_md_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service self.proxy_edge_ips = self._get_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service self._setup_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service val = self.waiters.
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return self._exit_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return hubs.get_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return self.greenlet.
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service result = function(*args, **kwargs)
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service self.context, filters=
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib/
2016-10-22 09:09:30.288 25641 ERROR neutron.service for c in query:
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib64/
2016-10-22 09:09:30.288 25641 ERROR neutron.service return self._execute_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib64/
2016-10-22 09:09:30.288 25641 ERROR neutron.service close_with_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib64/
2016-10-22 09:09:30.288 25641 ERROR neutron.service **kw)
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib64/
2016-10-22 09:09:30.288 25641 ERROR neutron.service execution_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib64/
2016-10-22 09:09:30.288 25641 ERROR neutron.service engine, execution_options)
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib64/
2016-10-22 09:09:30.288 25641 ERROR neutron.service self._assert_
2016-10-22 09:09:30.288 25641 ERROR neutron.service File "/usr/lib64/
2016-10-22 09:09:30.288 25641 ERROR neutron.service "This session is in 'prepared' state; no further "
2016-10-22 09:09:30.288 25641 ERROR neutron.service InvalidRequestE
2016-10-22 09:09:30.288 25641 ERROR neutron.service
2016-10-22 09:09:30.290 25641 CRITICAL neutron [req-1fe2d564-
=======
Upon restart it attempts to actually deploy the edge using previously created security group and logical switch but it fails due to a table constraint.
I'ts not unlikely that these two stages relate to each other as both fail due to an SQL issue.
The oddity to me is that only Stage 2 will tell me a meaningful error whereas Stage 1 is just an exception.
If I disable foreign constraint checks it will deploy 'fine'.
=======
2016-10-22 09:12:34.208 2085 ERROR vmware_
2016-10-22 09:12:34.208 2085 ERROR vmware_
2016-10-22 09:12:34.208 2085 ERROR vmware_
2016-10-22 09:12:34.208 2085 ERROR vmware_
2016-10-22 09:12:34.208 2085 ERROR vmware_
2016-10-22 09:12:34.208 2085 ERROR vmware_
2016-10-22 09:12:34.208 2085 ERROR vmware_
2016-10-22 09:12:34.208 2085 ERROR vmware_
2016-10-22 09:12:34.208 2085 ERROR vmware_
2016-10-22 09:12:34.208 2085 ERROR vmware_
2016-10-22 09:12:34.208 2085 ERROR vmware_
2016-10-22 09:12:34.208 2085 ERROR vmware_
2016-10-22 09:12:34.225 2085 ERROR vmware_
ASCADE)') while creating internal edge for metadata service
Ok, just to clarify...
By 'fine' I mean that this happens as well:
After Stage1 completes, Remove the foreign check on the SQL and restart neutron-server
It will start deploying a metadata-proxy edge but throws this stackdump:
2016-10-22 09:53:37.124 20546 DEBUG oslo_concurrenc y.lockutils [req-1152bc36- e2e0-4ea6- a78b-2335a06389 ee - - - - -] Acquired semaphore "nsx-edge-pool" lock /usr/lib/ python2. 7/site- packages/ oslo_concurrenc y/lockutils. py:212 y.lockutils [req-1152bc36- e2e0-4ea6- a78b-2335a06389 ee - - - - -] Releasing semaphore "nsx-edge-pool" lock /usr/lib/ python2. 7/site- packages/ oslo_concurrenc y/lockutils. py:225 nsx.plugins. nsx_v.md_ proxy [-] Exception This transaction is closed while creating internal edge for metadata service nsx.plugins. nsx_v.md_ proxy Traceback (most recent call last): nsx.plugins. nsx_v.md_ proxy File "/usr/lib/ python2. 7/site- packages/ vmware_ nsx/plugins/ nsx_v/md_ proxy.py" , line 385, in _setup_ new_proxy_ edge nsx.plugins. nsx_v.md_ proxy allow_metadata= False) nsx.plugins. nsx_v.md_ proxy File "/usr/lib/ python2. 7/site- packages/ vmware_ nsx/plugins/ nsx_v/plugin. py", line 1569, in create_router nsx.plugins. nsx_v.md_ proxy self._process_ nsx_router_ create( context, router_db, r) nsx.plugins. nsx_v.md_ proxy File "/usr/lib64/ python2. 7/site- packages/ sqlalchemy/ orm/session. py", line 494, in __exit__ nsx.plugins. nsx_v.md_ proxy self._assert_ active( deactive_ ok=True, prepared_ok=True) nsx.plugins. nsx_v.md_ proxy File "/usr/lib64/ python2. 7/site- packages/ sqlalchemy/ orm/session. py", line 223, in _assert_active nsx.plugins. nsx_v.md_ proxy raise sa_exc. ResourceClosedE rror(closed_ msg) nsx.plugins. nsx_v.md_ proxy ResourceClosedE rror: This transaction is closed nsx.plugins. nsx_v.md_ proxy nsx.db. nsxrouter [-] Nsx router extension successfully processed for router: 00e6a406- c1b9-44a9- be02-a50a49926e 05 _process_ nsx_router_ create /usr/lib/ python2. 7/site- packages/ vmware_ nsx/db/ nsxrouter. py:63
2016-10-22 09:53:37.216 20546 DEBUG oslo_concurrenc
2016-10-22 09:53:37.315 20546 ERROR vmware_
2016-10-22 09:53:37.315 20546 ERROR vmware_
2016-10-22 09:53:37.315 20546 ERROR vmware_
2016-10-22 09:53:37.315 20546 ERROR vmware_
2016-10-22 09:53:37.315 20546 ERROR vmware_
2016-10-22 09:53:37.315 20546 ERROR vmware_
2016-10-22 09:53:37.315 20546 ERROR vmware_
2016-10-22 09:53:37.315 20546 ERROR vmware_
2016-10-22 09:53:37.315 20546 ERROR vmware_
2016-10-22 09:53:37.315 20546 ERROR vmware_
2016-10-22 09:53:37.315 20546 ERROR vmware_
2016-10-22 09:53:37.315 20546 ERROR vmware_
2016-10-22 09:53:37.495 20546 DEBUG vmware_
The metadaproxy is indeed deployed and in the database. Seconds later (after adding vnics and other things it seems) it dies again with:
2016-10-22 09:53:56.490 20546 ERROR neutron Traceback (most recent call last): [30/1964] neutron- server" , line 10, in <module>
2016-10-22 09:53:56.490 20546 ERROR neutron File "/usr/bin/
2016-10-22 09:53:56.490 20546 ERROR neutron sys.exit(main())
2016-10-22 09:53:56.490 2054...