Error importing module nova.openstack.common.sslutils: duplicate option: ca_file

Bug #1287542 reported by Robert Collins
30
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Blazar
Fix Released
Critical
Dina Belova
Ceilometer
Fix Released
Critical
Mehdi Abaakouk
OpenStack Compute (nova)
Fix Released
Critical
Michael Still
oslo.messaging
Fix Released
Critical
Mark McLoughlin

Bug Description

Error importing module nova.openstack.common.sslutils: duplicate option: ca_file

This is seen in the nova gate - for unrelated patches - it might be a bad slave I guess, or it might be happening to all subsequent patches, or it might be a WTF.

http://logstash.openstack.org/#eyJzZWFyY2giOiJcIkVycm9yIGltcG9ydGluZyBtb2R1bGUgbm92YS5vcGVuc3RhY2suY29tbW9uLnNzbHV0aWxzOiBkdXBsaWNhdGUgb3B0aW9uOiBjYV9maWxlXCIiLCJmaWVsZHMiOltdLCJvZmZzZXQiOjAsInRpbWVmcmFtZSI6IjkwMCIsImdyYXBobW9kZSI6ImNvdW50IiwidGltZSI6eyJ1c2VyX2ludGVydmFsIjowfSwic3RhbXAiOjEzOTM5MTUyNTE4ODl9 suggest it has only happened once so far.

commit 5188052937219badaa692f67d9f98623c15d1de2
Merge: af626d0 88b7380
Author: Jenkins <email address hidden>
Date: Tue Mar 4 02:47:02 2014 +0000

    Merge "Sync latest config file generator from oslo-incubator"

Was the latest merge prior to this, but it may be coincidental.

Tags: requirements
Revision history for this message
Michael Still (mikal) wrote :

Reverting 5188052937219badaa692f67d9f98623c15d1de2 (well, the change that merged), did not help.

Revision history for this message
Michael Still (mikal) wrote :

I will admit to being stumped. There is in fact a duplicate flag named ca_file. However, that's been true for a while. Reverting the recent config checker bump doesn't help. Nor does checking out nova from a couple of weeks ago and then rebuilding the venv. That makes me feel like this is a library version change, but I can't identify which one.

Revision history for this message
Vui Lam (vui) wrote :

The script works after I reverted 6fd09137f8c45ce4790833d7f6b840d885818771, so it is the root cause.
And looking at the change, it is bringing in oslo.messaging into the generating process for the first time it seems.

Revision history for this message
Michael Still (mikal) wrote :

This patch "fixed" nova:

diff --git a/requirements.txt b/requirements.txt
index 91cb544..2b16b8d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -32,4 +32,4 @@ wsgiref>=0.1.2
 oslo.config>=1.2.0
 oslo.rootwrap
 pycadf>=0.4.1
-oslo.messaging>=1.3.0a4
+oslo.messaging>=1.3.0a4,<1.3.0a8

I'll deal with a review for that now.

Revision history for this message
Michael Still (mikal) wrote :

For reasons I can't explain hudson didn't update this. The review for a fix is https://review.openstack.org/#/c/77844/.

Changed in nova:
assignee: nobody → Michael Still (mikalstill)
status: New → Triaged
importance: Undecided → Critical
tags: added: requirements
Revision history for this message
Dina Belova (dbelova) wrote :

The main problem here is: Error importing module nova.openstack.common.sslutils: duplicate option: ca_file

That's because of https://review.openstack.org/#/c/71997/ merged to oslo.messaging - and now released

Author changed opts not only in oslo.messaging files, but also in openstack.compute one - sslutils - and we've got duplicate option error with openstack.common.sslutils in nova.

As I discussed that with Doug Hellmann, on #openstack-dev some days ago, he proposed to merge the same fix to oslo-incubator and then update all other projects using oslo.messaging.

Here is the fix: https://review.openstack.org/#/c/76300/

And the same error in Climate project: https://bugs.launchpad.net/climate/+bug/1284749 - oslo.messaging was 'master' that time, now it's released

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

