← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1320797] [NEW] 'Nova-mange service list' command returns an error trace

 

Public bug reported:

This is what you get if you type 'nova-mange service list' and you
didn't source the rc file.

[root@mycomputenode ~]# nova-manage service list
Command failed, please check log for more info
2014-05-19 10:40:14.959 26210 CRITICAL nova [req-264c46e5-d5e0-4587-b929-302a51a42f25 None None] (OperationalError) (1045, "Access denied for user 'nova'@'mycomputenode' (using password: NO)") None None
2014-05-19 10:40:14.959 26210 TRACE nova Traceback (most recent call last):
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/bin/nova-manage", line 10, in <module>
2014-05-19 10:40:14.959 26210 TRACE nova     sys.exit(main())
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/cmd/manage.py", line 1377, in main
2014-05-19 10:40:14.959 26210 TRACE nova     ret = fn(*fn_args, **fn_kwargs)
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/cmd/manage.py", line 687, in list
2014-05-19 10:40:14.959 26210 TRACE nova     services = db.service_get_all(ctxt)
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/db/api.py", line 133, in service_get_all
2014-05-19 10:40:14.959 26210 TRACE nova     return IMPL.service_get_all(context, disabled)
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/api.py", line 108, in wrapper
2014-05-19 10:40:14.959 26210 TRACE nova     return f(*args, **kwargs)
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/api.py", line 401, in service_get_all
2014-05-19 10:40:14.959 26210 TRACE nova     query = model_query(context, models.Service)
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/api.py", line 190, in model_query
2014-05-19 10:40:14.959 26210 TRACE nova     session = kwargs.get('session') or get_session()
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/openstack/common/db/sqlalchemy/session.py", line 423, in get_session
2014-05-19 10:40:14.959 26210 TRACE nova     engine = get_engine(sqlite_fk=sqlite_fk, slave_engine=slave_session)
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/openstack/common/db/sqlalchemy/session.py", line 561, in get_engine
2014-05-19 10:40:14.959 26210 TRACE nova     sqlite_fk=sqlite_fk)
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/openstack/common/db/sqlalchemy/session.py", line 676, in create_engine
2014-05-19 10:40:14.959 26210 TRACE nova     engine.connect()
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 2472, in connect
2014-05-19 10:40:14.959 26210 TRACE nova     return self._connection_cls(self, **kwargs)
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 878, in __init__
2014-05-19 10:40:14.959 26210 TRACE nova     self.__connection = connection or engine.raw_connection()
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 2558, in raw_connection
2014-05-19 10:40:14.959 26210 TRACE nova     return self.pool.unique_connection()
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 183, in unique_connection
2014-05-19 10:40:14.959 26210 TRACE nova     return _ConnectionFairy(self).checkout()
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 387, in __init__
2014-05-19 10:40:14.959 26210 TRACE nova     rec = self._connection_record = pool._do_get()
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 741, in _do_get
2014-05-19 10:40:14.959 26210 TRACE nova     con = self._create_connection()
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 188, in _create_connection
2014-05-19 10:40:14.959 26210 TRACE nova     return _ConnectionRecord(self)
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 270, in __init__
2014-05-19 10:40:14.959 26210 TRACE nova     self.connection = self.__connect()
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 330, in __connect
2014-05-19 10:40:14.959 26210 TRACE nova     connection = self.__pool._creator()
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/strategies.py", line 80, in connect
2014-05-19 10:40:14.959 26210 TRACE nova     return dialect.connect(*cargs, **cparams)
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py", line 281, in connect
2014-05-19 10:40:14.959 26210 TRACE nova     return self.dbapi.connect(*cargs, **cparams)
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/MySQLdb/__init__.py", line 81, in Connect
2014-05-19 10:40:14.959 26210 TRACE nova     return Connection(*args, **kwargs)
2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 187, in __init__
2014-05-19 10:40:14.959 26210 TRACE nova     super(Connection, self).__init__(*args, **kwargs2)
2014-05-19 10:40:14.959 26210 TRACE nova OperationalError: (OperationalError) (1045, "Access denied for user 'nova'@'mycomputenode' (using password: NO)") None None
2014-05-19 10:40:14.959 26210 TRACE nova


Shouldn't you get an error like  "ERROR: You must provide a username via either --os-username or env[OS_USERNAME]", instead of getting the whole stack trace?

Cheers,
Daniel.

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: nova-manage

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1320797

Title:
  'Nova-mange service list' command returns an error trace

Status in OpenStack Compute (Nova):
  New

