New releases of oslo.config support a 'mutable' parameter to Opts.
This is only respected when the new method mutate_config_files is
called instead of reload_config_files. Heat delegates making this call
to oslo.service, so how do we switch?
Icec3e664f3fe72614e373b2938e8dee53cf8bc5e allows services to tell
oslo.service they want mutate_config_files to be called by passing a
parameter, which this patch does.
This allows Heat to benefit from
I1e7a69de169cc85f4c09954b2f46ce2da7106d90, where the 'debug' option
(owned by oslo.log) is made mutable. We should be able to turn debug
logging on and off by changing the config and sending SIGHUP.
Part of bp:mutable-config
Change-Id: I885f5e088440d3d8b6fb3506506598d7667e7083
Add a subcommand to heat-manage to migrate resource and events
properties data from the legacy db locations to the new. I.e., migrate
properties data out of the legacy columns in the resource and event
tables into the recently added resource_properties_data table. No
attempt at de-duplication between resources and events is made for the
migration: a new row is created in resource_properties_data for every
row that has legacy properties data in the resource or event tables.
Change-Id: I364d509c357539d1929eb2e40704e60049469ea2
This changes newly added heat-manage command for migrating
non-convergence stacks to convergence, to use '_' like other
commands. Also updates doc with the command.
Change-Id: I2ea5beb1c71cf51dceee7df6af6a6827d920c179
The db.api module provides a useless indirection to the only
implementation we ever had, sqlalchemy. Let's use that directly instead
of the wrapper.
Change-Id: I80353cfed801b95571523515fd3228eae45c96ae
Avoid large sql "in" clauses by operating on smaller batches of stacks
at a time.
To avoid transaction overhead and contention on the resource table,
the first deletions occur outside of a transaction (are
autocommitted). This is OK because the purge is re-rentrant -- we
won't lose any stack_id's to delete if something goes wrong before the
conn.begin() block. That is, we will not orphan any rows if the purge
is run multiple times where an error occurs.
Change-Id: I9edf0558ed54820842193560e323df6501411d1d
This patch implements a new heat-all command that can be used
to launch a single process version of the configured heat services.
The end user can control which services are launched by setting
'enabled_services' in the heat config file:
[heat_all]
enabled_services = api,engine
One use case for this launcher would be to launch a single process heat
using rpc_backend = fake, connection=sqlite://heat.db, to have access
to a minimal all in one Heat API/Engine for TripleO undercloud
deployments via Heat templates.
Change-Id: Ic35bdc455fe1397ac575522af0c8fca96dd95676
Run `heat-manage migrate-convergence-1 <stack_id>` to migrate
legacy stack to convergence engine.
Heat engine is used for doing migration i.e. migration can't
be done offline.
Change-Id: Ie7c2498b37937438f16d154b154b3a6ecbf9ff74
Implements-bp: convergence-migrate-stack
Add project-id argument to heat-manage purge_deleted command in order
to be able to hard delete DB entries for a specific project.
Change-Id: Ifffe5657a40ce97db9d059ff1516b8e1eb801132
Implements: bp heat-manage-purge-deleted-tenant
The raw_input() raises NameError: name 'raw_input' is not defined in python3.
This patch fixes it by replacing raw_input with input to make PY3 compatible.
Change-Id: I50aad3161893250dab1d60af4569bb65d7edef5a
Closes-Bug: #1595827
In case the "heat-manage update-params" utility hangs in the middle of
a run, it is useful to know the exact raw_template or resource that
was being processed. Verbose logging of each raw_template or resource
that is being processed will aid in debugging and checking for corrupt
data (if the heat-manage process has to be killed).
Change-Id: Ic552bdaf234c7b9a6a76c345aab816a171b404ab
Adds a new heat-manage reset_stack_status to recover from specific
crashes that leaves resources in progress. It removes resource hooks and
stack locks as well.
Closes-Bug: #1561214
Change-Id: I70fa5857c959bc5f1424d562ff8b7740331b5328
The default values needed for heat's implementation of cors
middleware have been moved from paste.ini into the configuration
hooks provided by oslo.config. Furthermore, these values have been
added to the default configuration parsing. This ensures
that if a value remains unset in heat.conf, it will be set
to use sane defaults, and that an operator modifying the
configuration file will be presented with a default set of
necessary sane headers.
Change-Id: Ie3791007b33788829417ce508a3c719ae626bbce
Closes-Bug: 1551836
Downstream test environments are frequently having failing stacks with
error messages like:
MessagingTimeout: resources[0]: Timed out waiting for a reply to
message ID ...
These environments generally have 1 or 2 cores, so only spawn one or two
engine workers. This deadlocks with stacks that have many nested stacks
due to engine->engine RPC calls.
Even our own functional tests don't work reliably with less than 4
workers, and the workaround has been to set that explicitly in
pre_test_hook.sh.
This change sets the default minimum number of workers to 4, but still
matches workers to cores for larger servers.
This change also moves the default evaluation to heat.cmd.engine so that
generated configuration doesn't get a inappropriate default value.
Change-Id: Iae6b3956bad414406d901bb2213c9ec230ff4304
Closes-Bug: #1526045
During the troubleshooting of issues, admin needs to
decrypt the values stored in the resource_data table.
This patch addes below command to address this need.
heat-manage resource_data_list <resource_id>
Closes-bug: #1524295
Change-Id: I5bb814c0873f58b3968f312c96bcabcd3024085d
Previously we used "nargs='?'" parameter for 'crypt_operation' option.
It leads to situation, when we execute this command without any result
or error.
Now when user will try to execute this command he will get message, that
should specify 'crypt_operation' option.
Note, that we used same parameters for other heat-manage commands.
However, it can be used, because if user will not provide these options,
then commands will be executed with default values (sometimes it's None).
All these default values are expected in utility functions or db
functions.
Also comments were added for clarification commands and their arguments.
Change-Id: I561bc7fc83e6d845c9b59d85c59650e640001190
db_sync command has two positional arguments, but in code we use only
one. Also original db_sync command for db API get only one parameter
"version".
Change-Id: I65732b16fbdc093ad2c7a3a521c3b75ae7183585
As a follow-up to Ibfd54e7b1bae700e4fb49a32e5bf7c00d1f104d9,
moving all the scripts from bin/ to setuptools entry points.
The devstack change is here: Iffb6d09bfef593d854b38e68200ae6039c4727e7
partial blueprint upgrade-tests
Change-Id: Ic8f5b8dc85098de752bbf673c4b15c06fdc4162a
Adding support to encrypt/decrypt parameters through heat-manage
command.
Change-Id: I2cd7b8837156ebe892d591f48ad2b1c6ecca5f9d
Implements: blueprint encrypt-hidden-parameters
Co-Authored-By: Jason Dunsmore <jasondunsmore@gmail.com>
The oslo-incubator log modlule has been removed, so port to the oslo_log
library. Note this uses the new (non namespaced, e.g oslo.log) import
convention, we'll need to align other imports in a future commit.
Some import reordering was required due to pedantic H30[57] checks, and
the services have all been converted to initialize the oslo_log library
as this is done differently to the log.py in incubator.
Change-Id: Ib5a97123fe1b287bc531e42d7887c13ba6205628
Adds required REST API, Db model and engine service
changes for reporting the heat engine service status.
Change-Id: I3ef29c1efd2015d62eec1033ed3a8c9f42e7a6e2
Implements: blueprint heat-manage-service-list
"DocImpact"
Since i18n.install() is deprecated, remove it from heat codes and
import i18n._() to where it needed.
blueprint oslo-i18n
Change-Id: Icefada18b5a33112b425cd90d31d3a6a5f06188a
Common db code was updated in oslo. The most important thing is that
engine instances don't stored anymore in oslo.db - ce69e7f.
This patch moves methods `get_engine` and `get_session` to module
`heat.db.sqalchemy.api`.
Latest commit in oslo related to db module:
2fd457bf2ccbeb2b84ffb204778b6417cd5405ba
Change-Id: Iaa2e9ba26e824c678c698914170e3dffbf1c5c95
Follow oslo.config style guide for help strings better to create
consistent help strings:
* Capitalize first word of each help string
* Finish help strings with "."
* Improve wording
* Add missing space between strings
Change-Id: Ia86734d44fdf4eb3711fef800fe6bdfd1a1b59d4
heat-manage db_sync is currently broken because
heat is trying to use two backends with the Oslo DB
api which is configurable via heat.conf where only
a single DB api can be specified.
Currently this defaults to:
#The backend to use for db (string value)
#db_backend=heat.db.sqlalchemy.api
To fix things we:
1) merge heat/db/migration.py into heat/db/api.py.
2) Add db_sync and db_version calls to heat/db/sqlalchemy/api.py
which call into the functions in heat/db/sqlalchemy/migration.py.
3) Remove the old heat/db/migration.py module (no longer needed).
In the process we also move the INIT_VERSION constant into
heat/db/sqlalchemy/api.py where it is actually used
anyway. (it probably shouldn't have been in the higher level
migration module to begin with)
This should fix SmokeStack which stopped working last Wednesday
with a05dc4b9cd
Also,
Closes-bug #1241865
Change-Id: I50d489531056016c762bd3be047e3a129cbee4f8
Allow users to choose how many days, hours, minutes, or seconds to preserve
deleted data.
Closes-bug: #1237195
Change-Id: I9227f5bf53c5b099a7a691a49c4ff2f5f0662098
Oslo version 96d1f887dda21b43ba4376187f31953dee6f5273
This commit just migrates Heat to new db related code from Oslo
Partially implements blueprint oslo-db-support
Change-Id: Ib0de40a70857fb3e029a2282f06746269a628c71
Add a purge_deleted command to heat-manage. The command takes an
'age' argument, and removes all database records that have been soft
deleted for more than 'age' days. Default to 90.
blueprint event-persistence
Change-Id: I8a62108a907b4e709c91a93a1f7db6c702cec6b5
This changes the code to use a python 3.x compatible
print function syntax (or import from __future__ where
necessary)
Change-Id: Ia1f19d0ac082853d25c7c9b754b440469c0526eb
Fixes bug 1184923
because prog was missing the CONF object was looking for
the config file in /etc/heat/heat.conf this should have
been /etc/heat/heat-engine.conf
Change-Id: Ie23b9998df368274d69180e0d619b042dd9dc053
The heat/cmd/manage.py structure is copied from glance to give
us some consistency.
Removing unused cliutils ...
blueprint heat-manage
Change-Id: If3b69eb4c3672740515fd308ec868af1cd3c9396