tripleo deploy tuskar element failure

Bug #1362178 reported by Leslie Wang on 2014-08-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tuskar
Medium
Dougal Matthews

Bug Description

1. use disk-image-builder to build undercloud image, and select tuskar element.
2. after deploy undercloud image, it always report below failure. Seems like 001_init.py does not check table exist or not before creating the table. Then it causes the error.

Aug 27 05:48:26 undercloud-undercloud-exj4cgtmatvy os-collect-config: + os-is-bootstrap-host
Aug 27 05:48:27 undercloud-undercloud-exj4cgtmatvy os-collect-config: + sudo -u tuskar -- tuskar-dbsync --config-file /etc/tuskar/tuskar.conf
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 ERROR 001_init [-] Exception while creating table.
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init Traceback (most recent call last):
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/tuskar/db/sqlalchemy/migrate_repo/versions/001_init.py", line 101, in upgrade
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init table.create()
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/sqlalchemy/schema.py", line 616, in create
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init checkfirst=checkfirst)
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1479, in _run_visitor
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init conn._run_visitor(visitorcallable, element, **kwargs)
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1122, in _run_visitor
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init **kwargs).traverse_single(element)
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/sqlalchemy/sql/visitors.py", line 122, in traverse_single
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init return meth(obj, **kw)
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/sqlalchemy/engine/ddl.py", line 89, in visit_table
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init self.connection.execute(schema.CreateTable(table))
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 662, in execute
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init params)
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 720, in _execute_ddl
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init compiled
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 874, in _execute_context
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init context)
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/oslo/db/sqlalchemy/compat/handle_error.py", line 125, in _handle_dbapi_exception
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init six.reraise(type(newraise), newraise, sys.exc_info()[2])
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/oslo/db/sqlalchemy/compat/handle_error.py", line 102, in _handle_dbapi_exception
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init per_fn = fn(ctx)
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/oslo/db/sqlalchemy/exc_filters.py", line 323, in handler
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init context.is_disconnect)
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/oslo/db/sqlalchemy/exc_filters.py", line 254, in _raise_operational_errors_directly_filter
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init raise operational_error
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init OperationalError: (OperationalError) (1050, "Table 'overcloud_roles' already exists") '\nCREATE TABLE overcloud_roles (\n\tid INTEGER NOT NULL AUTO_INCREMENT, \n\tname VARCHAR(64), \n\tdescription VARCHAR(256), \n\timage_name VARCHAR(64), \n\tflavor_id VARCHAR(36), \n\tcreated_at DATETIME, \n\tupdated_at DATETIME, \n\tPRIMARY KEY (id), \n\tUNIQUE (name)\n)ENGINE=InnoDB CHARSET=utf8\n\n' ()
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.059 13116 TRACE 001_init
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: 2014-08-27 05:48:28.062 13116 CRITICAL tuskar [-] OperationalError: (OperationalError) (1050, "Table 'overcloud_roles' already exists") '\nCREATE TABLE overcloud_roles (\n\tid INTEGER NOT NULL AUTO_INCREMENT, \n\tname VARCHAR(64), \n\tdescription VARCHAR(256), \n\timage_name VARCHAR(64), \n\tflavor_id VARCHAR(36), \n\tcreated_at DATETIME, \n\tupdated_at DATETIME, \n\tPRIMARY KEY (id), \n\tUNIQUE (name)\n)ENGINE=InnoDB CHARSET=utf8\n\n' ()
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config:
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: [2014-08-27 05:48:28,109] (os-refresh-config) [ERROR] during configure phase. [Command '['dib-run-parts', '/opt/stack/os-config-refresh/configure.d']' returned non-zero exit status 1]
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config:
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: ERROR:os-refresh-config:during configure phase. [Command '['dib-run-parts', '/opt/stack/os-config-refresh/configure.d']' returned non-zero exit status 1]
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config:
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: [2014-08-27 05:48:28,109] (os-refresh-config) [ERROR] Aborting...
Aug 27 05:48:28 undercloud-undercloud-exj4cgtmatvy os-collect-config: ERROR:os-refresh-config:Aborting...

Dougal Matthews (d0ugal) wrote :

I don't understand how you got into this situation, why do you have an overcloud_roles table already?

Changed in tuskar:
importance: Undecided → High
importance: High → Medium
Dougal Matthews (d0ugal) on 2014-09-15
Changed in tuskar:
assignee: nobody → Dougal Matthews (d0ugal)
status: New → In Progress
Dougal Matthews (d0ugal) wrote :

Fix has been commited to tripleo-image-elements.

Changed in tuskar:
status: In Progress → Fix Committed
Jay Dobies (jdob) on 2014-10-16
Changed in tuskar:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers