Option "username" from group "keystone_authtoken" is deprecated. Use option "username" from group "keystone_authtoken".

Bug #1438314 reported by Ihar Hrachyshka
38
This bug affects 9 people
Affects Status Importance Assigned to Milestone
oslo.config
Fix Released
Medium
Ben Nemec

Bug Description

I get multiple warnings in neutron server logs like follows:

2015-03-30 13:10:48.005 17638 WARNING oslo_config.cfg [-] Option "username" from group "nova" is deprecated. Use option "username" from group "nova".
...
2015-03-30 13:10:49.061 WARNING oslo_config.cfg [req-71d46ec6-0492-4f3f-ac85-7d3c3d7a4182 None None] Option "username" from group "keystone_authtoken" is deprecated. Use option "username" from group "keystone_authtoken".

It seems like a bug since the option names and group names reported are the same.

Logs are at: http://logs.openstack.org/86/168886/1/check/check-tempest-dsvm-neutron-full/8601c43/logs/screen-q-svc.txt.gz#_2015-03-30_13_10_48_005

Ben Nemec (bnemec)
Changed in oslo.config:
assignee: nobody → Ben Nemec (bnemec)
Revision history for this message
Ben Nemec (bnemec) wrote :

It looks like the problem is this option definition in keystoneclient:

cfg.StrOpt('user-name', dest='username', help='Username',
deprecated_name='username'),

I suspect we're using the dest property as the undeprecated value, whereas apparently we need to be using user-name. Not sure why yet.

Changed in oslo.config:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Ben,

I see one more similar output

Option ""username"" from group ""nova"" is deprecated. Use option ""username"" from group ""nova""."

-- dims

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.config (master)

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

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

Reviewed: https://review.openstack.org/169392
Committed: https://git.openstack.org/cgit/openstack/oslo.config/commit/?id=8ddd9180967fae11803b59e92cab0e51faa99cf6
Submitter: Jenkins
Branch: master

commit 8ddd9180967fae11803b59e92cab0e51faa99cf6
Author: Ben Nemec <email address hidden>
Date: Tue Mar 31 15:37:25 2015 +0000

    Fix logging of deprecated opts with dest override

    When a deprecated opt is used and the new opt name has the dest
    property overridden, we were logging the dest property instead of
    the actual opt name in the deprecation warning. This is confusing
    because it leads to log messages such as:

    Option "username" from group "nova" is deprecated. Use option
    "username" from group "nova".

    This is nonsense. In this case the proper new name was "user-name"
    but because it had a dest override of "username" that's what was
    logged.

    Because the deprecation check code does not have access to the
    actual opt itself, we need to pass the undeprecated name down from
    the opt into the namespace code that does the check.

    I also tried simply adding a (group, name) tuple to the beginning
    of the names list, but this subtly broke the CLI opt tests because
    there are specific combinations of - and _ variants expected, and
    this seems to violate those assumptions. I did not pursue it any
    further because I felt it was better to simply be explicit about
    the current name and not mess around with adding non-existent opt
    names to the lookup list solely for logging purposes.

    Change-Id: Ib1ea8ae2d60a9c508935bad27d7ddc2cdb5ab505
    Closes-Bug: #1438314

Changed in oslo.config:
status: In Progress → Fix Committed
Revision history for this message
Csaba Kallai (kallaics) wrote :

The FIX is not working well. :(
My WARNING message has been changed to this message:

"WARNING oslo_config.cfg [-] Option "username" from group "keystone_authtoken" is deprecated. Use option "user-name" from group "keystone_authtoken"."

If I tried to change user-name, then the log was full empty.

Could somebody fix i? Please.

Thanks.

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

@Csaba, isn't it what is expected? Once you change to non-deprecated option version, it stops emitting deprecation warnings.

Changed in oslo.config:
milestone: none → 1.12.0
status: Fix Committed → Fix Released
Revision history for this message
Csaba Kallai (kallaics) wrote :

Dear Ihar,

Yes, the problem not solved in oslo config.
I upgraded to 1.12.0 and the message is very similar:

WARNING oslo_config.cfg [-] Option "username" from group "keystone_authtoken" is deprecated. Use option "user-name" from group "keystone_authtoken".

I can not use the glance-api component at the moment.

Thanks.

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

No, Csaba, it's similar, but not identical. Now it correctly says that you should use user-name (with dash) instead of username (without it).

Revision history for this message
axel vanzaghi (axellinkgm) wrote :

I may reopen the bug but well, I have the exact same message as Csaba but everything works fine. Not a problem, I change username to user-name.

Change is done, restart the service, try to get image list :
 Unauthorized(401)
And when I go back to username, it works again.

version : 2:11.0.0-0ubuntu1~cloud0 on Ubuntu 14.04.3 LTS

Revision history for this message
Sergey Kolekonov (skolekonov) wrote :

I reproduced this issue on the latest devstack:
]WARNING oslo_config.cfg [-] Option "username" from group "keystone_authtoken" is deprecated. Use option "user-name" from group "keystone_authtoken".

But user-name option doesn't work - authentication fails due to missing username

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.