The string change has merged to oslo-incubator.

Revision history for this message
Mark McLoughlin (markmc) wrote :

I'm going to remove the use of sslutils from oslo.messaging and cut another release

Changed in oslo.messaging:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Mark McLoughlin (markmc)
Changed in climate:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.messaging (master)

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

Changed in oslo.messaging:
status: Confirmed → In Progress
Revision history for this message
Mark McLoughlin (markmc) wrote :

Post mortem: this broke Nova's pep8 jobs which use an oslo.messaging release rather than oslo.messaging master, so it was possible to land the breaking change in oslo.messaging without affecting that job and then cut a release and break it

Revision history for this message
Dina Belova (dbelova) wrote :

Mark, anyway, Nova change that fixes this issue is already on review, as oslo-incubator change was merged: https://review.openstack.org/#/c/77874/

Revision history for this message
Steven Dake (sdake) wrote :

Folks,

I ran into this problem with oslo.mesaging for heat. I simply removed sslutils.py from the repo and problem solved. sslutils is used by oslo-incubator's version of rpc, so once migrated to oslo.messaging, there were no more references to that class in our codebase, hence no reason to configure it.

Regards,
-steve

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/77874
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5eafe1ccb30462d9b78b13323135fb9f90d1fd54
Submitter: Jenkins
Branch: master

commit 5eafe1ccb30462d9b78b13323135fb9f90d1fd54
Author: Sean Dague <email address hidden>
Date: Tue Mar 4 08:05:17 2014 -0500

    sync sslutils to not conflict with oslo.messaging

    oslo.messaging changed and shipped nova/openstack/common/sslutils.py
    in their own tree before it was changed in oslo-incubator. This
    created conflicting options with nova, and caused the config
    generator to explode (this also would have exploded if we used
    any of the sslutils code in the gate, which we don't).

    This is a sync of the finally merged oslo-incubator fix (which is
    just periods in comments). This now makes the sslutils declaration
    the same in both nova and olso.messaging.

    Change-Id: I5cf392215825b604f0e3fe9546591a1e754d4478
    Closes-Bug: #1287542

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

Reviewed: https://review.openstack.org/77891
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=3eeaaee78872632aede36ee328cfb99a8c53ec91
Submitter: Jenkins
Branch: master

commit 3eeaaee78872632aede36ee328cfb99a8c53ec91
Author: Mark McLoughlin <email address hidden>
Date: Tue Mar 4 06:23:35 2014 -0800

    Remove use of sslutils

    sslutils is the only oslo-incubator module we use which registers any
    config options, and we don't even use those config options at runtime.

    The problem with us using oslo-incubator config options is that they
    need to be exactly in sync with the oslo-incubator version of those
    used by every project using oslo.messaging.

    Avoid all this be inlining validate_ssl_version() until we have it
    available in a real library.

    Change-Id: Id3b0bb2e7ede33ede9b66025d1af113ae60cfc58
    Closes-Bug: #1287542

Changed in oslo.messaging:
status: In Progress → Fix Committed
Mehdi Abaakouk (sileht)
Changed in ceilometer:
assignee: nobody → Mehdi Abaakouk (sileht)
Changed in ceilometer:
status: New → In Progress
Dina Belova (dbelova)
Changed in climate:
assignee: nobody → Dina Belova (dbelova)
importance: Undecided → Critical
status: Confirmed → In Progress
Thierry Carrez (ttx)
Changed in nova:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo.messaging:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Dina Belova (dbelova)
Changed in climate:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in oslo.messaging:
milestone: icehouse-3 → 1.3.0
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.1
Revision history for this message
gordon chung (chungg) wrote :

sync'd to ceilometer here: https://review.openstack.org/78132

Changed in ceilometer:
status: In Progress → Fix Committed
importance: Undecided → Critical
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-1 → 2014.2
Tom Fifield (fifieldt)
Changed in blazar:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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