Impossible attach detached port to another instance

Bug #1589449 reported by Roman Podoliaka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
Roman Podoliaka

Bug Description

Upstream bug: https://bugs.launchpad.net/neutron/+bug/1572593

The follow scenario leads to error:
 - create independent port in neutron
 - boot VM in nova
 - attach port to VM via nova interface-attach. As result dns_name of port will be updated and port be attached to VM
 - detach port from VM via nova interface-detach. As result port will be detached, BUT dns_name will be still as name of VM.

if you try to attach this port to another VM you will get error, that it's not possible to attach port.

The same issue happens for Heat stack, when we have VM+port and execute update replace for Server.

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :
Changed in mos:
status: Confirmed → In Progress
assignee: MOS Nova (mos-nova) → Roman Podoliaka (rpodolyaka)
Revision history for this message
Bug Checker Bot (bug-checker) wrote : Autochecker

(This check performed automatically)
Please, make sure that bug description contains the following sections filled in with the appropriate data related to the bug you are describing:

actual result

version

expected result

steps to reproduce

For more detailed information on the contents of each of the listed sections see https://wiki.openstack.org/wiki/Fuel/How_to_contribute#Here_is_how_you_file_a_bug

tags: added: need-info
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/nova (9.0/mitaka)

Reviewed: https://review.fuel-infra.org/19911
Submitter: Pkgs Jenkins <email address hidden>
Branch: 9.0/mitaka

Commit: a775d65bfbfd41a6a3c06f39aecd79bc28e046e1
Author: Timofey Durakov <email address hidden>
Date: Mon Jun 6 10:21:01 2016

Clean port dns_name in case of port detach

Two upstream are squashed into one here, as the original change
accidentally broke Neutron CI in upstream.

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

The first commit's message is:

In case of port detach dns_name should be also
updated in Neutron

(cherry picked from commit fc66e7eb411eb8e99767c062ab8d0263738d5558)

This is the 2nd commit message:

Only reset dns_name when unbinding port if DNS is integrated

We only set the dns_name on the port if the "DNS Integration"
extension is enabled, so we should only reset it on the port
when unbinding if the extension is enabled, otherwise some
Neutron stadium plugins will fail since they don't expect
the 'dns_name' attribute to be on the port.

NOTE(mriedem): This backport adds an import that wasn't in
stable/mitaka but is used in the unit test from the original
patch.

(cherry picked from commit b256cae8e204fbbf6f3d40f5f4d47013be018a6d)

Closes-Bug: #1589449

Change-Id: I65edb33b955a91d1701fc91cb9fae0a5f26d4e46

Changed in mos:
status: In Progress → Fix Committed
Anna Babich (ababich)
tags: added: on-verification
Revision history for this message
Anna Babich (ababich) wrote :

Verified on env (1 Controller, 2 Computes, VLAN, Cinder LVM):
[root@nailgun ~]# shotgun2 short-report
cat /etc/fuel_build_id:
 452
cat /etc/fuel_build_number:
 452
cat /etc/fuel_release:
 9.0
cat /etc/fuel_openstack_version:
 mitaka-9.0
rpm -qa | egrep 'fuel|astute|network-checker|nailgun|packetary|shotgun':
 fuel-release-9.0.0-1.mos6347.noarch
 fuel-misc-9.0.0-1.mos8441.noarch
 python-packetary-9.0.0-1.mos140.noarch
 fuel-bootstrap-cli-9.0.0-1.mos285.noarch
 fuel-migrate-9.0.0-1.mos8441.noarch
 rubygem-astute-9.0.0-1.mos748.noarch
 fuel-provisioning-scripts-9.0.0-1.mos8731.noarch
 fuel-mirror-9.0.0-1.mos140.noarch
 shotgun-9.0.0-1.mos90.noarch
 fuel-openstack-metadata-9.0.0-1.mos8731.noarch
 fuel-notify-9.0.0-1.mos8441.noarch
 nailgun-mcagents-9.0.0-1.mos748.noarch
 python-fuelclient-9.0.0-1.mos324.noarch
 fuel-9.0.0-1.mos6347.noarch
 fuel-utils-9.0.0-1.mos8441.noarch
 fuel-setup-9.0.0-1.mos6347.noarch
 fuel-library9.0-9.0.0-1.mos8441.noarch
 network-checker-9.0.0-1.mos74.x86_64
 fuel-agent-9.0.0-1.mos285.noarch
 fuel-ui-9.0.0-1.mos2715.noarch
 fuel-ostf-9.0.0-1.mos935.noarch
 fuelmenu-9.0.0-1.mos272.noarch
 fuel-nailgun-9.0.0-1.mos8731.noarch
[root@nailgun ~]#

Steps to reproduce:
1. Create a port, boot an instance, attach created port to instance, detach port - http://paste.openstack.org/show/509214/
2. Boot another instance, attach the previously created and detached port - http://paste.openstack.org/show/509215/

We can see that dns_name of port is cleaned up after its detach.

Changed in mos:
status: Fix Committed → Fix Released
tags: added: 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.