Bug description:
  This is what you get if you type 'nova-mange service list' and you
  didn't source the rc file.

  [root@mycomputenode ~]# nova-manage service list
  Command failed, please check log for more info
  2014-05-19 10:40:14.959 26210 CRITICAL nova [req-264c46e5-d5e0-4587-b929-302a51a42f25 None None] (OperationalError) (1045, "Access denied for user 'nova'@'mycomputenode' (using password: NO)") None None
  2014-05-19 10:40:14.959 26210 TRACE nova Traceback (most recent call last):
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/bin/nova-manage", line 10, in <module>
  2014-05-19 10:40:14.959 26210 TRACE nova     sys.exit(main())
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/cmd/manage.py", line 1377, in main
  2014-05-19 10:40:14.959 26210 TRACE nova     ret = fn(*fn_args, **fn_kwargs)
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/cmd/manage.py", line 687, in list
  2014-05-19 10:40:14.959 26210 TRACE nova     services = db.service_get_all(ctxt)
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/db/api.py", line 133, in service_get_all
  2014-05-19 10:40:14.959 26210 TRACE nova     return IMPL.service_get_all(context, disabled)
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/api.py", line 108, in wrapper
  2014-05-19 10:40:14.959 26210 TRACE nova     return f(*args, **kwargs)
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/api.py", line 401, in service_get_all
  2014-05-19 10:40:14.959 26210 TRACE nova     query = model_query(context, models.Service)
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/api.py", line 190, in model_query
  2014-05-19 10:40:14.959 26210 TRACE nova     session = kwargs.get('session') or get_session()
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/openstack/common/db/sqlalchemy/session.py", line 423, in get_session
  2014-05-19 10:40:14.959 26210 TRACE nova     engine = get_engine(sqlite_fk=sqlite_fk, slave_engine=slave_session)
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/openstack/common/db/sqlalchemy/session.py", line 561, in get_engine
  2014-05-19 10:40:14.959 26210 TRACE nova     sqlite_fk=sqlite_fk)
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib/python2.6/site-packages/nova/openstack/common/db/sqlalchemy/session.py", line 676, in create_engine
  2014-05-19 10:40:14.959 26210 TRACE nova     engine.connect()
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 2472, in connect
  2014-05-19 10:40:14.959 26210 TRACE nova     return self._connection_cls(self, **kwargs)
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 878, in __init__
  2014-05-19 10:40:14.959 26210 TRACE nova     self.__connection = connection or engine.raw_connection()
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 2558, in raw_connection
  2014-05-19 10:40:14.959 26210 TRACE nova     return self.pool.unique_connection()
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 183, in unique_connection
  2014-05-19 10:40:14.959 26210 TRACE nova     return _ConnectionFairy(self).checkout()
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 387, in __init__
  2014-05-19 10:40:14.959 26210 TRACE nova     rec = self._connection_record = pool._do_get()
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 741, in _do_get
  2014-05-19 10:40:14.959 26210 TRACE nova     con = self._create_connection()
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 188, in _create_connection
  2014-05-19 10:40:14.959 26210 TRACE nova     return _ConnectionRecord(self)
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 270, in __init__
  2014-05-19 10:40:14.959 26210 TRACE nova     self.connection = self.__connect()
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 330, in __connect
  2014-05-19 10:40:14.959 26210 TRACE nova     connection = self.__pool._creator()
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/strategies.py", line 80, in connect
  2014-05-19 10:40:14.959 26210 TRACE nova     return dialect.connect(*cargs, **cparams)
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py", line 281, in connect
  2014-05-19 10:40:14.959 26210 TRACE nova     return self.dbapi.connect(*cargs, **cparams)
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/MySQLdb/__init__.py", line 81, in Connect
  2014-05-19 10:40:14.959 26210 TRACE nova     return Connection(*args, **kwargs)
  2014-05-19 10:40:14.959 26210 TRACE nova   File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 187, in __init__
  2014-05-19 10:40:14.959 26210 TRACE nova     super(Connection, self).__init__(*args, **kwargs2)
  2014-05-19 10:40:14.959 26210 TRACE nova OperationalError: (OperationalError) (1045, "Access denied for user 'nova'@'mycomputenode' (using password: NO)") None None
  2014-05-19 10:40:14.959 26210 TRACE nova

  
  Shouldn't you get an error like  "ERROR: You must provide a username via either --os-username or env[OS_USERNAME]", instead of getting the whole stack trace?

  Cheers,
  Daniel.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1320797/+subscriptions


Follow ups

References