nova raises ConfigFileValueError for URLs with dashes

Bug #1653967 reported by George Shuklin on 2017-01-04
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
ChangBo Guo(gcb)
python-rfc3986 (Ubuntu)

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= - it works

Put url = - 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/", line 51, in main
nova[18937]: TRACE service.wait()
nova[18937]: TRACE File "/usr/lib/python2.7/dist-packages/nova/", line 415, in wait
nova[18937]: TRACE _launcher.wait()
nova[18937]: TRACE File "/usr/lib/python2.7/dist-packages/oslo_service/", 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/", 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/", 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/", 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/", line 2711, in _do_get
nova[18937]: TRACE % (, str(ve)))
nova[18937]: TRACE ConfigFileValueError: Value for option url is not valid: invalid URI: ''.

Expected behavior: do not crash.

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
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
Christoph Fiehe (cfiehe) 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:

This bug is already covered by this one:

Chuck Short (zulcss) on 2017-01-05
Changed in python-rfc3986 (Ubuntu Zesty):
status: Confirmed → Fix Released
Changed in nova (Ubuntu Zesty):
status: Confirmed → Fix Released
Sean Dague (sdague) on 2017-01-05
no longer affects: nova
George Shuklin (george-shuklin) wrote :

I found one more source of this bug (It was pointed by Marsikus at

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 says that 'Newton' is 3.17.0.

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

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


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

It was uploaded on 2016-10-27!


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)
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
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

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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers