Pre-created ports get deleted on VM delete

Bug #1486727 reported by Fabrizio Soppelsa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Invalid
Critical
Roman Podoliaka
6.0.x
Fix Released
Critical
Denis Meltsaykin
6.1.x
Fix Released
Critical
Vitaly Sedelnik
7.0.x
Invalid
Critical
Roman Podoliaka

Bug Description

Can we backport https://bugs.launchpad.net/nova/+bug/1158684 to 6.1?
This is in the scope of the related https://bugs.launchpad.net/mos/+bug/1486682

Changed in mos:
importance: Undecided → Critical
status: New → Confirmed
milestone: none → 6.1-updates
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/nova (openstack-ci/fuel-6.1/2014.2)

Fix proposed to branch: openstack-ci/fuel-6.1/2014.2
Change author: Gary Kotton <email address hidden>
Review: https://review.fuel-infra.org/10622

Changed in mos:
status: Confirmed → In Progress
Changed in mos:
assignee: MOS Nova (mos-nova) → Roman Podoliaka (rpodolyaka)
Revision history for this message
Vitaly Sedelnik (vsedelnik) wrote :

Invalid for 7.0 (the fix is consumed from stable/kilo), Confirmed for 6.1-updates and 6.0-updates

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/nova (openstack-ci/fuel-6.0-updates/2014.2)

Fix proposed to branch: openstack-ci/fuel-6.0-updates/2014.2
Change author: Gary Kotton <email address hidden>
Review: https://review.fuel-infra.org/11085

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/nova (openstack-ci/fuel-6.0-updates/2014.2)
Download full text (3.3 KiB)

Reviewed: https://review.fuel-infra.org/11085
Submitter: Vitaly Sedelnik <email address hidden>
Branch: openstack-ci/fuel-6.0-updates/2014.2

Commit: 6aa6cbecbc5867dd60843048b6f79921d9c59d79
Author: Gary Kotton <email address hidden>
Date: Wed Sep 2 20:17:59 2015

WIP: Preserve preexisting ports on server delete

Test squashed change.

=====================================================================

Network: manage neutron client better in allocate_for_instance

A neutron client only needs to be created twice in the aforementioned
method. The first time is for the tenant and the second, if necessary,
is for the admin. This is in the event that a port binding extension
is supported (only an admin user can read this).

In addition to this is a client exists then the method will make use
of it passing it to all internal methods called. This will enable them
to reuse that client instead of creating a new one.

Change-Id: Ia826199ea600ab55447ca4e8a78738c21b473efa
Closes-bug: #1377647

Add setup/cleanup_instance_network_on_host api for neutron/nova-network

When reschedule/unshelve/evacuate/rebuild instance, the instance
is moved from one host to another. The network should be updated
for the instance. And there are similar APIs
migrate_instance_start/stop, those two APIs should be used for
migration case as the name. So adds new APIs used to update
network resource when instance is moved.

This patch implements the new APIs both for neutron and
nova-network.

Change-Id: I513e0a08b32aa7f38c480488b398cd97d8cdc471
Related-bug: #1327124

Conflicts:
 nova/network/neutronv2/api.py

=====================================================================

Preserve preexisting ports on server delete

When using the '--nic port-id' option for nova boot to bind
a server to an existing port, nova deletes the preexisting
port on server terminate (delete). This behavior is not correct
since the user has preallocated the port object and will
expect it to only be unbound from the server on delete.

This patch allow the existing port to be unbound from the instance
on server delete whereupon the port will still exist but not
be associated with the instance in neutron (note the '--nic
port-id' opt is only supported with neutron). The patch also
adds unit tests to verify the behavior + changes.

This patch also moves instance.info_cache.delete() to be called
after _shutdown in the compute manager as shutdown calls
deallocate_for_instance so the info_cache is still needed at this point.

Based on original work from Aaron Rosen <email address hidden>
for which you can see a stale patch review here:
https://review.openstack.org/#/c/77043/

UpgradeImpact:

Existing applications that created neutron ports and assigned them to a running
instance or to a instance that is created will need to be aware
that they are now respponsible for the deletion of the ports and that these
ports will not be deleted by nova when the instance is destroyed.

Co-authored-by: Aaron Rosen <email address hidden>
Co-authored-by: Davanum Srinivas <email address hidden>

Change-Id: Ia5367cf064d40690670ffeac3c1f16998464c234
Closes-bug: 1158684

Conflicts:
 nova/network/neutronv2/api.py
 nova/te...

Read more...

Revision history for this message
Vitaly Gusev (vgusev) wrote :

Verified on 6.0 with packets *nova*2014.2-fuel6.0~mira34_all.deb from mirror http://osci-obs.vm.mirantis.net:82/ubuntu-fuel-6.0-updates-stable/ubuntu

tags: added: 6.0 release-notes-done
Changed in mos:
milestone: 6.1-updates → 8.0
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Related fix proposed to openstack/heat (openstack-ci/fuel-6.0-updates/2014.2)

Related fix proposed to branch: openstack-ci/fuel-6.0-updates/2014.2
Change author: Steve Baker <email address hidden>
Review: https://review.fuel-infra.org/11437

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Related fix merged to openstack/heat (openstack-ci/fuel-6.1/2014.2)

Reviewed: https://review.fuel-infra.org/10628
Submitter: Vitaly Sedelnik <email address hidden>
Branch: openstack-ci/fuel-6.1/2014.2

Commit: 6b4e6e5ee21d815451ad866a38a0b58114f95014
Author: Steve Baker <email address hidden>
Date: Thu Sep 10 13:03:28 2015

OS::Neutron::Port default replacement_policy=AUTO

Now that nova bug 1158684 has been fixed heat can assume that a port
won't be deleted by nova during a stack update.

REPLACE_ALWAYS as a default caused its share of issues, including
servers not handling the port churn on stack updates.

REPLACE_ALWAYS is left as an option for standalone heat orchestrating
older OpenStack releases.

Change-Id: Ie9b2ebe8b29bd5ed6006dfb59c6dccd4a595832f
Closes-Bug: #1486682
Related-Bug: #1486727

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Related fix merged to openstack/heat (openstack-ci/fuel-6.0-updates/2014.2)

Reviewed: https://review.fuel-infra.org/11437
Submitter: Vitaly Sedelnik <email address hidden>
Branch: openstack-ci/fuel-6.0-updates/2014.2

Commit: 440fe027b34b00ea40b429662593fd155b5d68ee
Author: Steve Baker <email address hidden>
Date: Fri Sep 11 09:24:36 2015

OS::Neutron::Port default replacement_policy=AUTO

Now that nova bug 1158684 has been fixed heat can assume that a port
won't be deleted by nova during a stack update.

REPLACE_ALWAYS as a default caused its share of issues, including
servers not handling the port churn on stack updates.

REPLACE_ALWAYS is left as an option for standalone heat orchestrating
older OpenStack releases.

Change-Id: Ie9b2ebe8b29bd5ed6006dfb59c6dccd4a595832f
Closes-Bug: #1486682
Related-Bug: #1486727

tags: added: on-automation
Revision history for this message
Ekaterina Shutova (eshutova) wrote :

Test for this bug is written: https://review.gerrithub.io/#/c/277702/

tags: added: covered-automated-test
removed: on-automation
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.