nova raises ConfigFileValueError for URLs with dashes

Bug #1653967 reported by George Shuklin
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Fix Released
Undecided
Unassigned
Mitaka
Fix Committed
Undecided
Unassigned
Newton
Fix Committed
Undecided
Unassigned
Ocata
Fix Released
Undecided
Unassigned
oslo.config
Fix Released
Undecided
ChangBo Guo(gcb)
python-rfc3986 (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Yakkety
Fix Released
Undecided
Unassigned
Zesty
Fix Released
Undecided
Unassigned

Bug Description

nova version: newton
dpkg version: 2:14.0.1-0ubuntu1~cloud0
distribution: nova @ xenial with ubuntu cloud archive, amd64.

Nova fails with exception ConfigFileValueError: Value for option url is not valid: invalid URI: if url parameter of [neutron] section or novncproxy_base_url parameter contains dashes in url.

Steps to reproduce:

Take a working openstack with nova+neutron.

Put (in [neutron] section) url= http://nodash.example.com:9696 - it works

Put url = http://with-dash.example.com:9696 - it fails with exception:

nova[18937]: TRACE Traceback (most recent call last):
nova[18937]: TRACE File "/usr/bin/nova-api-os-compute", line 10, in <module>
nova[18937]: TRACE sys.exit(main())
nova[18937]: TRACE File "/usr/lib/python2.7/dist-packages/nova/cmd/api_os_compute.py", line 51, in main
nova[18937]: TRACE service.wait()
nova[18937]: TRACE File "/usr/lib/python2.7/dist-packages/nova/service.py", line 415, in wait
nova[18937]: TRACE _launcher.wait()
nova[18937]: TRACE File "/usr/lib/python2.7/dist-packages/oslo_service/service.py", line 568, in wait
nova[18937]: TRACE self.conf.log_opt_values(LOG, logging.DEBUG)
nova[18937]: TRACE File "/usr/lib/python2.7/dist-packages/oslo_config/cfg.py", line 2626, in log_opt_values
nova[18937]: TRACE _sanitize(opt, getattr(group_attr, opt_name)))
nova[18937]: TRACE File "/usr/lib/python2.7/dist-packages/oslo_config/cfg.py", line 3057, in __getattr__
nova[18937]: TRACE return self._conf._get(name, self._group)
nova[18937]: TRACE File "/usr/lib/python2.7/dist-packages/oslo_config/cfg.py", line 2668, in _get
nova[18937]: TRACE value = self._do_get(name, group, namespace)
nova[18937]: TRACE File "/usr/lib/python2.7/dist-packages/oslo_config/cfg.py", line 2711, in _do_get
nova[18937]: TRACE % (opt.name, str(ve)))
nova[18937]: TRACE ConfigFileValueError: Value for option url is not valid: invalid URI: 'http://with-dash.example.com:9696'.

Expected behavior: do not crash.

Revision history for this message
George Shuklin (george-shuklin) wrote :

I found source of the bug: python-rfc3986 is to blame (it is used by oslo-config). Version 0.2.0-2 contains bug which violates RFC3986. It was fixed in 0.2.2. Version of python-rfc3986 from zesty (0.3.1-2) fix this problem.

I believe this bug should be fixed by bumping up version of python-rfc3986 in UCA to 0.2.2 or higher.

summary: - nova (newton) raises ConfigFileValueError for urls with dashess
+ nova (newton) raises ConfigFileValueError for urls with dashes
summary: - nova (newton) raises ConfigFileValueError for urls with dashes
+ nova raises ConfigFileValueError for URLs with dashes
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nova (Ubuntu):
status: New → Confirmed
Changed in python-rfc3986 (Ubuntu):
status: New → Confirmed
Revision history for this message
Christoph Fiehe (fiehe) wrote :

A fix is already on its way, but the new python-rfc3986 package is only available in the {xenial,yakkety}-proposed repositories.

Have a look:
https://people.canonical.com/~ubuntu-archive/pending-sru.html

This bug is already covered by this one:
https://bugs.launchpad.net/tripleo/+bug/1632538

Chuck Short (zulcss)
Changed in python-rfc3986 (Ubuntu Zesty):
status: Confirmed → Fix Released
Changed in nova (Ubuntu Zesty):
status: Confirmed → Fix Released
Sean Dague (sdague)
no longer affects: nova
Revision history for this message
George Shuklin (george-shuklin) wrote :

I found one more source of this bug (It was pointed by Marsikus at habrahabr.ru): https://github.com/openstack/oslo.config/compare/3.18.0...master

As you can see, oslo.config have dependency for python-rfc3986== 0.2.0 in version 3.18.0, and 0.2.2 in stable/newton.

And https://releases.openstack.org/newton/index.html#oslo-config says that 'Newton' is 3.17.0.

I think it is a maintenance mistake from oslo.config upstream.

no longer affects: nova
Revision history for this message
ChangBo Guo(gcb) (glongwave) wrote :
Revision history for this message
ChangBo Guo(gcb) (glongwave) wrote :
Changed in oslo.config:
assignee: nobody → ChangBo Guo(gcb) (glongwave)
status: New → In Progress
Revision history for this message
Thiago Martins (martinx) wrote :

Guys,

Why is taking so long for python-rfc3986 package to leave the Proposed repo, into main?

https://launchpad.net/ubuntu/+source/python-rfc3986/0.2.2-0ubuntu0.16.04.1

It was uploaded on 2016-10-27!

Cheers!
Thiago

Revision history for this message
ChangBo Guo(gcb) (glongwave) wrote :

We released oslo.config 3.17.1 for branch stable/newton, that makes sure rfc3986>=0.2.2 to avoid ConfigFileValueError.

Changed in oslo.config:
status: In Progress → Fix Released
no longer affects: nova
no longer affects: nova
no longer affects: nova (Ubuntu)
no longer affects: nova (Ubuntu Xenial)
no longer affects: nova (Ubuntu Yakkety)
no longer affects: nova (Ubuntu Zesty)
Revision history for this message
Corey Bryant (corey.bryant) wrote :

This should be fixed in xenial and yakkety now:

 python-rfc3986 | 0.2.2-0ubuntu0.16.04.1 | xenial-updates | source, all
 python-rfc3986 | 0.2.2-0ubuntu0.16.10.1 | yakkety-updates | source, all

Still some backport/testing/promotions needed for the corresponding cloud archives.

Changed in python-rfc3986 (Ubuntu Xenial):
status: New → Fix Released
Changed in python-rfc3986 (Ubuntu Yakkety):
status: New → Fix Released
Revision history for this message
Matthew Thode (prometheanfire) wrote :

Not seeing the issue from a requirements perspective so removing us.

Changed in openstack-requirements:
status: New → Incomplete
no longer affects: openstack-requirements
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/requirements 1.1.0

This issue was fixed in the openstack/requirements 1.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/requirements ocata-eol

This issue was fixed in the openstack/requirements ocata-eol release.

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.