nova/doc
Kevin_Zheng cbf3b7c703 Don't delete neutron port when attach failed
Currently, when attaching neutron pre-existing
port to an instance, if the attach failed, it
will also be deleted in Neutron side due to
bad judgement of the who created the port by
reading not up-to-date info_cache.

The workflow starts at:
https://github.com/openstack/nova/blob/9ed0d6114/nova/network/neutronv2/api.py#L881
ordered_ports and preexisting_port_ids are
the same when attaching a preexisting port
to an instance and it calls
https://github.com/openstack/nova/blob/9ed0d6114/nova/network/base_api.py#L246
which calls back into the neutronv2 api code
https://github.com/openstack/nova/blob/9ed0d6114/nova/network/neutronv2/api.py#L1274
and at this point, compute_utils.refresh_info_cache_for_instance(context,
instance) won't have the newly attached port in it(see
debug log: http://paste.openstack.org/show/613232/)
because _build_network_info_model() is going to
process it. The instance obj in memoryt with old
info_cache will be used at rollback process and
causing the miss-judging.

This patch fixed it by updating instance.info_cache
to the new ic after it is created.

 Conflicts:
	doc/notification_samples/instance-shutdown-end.json

Co-Authored-By: huangtianhua@huawei.com
Change-Id: Ib323b74d4ea1e874b476ab5addfc6bc79cb7c751
closes-bug: #1645175
(cherry picked from commit 115cf068a6)
2018-10-03 17:10:04 +02:00
..
api_samples Merge "Revert "Proper error handling by _ensure_resource_provider"" into stable/ocata 2018-04-20 05:21:11 +00:00
ext Merge "Removes unnecessary utf-8 encoding" 2017-02-03 06:00:47 +00:00
notification_samples Don't delete neutron port when attach failed 2018-10-03 17:10:04 +02:00
source Merge "Fix docs for IsolatedHostsFilter" into stable/ocata 2018-04-17 16:05:41 +00:00
README.rst Rearranges to create new Compute API Guide 2015-11-12 10:47:23 +00:00

OpenStack Nova Documentation README

Both contributor developer documentation and REST API documentation are sourced here.

Contributor developer docs are built to: http://docs.openstack.org/developer/nova/

API guide docs are built to: http://developer.openstack.org/api-guide/compute/

For more details, see the "Building the Documentation" section of doc/source/development.environment.rst.