~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to nova/network/manager.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-04-04 09:25:14 UTC
  • mfrom: (1.1.52)
  • Revision ID: package-import@ubuntu.com-20120404092514-ry1k7mjzd6plivdk
Tags: 2012.1~rc3-0ubuntu1
* New Upstream release. 
* debian/control: Conflict nova-vncproxy with novnc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1219
1219
 
1220
1220
        if FLAGS.force_dhcp_release:
1221
1221
            dev = self.driver.get_dev(network)
1222
 
            vif = self.db.virtual_interface_get_by_instance_and_network(
1223
 
                    context, instance_id, network['id'])
 
1222
            vif_id = fixed_ip_ref['virtual_interface_id']
 
1223
 
 
1224
            # NOTE(vish): The below errors should never happen, but there may
 
1225
            #             be a race condition that is causing them per
 
1226
            #             https://code.launchpad.net/bugs/968457, so we log
 
1227
            #             an error to help track down the possible race.
 
1228
            msg = _("Unable to release %s because vif doesn't exist.")
 
1229
            if not vif_id:
 
1230
                LOG.error(msg % address)
 
1231
                return
 
1232
 
 
1233
            vif = self.db.virtual_interface_get(context, vif_id)
 
1234
 
 
1235
            if not vif:
 
1236
                LOG.error(msg % address)
 
1237
                return
 
1238
 
1224
1239
            # NOTE(vish): This forces a packet so that the release_fixed_ip
1225
1240
            #             callback will get called by nova-dhcpbridge.
1226
1241
            self.driver.release_dhcp(dev, address, vif['address'])