No error is returned if public interface doesn't exist
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OpenStack Compute (nova) |
Low
|
Dean Troyer |
Bug Description
With the eth0 default for public_interface on a Fedora machine whose primary interface is named em0, I get no errors when associating a floating IP with an instance even though it clearly fails:
DEBUG nova.utils [-] Running cmd (subprocess): sudo ip addr add 172.31.0.224 dev eth0 from (pid=1918) execute /usr/lib/
DEBUG nova.utils [-] Result was 255 from (pid=1918) execute /usr/lib/
The problem is here:
# NOTE(vish): The False here is because we ignore the case
# that the ip is already bound.
self.
i.e. we want to ignore one specific error, not all errors
Changed in nova: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in nova: | |
assignee: | nobody → Dean Troyer (dtroyer) |
status: | Confirmed → In Progress |
Vish Ishaya (vishvananda) wrote : | #2 |
FYI, this is changed now to only ignore the specific case that the ip is bound already (exit code 254)
36 def bind_floating_
437 """Bind ip to public interface."""
438 _execute('ip', 'addr', 'add', str(floating_ip) + '/32',
439 'dev', device,
440 run_as_root=True, check_exit_code=[0, 254])
That said, the fixes dean adden in the above branch are still useful for returning a useful error to the user.
Reviewed: https:/
Committed: http://
Submitter: Jenkins
Branch: master
commit 8279240ee30d55d
Author: Dean Troyer <email address hidden>
Date: Fri Jan 20 16:39:41 2012 -0600
Handle error in associate floating IP (bug 845507)
* Raise NoFloatingIpInt
interface that doesn't exist.
* Return 500 Internal server Error, indicate only that associate
action failed
Change-Id: I6b032f7554795d
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
milestone: | none → essex-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | essex-3 → 2012.1 |
Fix proposed to branch: master /review. openstack. org/3315
Review: https:/