Commit Graph

18 Commits

Author SHA1 Message Date
ramishra 0b593c218d Allow deleting Server/DeployedServer without swift/zaqar
When swift and zaqar used for software_config_transport
are removed/disabled in the deployment, we should be
able to delete Server/DeplpyedServer resources.

Change-Id: I4c9e0729f338de67b4b598fcd0e72646289d5025
Task: 2008685
2021-03-05 10:40:38 +05:30
ramishra 79fb6509a9 Don't create deployment when changing transport
Earlier when changing software config transport we used to
create a dummy deployment to push the metadata. However
this would not work with convergence as we take
resource lock for the update which updates the config
transport (another engine would try to update the resource
metadata for deployment when one engine has locked it).

Currently it works when updating transport as we ignore
the error in creating dummy deployment, but if there are
any new depoyments for the server they would fail.

We don't need to push the metadata as it would be pushed
when the there is a new/updated deployment.

Few additional changes in the patch:

- We don't need to ignore the error as servers are now
not replaced if the resource is in ERROR when nova server
is good/ACTIVE.
- Delete the existing tempurls and zaqar queues when
  changing transport.

Task: 41744
Change-Id: Id592b29df36320d8697bd370252ada02612ba7d0
2021-02-03 10:52:09 +05:30
Andreas Jaeger 7f770b95b8 Update pep8 rules
Remove E402 from flake8 list, issues are fixed or addressed with noqa.
Remove E305 as comment, the warning is enabled.
Enable E241 and fix all problems

Change-Id: Ifd2bbce98be4206908da769df686a370328c7ee1
2020-04-30 16:33:43 +02:00
Nakul Dahiwade fd41115805 Support for shared services in multi region mode
The services are declared in a list in config.
shared_services_types=image, volume, volumev2

Change-Id: I64c00756cc28db616e9e49e6eb1613b76a19068e
Story: 2003772
Task: 26464
2019-12-23 18:47:00 +00:00
Georgina Shippey 5ba3b60874 Add dedicated auth endpoint config for servers
Added a new config option to specify the keystone authentication
endpoint to pass into cloud-init data.

Heat code currently has several different methods of retrieving the
keystone endpoint to embed into cloud-init data for created
servers. This data is currently read from several different parts
of the heat config file rather than the service catalog which results
in URLs being passed which are appropriate for the heat service rather
than the server. In particular there can be misconfiguration of
servers due to deployments which separate the internal and
external API endpoints.

This patch introduces a new config variable
server_keystone_endpoint_type which if set
reads the keystone endpoint directly from the service catalog,
if it is unset the original behavior is unchanged.

story: 2004808
task:  28967
story: 2004524
Change-Id: I5d8fc5977014b196c34f4a59a30a7525bc778359
2019-07-12 13:50:38 +00:00
Feilong Wang 73d5b2cabe Fix multi region issue for software deployment
Except commit Iec6f3606c9fdf8474f393b0990356f34d38bcf75 we still
need this one to make sure the region name can be populated as
deployment metadata.

Task: 22854
Story: 2002781

Depends-On: I88182a9a9af74e9760b2ec9b500971f06293f0b8

Change-Id: Id87935bdb1484e66f6066361d80e245d08d9ab66
2018-07-09 21:29:27 +00:00
Zane Bitter 61412548ae Generate user passwords with special characters
When we create user accounts in order to allow signalling back to Heat,
generate the passwords using a mix of upper- and lower-case letters, digits
and special characters. This should pass most password_regex filters that
users are likely to configure in Keystone, which was not true of the
previous method (using only hex characters from a UUID).

Change-Id: I7702d6ab550e4f1f53c4cea9f67ed0402afbd66d
Closes-Bug: #1666129
Closes-Bug: #1444429
2018-03-21 16:58:10 -04:00
Jenkins ad20fe3ecb Merge "Mark Server os_collect_config attribute as CACHE_NONE" 2017-06-27 16:51:35 +00:00
huangtianhua f47d898932 Don't store rsrc_data before zaqar queue created
Store rsrc_data 'metadata_queue_id' after zaqar queue
created, to avoid unnecessary queue delete calling when
delete nova server.

Change-Id: Ib1f7759ea66794ebd57fcfcea6b9e596b0e2c1c3
Closes-Bug: #1697682
2017-06-22 07:26:41 +00:00
Zane Bitter 176c3f7d14 Mark Server os_collect_config attribute as CACHE_NONE
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
2017-06-21 20:18:46 -04:00
huangtianhua e23fcfe93a Use correct user password as occ credential
Don't generate/update user password again if
the user has already been created, to make sure
the occ credential works.

Change-Id: Iffcb7aa0fb256d36aef64f5fd0ec37af4bf47be8
Closes-Bug: #1697623
2017-06-19 08:04:18 +00:00
Jenkins d44111294f Merge "deployment_swift_data property for server resources" 2017-06-12 17:19:12 +00:00
James Slagle c78ded7c5f deployment_swift_data property for server resources
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
2017-06-07 09:33:13 +00:00
huangtianhua 08e8e790bd Deprecate property 'metadata' of OS::Heat::DeployedServer
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
2017-06-06 06:37:36 +00:00
James Slagle 64ddd07160 Add os_collect_config attribute to server resources
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
2017-05-01 17:08:03 -04:00
liyi 8f10215ffd Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: Ieec8028305099422e1b0f8fc84bc90c9ca6c694f
2017-03-25 17:11:50 +08:00
James Slagle 00b82577f1 Disable ec2 collector for deployed-server
In the deployed-server metadata that configures os-collect-config, the
ec2 collector should not be enabled. ec2 metadata is not typically
available when using the deployed-server resource.

Closes-Bug: #1669842
Change-Id: I33e062b70fdf298908656a8ed3e62ac7cae16a37
2017-03-03 13:48:55 -05:00
James Slagle 6959f4b62a Use BaseServer base class for Nova Server resource
Refactors the Nova Server resource class to use a new base class,
BaseServer.  All of the Nova/Neutron/Glance/etc specific logic for the
Server resource remains in the Server class and not in the base class.

This allows other Server subclasses, such as the DeployedServer resource
(see followup patch) to create Server "like" resources to associate with
SoftwareDeployment resources.

Partially-implements: blueprint split-stack-software-configuration
Change-Id: I585d92dbd29198107464b92ddb0e0b15779b9999
2016-12-13 06:35:42 -05:00