virt drivers should raise NotImplementedError instead of pass for plug_vifs

Bug #1218593 reported by Matt Riedemann
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Arnaud Legendre
Havana
Fix Released
Undecided
Unassigned

Bug Description

The hyperv, docker, vmware and powervm drivers should be changed to raise NotImplementedError from the plug_vifs methods rather than pass. See change https://review.openstack.org/#/c/43955/ and bug 1217586.

The compute manager has to handle the NotImplementedError case when initializing the host, that's why they simply pass today.

This is a low priority bug but should probably be targeted for Icehouse.

Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → Low
melanie witt (melwitt)
Changed in nova:
status: New → Triaged
Revision history for this message
Gary Kotton (garyk) wrote :

The VMware driver already has the pass. The fix just adds in the log messages.
Thanks
Gary

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

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

Changed in nova:
assignee: nobody → Gary Kotton (garyk)
status: Triaged → In Progress
Gary Kotton (garyk)
Changed in nova:
milestone: none → havana-rc1
Revision history for this message
Gary Kotton (garyk) wrote : Re: virt drivers should a debug message if not implemented for plug_vifs

Original bug was: virt drivers should raise NotImplementedError instead of pass for plug_vifs
This would cause tempest to fail. The implementation was reverted to add a debug message...

summary: - virt drivers should raise NotImplementedError instead of pass for
- plug_vifs
+ virt drivers should a debug message if not implemented for plug_vifs
Revision history for this message
Matt Riedemann (mriedem) wrote :

Gary, I don't know why you changed the title of the bug, but adding debug log messages in the virt drivers is not the intent of the bug, it's to change the pass in the virt driver to raise NotImplementedError.

If the powervm code review linked in the description is confusing, I'm sorry, but the title and rest of the description seems pretty clear to me.

summary: - virt drivers should a debug message if not implemented for plug_vifs
+ virt drivers should raise NotImplementedError instead of pass for
+ plug_vifs
Revision history for this message
Matt Riedemann (mriedem) wrote :

Gary, also, to be clear, the original original bug was I wanted to change the pass to NotImplementedError in the powervm driver specifically to make tempest fail when using powervm and running tests against unimplemented APIs, because otherwise we were getting false positives. The problem was when I implemented that, it caused the compute service to fail on startup, so I had to revert back to pass (from raise NotImplementedError) and I added a debug log message (which wasn't in the powervm driver initially). That was a short-term fix for havana and I discussed it with Joe Gordon - he thought it was better to revert rather than try to tackle handling NotImplementedError in the compute manager late in havana. That is the impetus of this bug - to go back to raising NotImplementedError rather than pass but handle it properly in the compute manager.

Revision history for this message
Matt Riedemann (mriedem) wrote :

Patch was abandoned so changed status back to Triaged.

Changed in nova:
status: In Progress → Triaged
Changed in nova:
milestone: havana-rc1 → none
Matt Riedemann (mriedem)
Changed in nova:
assignee: Gary Kotton (garyk) → nobody
Changed in nova:
assignee: nobody → Arnaud Legendre (arnaudleg)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: Triaged → In Progress
Revision history for this message
Matt Riedemann (mriedem) wrote :

Hmm, for some reason I can't access the review link above?

Revision history for this message
Arnaud Legendre (arnaudleg) wrote :

The review is still a draft, I am not sure why it updated this page.
I am working on it: in progress.

description: updated
Vui Lam (vui)
Changed in nova:
milestone: none → havana-rc1
Revision history for this message
Matt Riedemann (mriedem) wrote :

Removing the havana-rc1 tag again as that's for critical bug fixes which must make the havana release at this point. This is not a critical bug fix, this is more of a cleanup bug.

Changed in nova:
milestone: havana-rc1 → none
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/47618
Committed: http://github.com/openstack/nova/commit/6ef9262a6aa39b2da8023067386b832a35ecc45c
Submitter: Jenkins
Branch: master

commit 6ef9262a6aa39b2da8023067386b832a35ecc45c
Author: Arnaud Legendre <email address hidden>
Date: Fri Sep 20 08:10:13 2013 +0000

    plug_vif raise NotImplementedError instead of pass

    The Hyper-V, VMware, Docker and PowerVM drivers raise
    NotImplementedError from the plug_vifs and unplug_vifs
    methods rather than pass.
    The compute manager handles the NotImplementedError
    case when initializing the host.

    Fixed bug 1218593

    Change-Id: Id17a1f691f46816eadfe257d9ac0cc46502318ef

Changed in nova:
status: In Progress → Fix Committed
tags: added: docker
Revision history for this message
Matt Riedemann (mriedem) wrote :

Fixes were released in havana.

Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/83574

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

Reviewed: https://review.openstack.org/83574
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=fec6bc0beceba7c67cbe8541fc45f3b441872893
Submitter: Jenkins
Branch: stable/havana

commit fec6bc0beceba7c67cbe8541fc45f3b441872893
Author: Arnaud Legendre <email address hidden>
Date: Fri Sep 20 08:10:13 2013 +0000

    plug_vif raise NotImplementedError instead of pass

    The Hyper-V, VMware, Docker and PowerVM drivers raise
    NotImplementedError from the plug_vifs and unplug_vifs
    methods rather than pass.
    The compute manager handles the NotImplementedError
    case when initializing the host.

    Fixed bug 1218593

    (cherry picked from commit 6ef9262a6aa39b2da8023067386b832a35ecc45c)

    Conflicts:

     nova/tests/virt/hyperv/test_hypervapi.py
     nova/tests/virt/vmwareapi/test_vmwareapi.py
    Change-Id: Id17a1f691f46816eadfe257d9ac0cc46502318ef

tags: added: in-stable-havana
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.