Don't unregister on system/resource delete

Don't unregister systems from the portal/satellite
when deleting from Heat. There are several reasons why
it's compelling to fix this behavior. See
https://bugs.launchpad.net/tripleo/+bug/1710144
for full information. The previous behavior can be triggered
by setting the DeleteOnRHELUnregistration parameter to "true".

Closes-Bug: #1710144
Change-Id: I909a6f7a049dc23fc27f2231a4893d428f06a1f1
(cherry picked from commit 35ed6c6065)
This commit is contained in:
James Slagle 2017-08-11 08:05:10 -04:00 committed by Jiri Stransky
parent 6ef94760f5
commit d0288b450d
2 changed files with 29 additions and 1 deletions

View File

@ -59,8 +59,18 @@ parameters:
description: |
When enabled, the system will perform a yum update after performing the
RHEL Registration process.
DeleteOnRHELUnregistration:
type: boolean
default: false
description: |
When true, the system profile will be deleted from the registration
service when the rhel-registration.yaml nested stack is deleted.
conditions:
unregister_on_delete:
equals:
- {get_param: DeleteOnRHELUnregistration}
- true
update_requested:
equals:
- {get_param: UpdateOnRHELRegistration}
@ -68,6 +78,12 @@ conditions:
resources:
DeploymentActions:
type: OS::Heat::Value
properties:
value:
yaql
RHELRegistration:
type: OS::Heat::SoftwareConfig
properties:
@ -142,7 +158,11 @@ resources:
name: RHELUnregistrationDeployment
server: {get_param: server}
config: {get_resource: RHELUnregistration}
actions: ['DELETE'] # Only do this on DELETE
actions:
if:
- unregister_on_delete
- ['DELETE']
- []
input_values:
REG_METHOD: {get_param: rhel_reg_method}

View File

@ -0,0 +1,8 @@
---
fixes:
- Don't unregister systems from the portal/satellite
when deleting from Heat. There are several reasons why
it's compelling to fix this behavior. See
https://bugs.launchpad.net/tripleo/+bug/1710144
for full information. The previous behavior can be triggered
by setting the DeleteOnRHELUnregistration parameter to "true".