depending on compute API version, flavor in the instance representation
may not have "id" field, but "original_name" instead.
Story: 2009753
Task: 44211
Change-Id: Ieeae2f36f5e59e01f57a2f8e66a983ec3d99ec63
The server.addresses (/servers/{server_id}/ips)
endpoint can contain stale data causing attribute
lookups to fail.
This change replaces the use of server.addresses
and instead uses the neutron client to list ports
with 'device_id' matching the server id.
Story: 2008632
Task: 41843
Related: RHBZ#1902230
Change-Id: I1b9293041f2ad92eac0e9bc9646e7b2d7c6f7fd0
This patch returns a stack validation error if the nova microversion
is 2.57 or greater and the personality parameter is also specified
in the templates.
Change-Id: I0919150baa36112ccbd8bfd7ccebc7aab5735cf3
Task: 41229
Six is in use to help us to keep support for python 2.7.
Since the ussuri cycle we decide to remove the python 2.7
support so we can go ahead and also remove six usage from
the python code.
Review process and help
-----------------------
Removing six introduce a lot of changes and an huge amount of modified files
To simplify reviews we decided to split changes into several patches to avoid
painful reviews and avoid mistakes.
To review this patch you can use the six documentation [1] to obtain help and
understand choices.
Additional informations
-----------------------
Changes related to 'six.b(data)' [2]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
six.b [2] encode the given datas in latin-1 in python3 so I did the same
things in this patch.
Latin-1 is equal to iso-8859-1 [3].
This encoding is the default encoding [4] of certain descriptive HTTP
headers.
I suggest to keep latin-1 for the moment and to move to another encoding
in a follow-up patch if needed to move to most powerful encoding (utf8).
HTML4 support utf8 charset and utf8 is the default charset for HTML5 [5].
Note that this commit message is autogenerated and not necesserly contains
changes related to 'six.b'
[1] https://six.readthedocs.io/
[2] https://six.readthedocs.io/#six.b
[3] https://docs.python.org/3/library/codecs.html#standard-encodings
[4] https://www.w3schools.com/charsets/ref_html_8859.asp
[5] https://www.w3schools.com/html/html_charset.asp
Patch 11 of a serie of 28 patches
Change-Id: I1d796ac4dbe29217ed87015cde21597dbcd4cf9b
Failures in the gate suggest that it is now somehow possible for the
Glance image created by a snapshot to appear to have been created even
while the Nova server remains in a state like 'image_uploading'. Servers
in this state cannot be rebuilt (to restore a snapshot). To ensure that
the snapshot has actually completed before the resource is marked
SNAPSHOT_COMPLETE, check the task state of the server as well as the
state of the snapshot image in Glance.
Change-Id: I2b5cddcbeab849054d84501dfcec48442f3666d3
Co-Authored-By: Rico Lin <rico.lin.guanyu@gmail.com>
Task: 36964
Fedora CoreOS will replace Fedora Atomic being the next generation
container OS. So it would be nice to support Fedora CoreOS in Heat.
In Fedora CoreOS, the cloud-init will be replaced with Ignition[1],
so the changes proposed in this patch are mainly focusing on how to
support Ignition when using Heat SOFTWARE_CONFIG with Ignition.
Task: 36671
Story: 2006566
Change-Id: I11df2431634de7d8b584b1a2ac733d43959e34fc
The default values for the 'delete_on_termination' flag for
the 'block_device_mapping_v2' depends on other parameters
of the mapping and it is not obvious for a user which default
is used in which case.
This patch documents the defaults for the different cases.
Change-Id: I44e3646e55c067aea95044f5da7c5536387d6f23
Signed-off-by: Andreas Florath <Andreas.Florath@telekom.de>
This patch deprecate personality property for `OS::Nova::Server`.
Since that property is deprecated by nova since version 2.57,
we should plan to Hidden that property soon.
please use ``user_data`` or ``metadata`` instead. If that
property really required, use config ``max_nova_api_microversion``
to set the maximum nova API microversion <2.57 for nova client
plugin to support personality property.
Add config option ``max_nova_api_microversion`` to set the maximum
nova API microversion for nova client plugin.
Story: #2004188
Task: #29979
Change-Id: I1852739e818ec67ac5a821e436e243eaa72f0938
This change adds 'network' to the addresses attribute of the
OS::Nova::Server resource. This enables resolving the
properties of the neutron network for the server resource.
Story: 1766946
Task: 19690
Change-Id: I5bef751982919103ecbefeee64bf0f2cbede0cd0
This change adds 'subnets' to the addresses attribute of the
OS::Nova::Server resource. This enables resolving the subnet
properties for the server resource which brings parity with
OS::Neutron::Port's 'subnets' attribute.
Story: 1766946
Task: 19689
Change-Id: I6927f1e142e83df7258e259bffc86819e4cbe881
Use update_networks_matching_iface_port() to populate old_nets
with implicit values from interfaces before matching new_nets
properties. The network is not updated if added properties match
what is currently on the interface.
Without this chanage a stack created with...
networks:
- network: net0
... then updated with...
networks:
- network: net0
subnet: subnet0
... would result in a port replace, which is not necessary if the
implicit subnet used when the stack was initially created was also
'subnet0'. The port being replaced will result in neutron re-running
ipam and the ip_address associated would change.
Closes-Bug: #1696483
Closes-Bug: #1702279
Depends-On: Ic4bbbcc3cee329a4de8f0eac710128175c4fc397
Change-Id: Iab75ec49b962617943017dcaf1b04b89f91a982e
Implements: blueprint tripleo-routed-networks-deployment
Use named constants to pass as the 'resource' parameter to the
find_resourceid_by_name_or_id() method of the Neutron client plugin.
Apart from making everything more explicit and less error-prone, this also
provides clarity on the meaning of obtuse names like 'policy' (QoS, not
any other kind of policy) or 'pool' (load balancer, not subnet).
Change-Id: If9b5528835775d303db477fafabf3ed6bd224bd0
Implicit dependencies are calculated before resources are validated.
Therefore, any error getting a property that occurs during processing on
implicit dependencies will be raised without any of the context of which
resource is in error. By ignoring such property errors in implicit
dependency calculations, we can defer the error handling until the
actual resource validation and thus give the user an error message they
can actually use.
Change-Id: If7e0e8fd46b1b06a29cdd89743635ed32a9392e7
Closes-Bug: #1708209
When deleting the snapshot image for server resource,
we didn't use the correct client plugin, to use
'glance' instead of 'nova'.
Change-Id: I2c0e72cd6819ba2b1e27308a32b59f020804fcfd
The floating ips will be detached from server when delete
the server. So we don't have to detach those floating ips
explicitly before calling server delete.
Change-Id: I7f85d7f12c58872d790ebfe565931985099ec846
Partial-Bug: #1700830
When the os_collect_config attribute was added to OS::Nova::Server (in
64ddd07160), it was implemented both in
_resolve_attribute() and in get_attribute(), with the latter overriding the
former so it is never called (for this attribute) and so that the value is
never cached. To be sure, to be sure, the attribute caches - which cannot
contain the value of this attribute - were cleared whenever the deployment
data is updated.
It's much easier to just mark the attribute as CACHE_NONE. This also makes
the status of this attribute visible to other parts of the code.
Change-Id: Icaecf70529f19fb32b34de9cedb82e5006282002
Partial-Bug: #1660831
Partially-Implements: blueprint split-stack-default
Since d4188127a1 the documentation for the
user_data property of OS::Nova::Server has been dangerously misleading,
stating that updates to the property don't cause replacement of the
resource, which is not true by default. This adds documentation that
explains exactly what is going on.
Change-Id: I2d95205fbcbd0bfafa6690a6efec1a56441ce22d
Adds a new property, deployment_swift_data for server resources. The
property is a map containing the swift container and object name to use
for storing the deployment data and generating temp url's for the
resource.
Making this a property allows it to be created externally from Heat with
known values prior to stack creation. This allows the configuration of
the os-collect-config agent on deployed servers prior to starting the
Heat stack creation.
implements blueprint split-stack-default
Change-Id: Ia07e9374a4b95bd0e74fc47fb9df4bf6ad096715
The property 'metadata' doesn't make sense for resource
OS::Heat::DeployedServer, because the deployed server can
be provisioned out of nova. The deployment metadata
we can set by resource.metadata, so deprecate the
property 'metadata' and ignore it.
Change-Id: Id218d699a0d49f127243ec537f719dd247197279
Closes-Bug: #1693661
Heat assumes image/volume/snapshot in bdm_v2
as bootable sources, if user does not specify
the 'boot_index' for them, heat will give the
value '0' for all of them, but nova does not
allow this.
This patch adds validation to avoid the error.
Closes-Bug: #1658007
Change-Id: I6809c8cb839eba20ffe12f783854fbaa7b9267d6
The change to stop using the Nova passthrough API for networking in
e8e0a2483a changed the type of exceptions
expected in a couple of places, without changing the exception handling
code accordingly.
7b17c8b4ee changed the exception handling
in one case, but continued to raise the exception instead of suppressing
it.
This patch suppresses the exception, and makes the same change to
another case of the problem.
Use a different network name for test_create_server_with_port instead of
'my_net' which is also used by one of the other tests in the same file,
to avoid the conflict at its source.
Change-Id: I2f1210e546a5ad7eef3ffd6537335049120b2d2c
Co-Authored-By: Zane Bitter <zbitter@redhat.com>
Closes-Bug: #1694412
Check for the correct exceptions from neutronclient
when replacing network id with network name in
'networks' attribute of server.
This also changes one of the tests to use a different
network name.
Change-Id: I9457ed93857805ee30e550f23b1da3d262dd83fd
Closes-Bug: #1694412
When resource references are used for properties restore
does not work for nova server and volume resources.
This patch fixes it and adds a functional test for it.
Change-Id: I34efb3f4e0d3578d95134793f5c5d413667790e0
Closes-Bug: #1687009
Now that we're making glance client api calls to get the image
after the snapshot is created, the image status is returned
in lower case.
This also fixes handle_delete_snapshot to make the correct
client api call.
Change-Id: I60c84d4bc3ba75604b0c5bd6c4819cd0504f1cc8
Closes-Bug: #1691939
New python-novaclient release has removed support for
network/image/floating_ip apis. This also means
nova-network support would also cease to exist after
this change.
Change-Id: Icbcf279c10720f99a0aed1a3aaaf3945c5442a8a
Closes-Bug: #1690936
Supports to specify string values 'none' and 'auto' for
networks while creating nova server. auto: automatically
allocate network resources if none are available;
none: do not attach a NIC at all. Nova supports these
string values since api version '2.37'.
Change-Id: If65f193dfdaedec3e549a8bd7b39e5f1c02be658
Blueprint: support-auto-none-special-network
Closes-Bug: #1646360
Add a new attribute, os_collect_config to the server resources. The
attribute's value is a map representing the configuration for the
os-collect-config agent on the actual servers.
Adding this data as an attribute will allow it to be represented in a
stack output and also queried directly in the templates.
implements blueprint split-stack-default
Change-Id: I8acfd67cd8138d587cc362184c84a08134bf3157
Remove all undesirable properties.data usages in resource
plugins. This usages can be harmless replaced with self.properties.
Change-Id: Ic8f619adc09fc5a2bd8e5cdb02d058199318b6c9