Commit Graph

21 Commits

Author SHA1 Message Date
Takashi Kajinami 0235a734e4 Fix python shebang
The current shebang requires /usr/bin/python which is not available in
Ubuntu Jammy by default.

Change-Id: I142472eb20591fc752db9ca06c954d362cd3e405
2023-10-17 16:02:20 +00:00
likui 7b525d8eeb Remove six
The Python 2.7 Support has been support
So remove hacking rules for compatibility between python 2 and 3

Change-Id: Ia0fe869b80d330551cc9dac06c23001faf229542
2020-11-16 06:52:57 +00:00
Andreas Florath d9b19159c0 Fixes problem with distutils installed packages on Centos and Suse
Centos and (Open)Suse use distutils to install python packages.  Since
version 10 pip will not remove them - and therefore cannot be used to
update those packages.
Implemented is a workaround which is taken from the diskimage-builder.

Change-Id: I2ecfbb00ba6034c3b09aa83a66cd99c85b463fff
Story: 2005899
Task: 33761
Signed-off-by: Andreas Florath <Andreas.Florath@telekom.de>
2019-08-19 17:03:19 +00:00
Sorin Sbarnea ce85c96692 Make heat-config logging more human friendly
Address problem where the logs made by heat-config where barely readable
as they contained wrapped stdout/stderr lines. By printing the value in
beautified YAML format, we make it possible for the humans to read them.

As a safety measure if conversion fails it fallsback to original string.

Change-Id: I64b2beb6eb2927c683f5188b000a7210be7da592
Partial-Bug: #1787912
2018-12-10 15:44:34 +00:00
Quique Llorente 294969926f Added missing json 'encode' function
At python3 strings are not byte arrays, we have to encode them.

Change-Id: Ia9254fdeab853ab663d93973dc1fae1e5dbc26ab
2018-11-08 13:02:14 +01:00
Quique Llorente 73e2125532 Replace basestring with six.string_types
openstack/heat-templates has the issue but heat-agents was missing it

Change-Id: Id6da9285eeeb12b86164a080271d3f9ba40177dd
2018-11-06 15:24:17 +01:00
Quique Llorente 64b57bfef7 Use with statement to enforce file close
We found some race conditions at overcloud deploy, looks like after
running 55-heat-config, the -notify.json files are not there yet.

This review enforce a close() of the file with a with statement

Change-Id: I7d342893d790efa798ff8df379c6942eca5b7ec3
2018-09-13 16:00:40 +02:00
Feilong Wang fdd6a5f537 Add region_name for heat-config-notify
Now there is no region name when heat-config-notify try to get the
heat endpoint or zaqar endpoint. As a result, it could be a wrong
one returned from Keystone because there is no region name specified.
This patch fixes it.

Please refer Iec6f3606c9fdf8474f393b0990356f34d38bcf75 for the change
in Heat.

Please refer I88182a9a9af74e9760b2ec9b500971f06293f0b8 for the change
in occ.

Task: 22720
Story: 2002781

Change-Id: I8e0518fa61e237ec055834dd4bebe0fc87cd6627
2018-07-08 08:20:34 +12:00
Steven Hardy e2f3df268d Expose error when a hook script raises an exception
Currently this can result in errors being ignored so it's not clear
to the user that something failed.

Change-Id: Idf6badecbfa72150f3506a485eed9ae2cb5858f7
Story: 2002084
Task: 19753
2018-05-22 17:53:53 +01:00
Spyros Trigazis 9f9ae41d45 Add keystoneclient in heat-config
heat-config/bin/heat-config-notify misses
the keystoneclient.

Change-Id: Ib5b80318631419203553cc112bd07d2fbd3e7ac2
Closes-bug: #1742737
2018-01-11 16:34:42 +00:00
Alex Schultz 756fcafdf0 Retry logic for url request in heat-config-notify
Adds retry logic for software deployments using the url signals
to ensure that requests are retried if network connection issues
occur or a 500, 502, 503, or 504 is returned by the http or https
endpoint.

Note: this does not add retry logic to heatclient or zaqarclient
if they are used for signaling.

Change-Id: I82dff4a4b9fac05c5ec649db3eb379bdec71e208
Related-Bug: #1731540
2017-11-14 21:10:34 +00:00
Dan Prince 1179f411de whitelist os-apply-config group in 55-heat-config
This patch whitelists the os-apply-config 'group' from getting logged
as an error message because there is no hook script. This is a legacy
group used in TripleO for several things.

Change-Id: If128d8e707548815defc72212c59ad53348b5adf
Closes-bug: #1715497
2017-09-06 17:30:01 -04:00
Thomas Herve 25cd394bbe Add py3.5 support
Depends-On: Ibda89b467b461b8833515f50a0cf1cc3064cb917
Change-Id: I68ac61b7d1d0d180a7696ae2f0f75b1a4a969995
2017-07-17 13:43:43 +00:00
Alex Schultz 1a44aa71d1 Add splay option
Add the ability to configure the splay option that was recently added to
os-collect-config.

Change-Id: I8353d5ce6e671aaba84ac58e4c468089c8133216
Related-Bug: #1677314
2017-04-19 15:52:59 -06:00
Dan Prince 996c6b1970 Add zaqar.use_websockets option to o-c-c
Change-Id: Iad5d7cc77157e00fb6ba27f589fa0bf5384bab3a
2017-03-04 10:27:39 -05:00
Jenkins a49c1f6d5e Merge "Prevent trailing whitespace in rendered JSON" 2017-01-23 21:36:44 +00:00
Jenkins e96dc0ecf6 Merge "Switch no hook message to an error" 2017-01-18 09:31:30 +00:00
Zane Bitter 4390d3e5f4 Add boot-config files for os-apply/collect-config
Change-Id: Ifbee6fa2d6b5e730857a9e2f9ee04c3311288072
2017-01-13 11:45:11 -05:00
Martin André 9ce538b6ff Prevent trailing whitespace in rendered JSON
On python <3.4 the separator for json.dump() defaulted to (', ', ': ')
which may cause trailing whitespaces in rendered JSON files when used
with indent. This change sets the separator to (',', ': ') to prevent
trailing whitespaces with older versions of python.

See https://docs.python.org/2/library/json.html#basic-usage

Change-Id: I81fabd54659bdb28da43fb4900f19dd94a70336c
2017-01-13 12:07:51 +01:00
Alex Schultz f20bf0a15f Switch no hook message to an error
If the end host does not have the appropriate heat-agent hook installed,
the message for this is printed out as a warning. It's more likely that
this is an error condition if a user is configuring a stack to be
deployed with a specific tool and it is not installed when the stack is
run.  As a UX improvement, let's increase the level from warning to
error to increase visibility for the operator.

Change-Id: Ief87d526cc5941179cea3f8ffcac47c3dabaf71b
Related-Bug: #1651785
2017-01-09 17:00:28 -07:00
Thomas Herve d802d177c7 Move elements at the top level 2017-01-04 16:57:10 +01:00