This change adds a replacement_policy property to OS::Neutron::Port
which defaults to always replacing the port on stack-update
regardless of any changes to the template.
Currently when a server is replaced, the new server is booted with
the port that is still attached to the old server, which raises a
port-still-in-use error.
Even if heat managed to detach and attach a single port, Nova currently
deletes all ports on interface-detach and server delete, so the port
would no longer be available anyway.
This change ensures that a new server is always booted with a new port,
so it fixes the above 2 issues, however there are implications for
other scenarios.
If the server is not replaced during the stack-update, the server
handle_update will detach/attach to the new port, so this is fine.
If the port specifies a fixed_ips ip_address which doesn't change
during stack-update, an error will be raised that 2 ports exist
with the same IP address. The only current workaround would be
to set update_policy:AUTO and not make any changes to the server
which results in server replacement (or do 2 stack updates using
a transition ip_address).
Likewise, update_policy:AUTO will need to be set on any port
consumed by resources which don't support update without replacement
(such as OS::Neutron::FloatingIP and OS::Trove::Instance)
Reviewed: https:/ /review. openstack. org/121693 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=30ece56a211 8bff073e36a1083 24d12ee646fab6
Committed: https:/
Submitter: Jenkins
Branch: master
commit 30ece56a2118bff 073e36a108324d1 2ee646fab6
Author: Steve Baker <email address hidden>
Date: Mon Sep 15 16:37:29 2014 +1200
Default port policy to force replacement
This change adds a replacement_policy property to OS::Neutron::Port
which defaults to always replacing the port on stack-update
regardless of any changes to the template.
Currently when a server is replaced, the new server is booted with still-in- use error.
the port that is still attached to the old server, which raises a
port-
Even if heat managed to detach and attach a single port, Nova currently
deletes all ports on interface-detach and server delete, so the port
would no longer be available anyway.
This change ensures that a new server is always booted with a new port,
so it fixes the above 2 issues, however there are implications for
other scenarios.
If the server is not replaced during the stack-update, the server
handle_update will detach/attach to the new port, so this is fine.
If the port specifies a fixed_ips ip_address which doesn't change
during stack-update, an error will be raised that 2 ports exist
with the same IP address. The only current workaround would be
to set update_policy:AUTO and not make any changes to the server
which results in server replacement (or do 2 stack updates using
a transition ip_address).
Likewise, update_policy:AUTO will need to be set on any port :FloatingIP and OS::Trove: :Instance)
consumed by resources which don't support update without replacement
(such as OS::Neutron:
Change-Id: I558db6bac196f4 9e5c488a577f058 0c934b06747
Closes-Bug: #1301486
Related-Bug: #1158684
Related-Bug: #1369748