Commit Graph

11 Commits

Author SHA1 Message Date
Ghanshyam Mann a43311b7ef Retire Tripleo: remove repo content
TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145

this commit remove the content of this project repo

Change-Id: Ic209179b0be9c3746a702ccea2dd35e883e78bee
2024-02-24 11:43:49 -08:00
Juan Antonio Osorio Robles 8688c2878a Set correct content-type for o-r-c curl calls
They contained json data, so they need application/json as the
content types. Else, some wsgi implementations will interpret the
contents in an undesired way, such as apache's mod_wsgi setting the
whole POST body as a POST parameter with no value.

Change-Id: Id988e8d286761550da4849c0695f5f5a37116a11
Closes-Bug: #1641589
2016-11-14 16:12:34 +02:00
Steven Hardy de7012df7c Don't send duplicate signals via 99-refresh-completed
Currently we send signals for every deployment, even those already
completed, so instead keep a record of already-signalled deployments
similar to how heat-config does, which will remove the annoying
SIGNAL_COMPLETE: Unknown events (and possibly be slightly faster too).

Partial-Bug: #1564627
Change-Id: I0ec7ed4cc4e58a43a91e8323cb9a1bcaaafc9752
2016-05-11 14:43:40 +00:00
Steven Hardy e6b9609473 Return derived config id when signalling deployments
Currently signalling via 99-refresh-completed only uses the legacy
curl data payload (e.g that for CFN compatible WaitConditions),
but now we're using it exclusively for signalling SoftwareDeployment
resources, which support a different payload, including deploy_stdout
which is accessible via a resource attribute.

Returning a payload for deploy_stdout containing the derived config ID
is potentially useful as it changes whenever the SoftwareConfig or any
inputs change, thus can be used as a unique identifier for dependent
resources which need to be re-triggered when some config is reapplied,
for example puppet manifests with a dependency on hieradata applied
via a SoftwareDeployment.

get_attr: [ControllerDeployment, deploy_stdout]

Partial-Bug: #1463092
Change-Id: Ic62b6303795f70f3b9ace46731a21d1c0e7fe6c7
2015-06-16 10:06:49 -04:00
Steven Hardy 93e05f569e Signal all o-a-c deployments in 99-refresh-completed
Currently we have a TripleO specific template pattern, where all
deployment resources are configured NO_SIGNAL, regardless of what
DefaultSignalTransport is set to, and only one signal for all
deployments is sent via the *AllNodesDeployment resources, by adding
the heat-generated deploy_signal_id to the structured config data
consumed by os-apply-config (as "completion-signal").

This is inconsistent with all signalling done via heat-config (e.g
everything other than o-a-c, which is triggered via a hook via
55-heat-config, this transparently consumes the heat-generated
deploy_signal_id and signals heat after each deployment hook is
run.

To allow per-deployment signalling for os-apply-config configs,
this adds logic which looks in the deployment data processed by
os-apply-config and signals all deployments deploying a config with
group "os-apply-config" (everything else should be handled by 55-heat-config)

Note that if the deployment is configured NO_SIGNAL, no deploy_signal_id
will be set, thus this will do nothing, and currently this won't work with
HEAT_SIGNAL, only CFN_SIGNAL (which is the default for deployments with no
signal_transport specified).  In future it would be good to add support for
HEAT_SIGNAL to break the dependency on heat-api-cfn.

This is backwards compatible, but after it's merged we can remove all the
NO_SIGNAL's in the templates, and the completion-signal key from the
allNodesConfig, which should in future allow more flexible control of
the ordering of metadata update for configs applied via o-a-c (as well
as better visibility of progres during deployment).

Co-Authored-By: Dan Prince <dprince@redhat.com>

Change-Id: I72ea524effd07deeb432fb38ee7da5f3dc7990a7
Closes-Bug: #1389178
2015-01-23 13:00:28 +00:00
Gregory Haynes 0bd3fa87d6 Error out when complete waitcondition fails
When we curl to the complete waitcondition url we don't consider heat
returning an error as reason to exit with error. This prevents us from
attempting to re-run the configuration and thus we never signal heat
again.

Change-Id: I915825d76ec889bc09b81ad93f70b34d909262b0
Closes-bug: #1306294
2014-05-16 16:09:17 +12:00
Michael Kerrin 721cedc2e6 refresh-completed always failing
99-refresh-completed is always failing for me know.

The review I69d9103b07100f700fb71a2cbbf267042625e7a7 was failing the
non-voting CI but was merged in any ways. This patch tried to put
all the if logic on one line but was too smart for its own good as
kept getting the following error in os-collect-config:

+ curl -X PUT -H Content-Type: --data-binary '{"Status" : "SUCCESS","Reason" : "Configuration Complete","UniqueId" : "i-00000001","Data" : "Finished os-refresh-config."}' 'http://192.0.2.1:8000/v1/waitcondition/arn%3Aopenstack%3Aheat%3A%3A5cb53cbf0dad47cf9fcc4761e79a6a53%3Astacks%2Fundercloud%2F6411748e-ee64-4467-a81f-a4d0e8bb097b%2Fresources%2FnotCompute0CompletionHandle?Timestamp=2014-04-09T14%3A56%3A50Z&SignatureMethod=HmacSHA256&AWSAccessKeyId=50006a08504d41c39402ae0423cab992&SignatureVersion=2&Signature=A89ZrnQr6ZE8caXcn4uDY8sNE%2FbjmcsyXESzaQdG6fg%3D'
<resource>notCompute0CompletionHandle</resource>+ '[' -n '' ']'
[2014-04-09 15:03:23,550] (os-refresh-config) [ERROR] during post-configure phase. [Command '['dib-run-parts', '/opt/stack/os-config-refresh/post-configure.d']' returned non-zero exit status 1]

Change-Id: I0bf2ecfdad299b27b47a27496f9a833efa039206
2014-04-09 11:25:05 -04:00
Clint Byrum b277adeddf Add support for "signals" to os-refresh-config
The new software config / deployments resources use signals.

A subtle difference between wait condition handles and signals in Heat
is that signals use POST, but wait conditions use PUT. This has
historical reasons that mostly are due to Amazon compatibility. We need
to continue to support both until we can eliminate all use of wait
conditions.

Change-Id: I69d9103b07100f700fb71a2cbbf267042625e7a7
2014-04-01 10:12:17 -07:00
Derek Higgins bf2de45122 Add default to metadata in 99-refresh-completed
This metadata isn't present on the seed, causing the calls to
os-apply-config to fail.

Change-Id: Ia2978599013ccd3f39a06e0d8163b62a887c1f6e
2013-11-26 13:26:24 +00:00
Clint Byrum 7abf14ab18 Make generic waitcondition for os-refresh-config
Most of the time we will find it useful to pass a wait condition in for
os-refresh-config to signal when it has completed successfully.

This supersedes the notcompute element's completion-handle, so we can
remove that element. It should be removed from tripleo-incubator and
tripleo-ci as well.

Change-Id: Iff65da3dd0a1db496cfd33b4a55abb13c68c9558
2013-11-25 19:24:04 -08:00
Clint Byrum d5f7d7e7c0 Fix os-refresh-config failing without scripts.
It is valid to request os-refresh-config without putting any scripts in
the element root. This fixes failing builds of heat-cfntools.

Change-Id: I4f70b33e453399ff5baa48919557995a6eb27520
2013-03-21 18:11:22 -07:00