tuskar-api fails with "no such option: config_file"

Bug #1357525 reported by Jeremy Moffitt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tuskar
Fix Released
Critical
Dougal Matthews

Bug Description

The latest version of Tuskar (as of 12:31pm pdt August 15th 2014) fails to start up. Using the instructions at https://github.com/openstack/tuskar/blob/master/doc/source/INSTALL.rst , the command to actually start Tuskar fails:

/opt/stack/tuskar$ tuskar-api --config-file etc/tuskar/tuskar.conf

/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/pecan/__init__.py:110: RuntimeWarning: `static_root` is only used when `debug` is True, ignoring
  RuntimeWarning
Traceback (most recent call last):
  File "/opt/stack/tuskar/.tox/py27/bin/tuskar-api", line 10, in <module>
    sys.exit(main())
  File "/opt/stack/tuskar/tuskar/cmd/api.py", line 44, in main
    CONF.log_opt_values(LOG, logging.INFO)
  File "/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/oslo/config/cfg.py", line 1903, in log_opt_values
    logger.log(lvl, "config files: %s", self.config_file)
  File "/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/oslo/config/cfg.py", line 1619, in __getattr__
    raise NoSuchOptError(name)
oslo.config.cfg.NoSuchOptError: no such option: config_file

All steps prior to this succeed normally.

Dougal Matthews (d0ugal)
Changed in tuskar:
importance: Undecided → Critical
assignee: nobody → Dougal Matthews (d0ugal)
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tuskar (master)

Fix proposed to branch: master
Review: https://review.openstack.org/114920

Changed in tuskar:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tuskar (master)

Reviewed: https://review.openstack.org/114920
Committed: https://git.openstack.org/cgit/openstack/tuskar/commit/?id=70ea806f9f53a40b4a2d4d2debb32c30cceecbbe
Submitter: Jenkins
Branch: master

commit 70ea806f9f53a40b4a2d4d2debb32c30cceecbbe
Author: Dougal Matthews <email address hidden>
Date: Mon Aug 18 10:38:51 2014 +0100

    Fix config loading when running the Tuskar API

    This regression was caused in d0a5513e7f539501923cca73f3dc63522dfad7a5
    as the rpc service integration code has a side effect of loading the
    configuration file.

    Unfortunately this issue wasn't picked up during that initial cleanup as
    the API entrypoint doesn't have test coverage.

    Change-Id: I50cef8855828ca51957572ddf48a4761859876b4
    Closes-bug: #1357525

Changed in tuskar:
status: In Progress → Fix Committed
Revision history for this message
Jeremy Moffitt (jeremy-moffitt) wrote :
Download full text (3.2 KiB)

I pulled down the fix and am able to start the tuskar-api, though attempts to access it result in database errors (note, dbsync works fine for me)... I don't know if this is related or not, just in case here is the stack trace from trying to run "python tools/initial_data.py"

ERROR:wsme.api:Server-side error: "(OperationalError) unable to open database file None None". Detail:
Traceback (most recent call last):

  File "/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/wsmeext/pecan.py", line 82, in callfunction
    result = f(self, *args, **kwargs)

  File "/opt/stack/tuskar/tuskar/api/controllers/v1/overcloud_roles.py", line 52, in post
    result = pecan.request.dbapi.create_overcloud_role(db_role)

  File "/opt/stack/tuskar/tuskar/db/sqlalchemy/api.py", line 119, in create_overcloud_role
    session = get_session()

  File "/opt/stack/tuskar/tuskar/db/sqlalchemy/api.py", line 57, in get_session
    return db_session.get_session(sqlite_fk=True)

  File "/opt/stack/tuskar/tuskar/openstack/common/db/sqlalchemy/session.py", line 376, in get_session
    engine = get_engine(sqlite_fk=sqlite_fk)

  File "/opt/stack/tuskar/tuskar/openstack/common/db/sqlalchemy/session.py", line 507, in get_engine
    sqlite_fk=sqlite_fk)

  File "/opt/stack/tuskar/tuskar/openstack/common/db/sqlalchemy/session.py", line 610, in create_engine
    engine.connect()

  File "/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2471, in connect
    return self._connection_cls(self, **kwargs)

  File "/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 878, in __init__
    self.__connection = connection or engine.raw_connection()

  File "/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2557, in raw_connection
    return self.pool.unique_connection()

  File "/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 184, in unique_connection
    return _ConnectionFairy(self).checkout()

  File "/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 401, in __init__
    rec = self._connection_record = pool._do_get()

  File "/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 822, in _do_get
    return self._create_connection()

  File "/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 189, in _create_connection
    return _ConnectionRecord(self)

  File "/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 282, in __init__
    self.connection = self.__connect()

  File "/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 344, in __connect
    connection = self.__pool._creator()

  File "/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 80, in connect
    return dialect.connect(*cargs, **cparams)

  File "/opt/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 281, in connect
    return self.dbapi.connect(*cargs, **cparams)

Operation...

Read more...

Revision history for this message
Dougal Matthews (d0ugal) wrote :

Thanks for following this up. Unfortunately the initital_data tool is outdated and for Icehouse. We don't currently have one for the Juno code.

It looks like this is two potential new issues - we need to update the install guide and/or update the initial data tool.

Jay Dobies (jdob)
Changed in tuskar:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.