Due to slight differences in the --help output text for the test
runner, the output comparison no longer matches once you get past
python 3.8.
This fix cleans up the help text itself, and modifies the test to
only match on some specific elements, not the whole thing.
This should make the test less fragile going forward.
Change-Id: I7b94d8ae9eb58c43676ae3171c0f6193496c6d4b
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:
1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.
2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.
Also replace policy.json to policy.yaml ref from doc and tests.
CONF object needs to be initialized before policy enforcer(). That
need to remove cfg.CONF.unregister_opts from TestAuthUtils cleanup
as this is taken care by cfg.clear() with proper workflow otherwise
it end up with error
"oslo_config.cfg.ArgsAlreadyParsedError: arguments
already parsed: reset before unregistering options"
- https://b132754ee7062a9ab187-9add4719a9922a9385555a8552fc2366.ssl.cf5.rackcdn.com/768520/5/check/openstack-tox-py38/7964354/testr_results.html
[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html
Change-Id: I1b6c6485bc651fd0b87244a68204036dd4aa37f4
We were seeing infinite recursion opening an ssl socket when running
various combinations of python3, eventlet, and urllib3. It is not
clear exactly what combination of versions are affected, but for
background there is an example of this issue documented here:
https://github.com/eventlet/eventlet/issues/371
(Commit message copied in part from nova commit
3c5e2b0e9fac985294a949852bb8c83d4ed77e04)
Change-Id: I76fed9e80a7f848a0f6b37c25dd035844c75a6ee
This commit adds the functionality of murano-status CLI for performing
upgrade checks as part of the Stein cycle upgrade-checkers goal.
It only includes a sample check which must be replaced by real checks in
future.
Change-Id: If7987cdf5d9a686abbcad5960b8f391f8b9518a3
Story: 2003657
Task: 26143
Option auth_uri from group keystone_authtoken is deprecated[1].
Use option www_authenticate_uri from group keystone_authtoken.
[1]: https://review.openstack.org/#/c/508522/
Change-Id: Ib8623a359a27b8a4aa90bf69a3fe3f3a5c2411a6
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 Murano 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.
Change-Id: Ia7e405392fe67eb9c4abf2408db0fa25c5546958
Story: 2001545
1.As mentioned in [1], we should avoid using six.iteritems to achieve
iterators. We can use dict.items instead, as it will return iterators
in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the
link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: I45fa65427318e1c35bb521de46e81ea12ca7b770
This patch add a murano_auth for murano auth with keystone,
This gives ability to fine-tune role-based privileges for
service-user going to execute trust-delegated tasks and the auth
configuration properties do not need to change when keystonemiddleware
deprecates its configuration properties.
Closes-Bug: #1643583
Closes-Bug: #1658648
Change-Id: If10fa8c938c264c7b5cadb3c3ed77f39488dcab7
String interpolation should be delayed to be handled by the logging code,
rather than being done at the point of the logging call.
Ref:http://docs.openstack.org/developer/oslo.i18n/guidelines.html#log-translation
For example:
# WRONG
LOG.info(_LI('some message: variable=%s') % variable)
# RIGHT
LOG.info(_LI('some message: variable=%s'), variable)
Change-Id: If8d36220a9370b304ae51a329f8bba370285fdc2
This reverts commit df8bf9c8f8.
That patch renamed keys of the configuration properties of the
keystone_authtoken settings group, thus breaking config file
compatibility.
Change-Id: I8fd3b3211e75207cf6061eef6f038ea045d9dbfe
Now murano can not auth when only using keystone v3,
this commit update the devstack config to fix with keystone v3.
Closes-bug: #1633394
Change-Id: Ie6a2ccdf6121b3badd403a1c08f1e91052e8c4dc
Core library was updated as part of the multi-region support
effort. FormatVersion of the core library was incremented and,
as a result $dict.key expressions started to work as they are in
yaql 1.0 rather than in 0.2 and the presence of the key become
mandatory. However Network mock in the TextFixture used to
return empty dictionary and it caused Instance class to fail.
The commit adds missing keys to the dictionary returned by
the joinInstance() method.
Also the test runner was improved to print the stack trace
upon failures so that it is possible to identify where the
error happened.
Change-Id: Ia7b0f61370effe4f13fed4ec85e806f3b0fdb80b
There is currently no way to specify the number of api workers,
This patch add multiple api workers support.
Change-Id: Id79cb7a3e056cf5ddc9967f2f26e1973f1473e8b
Closes-Bug: #1603343
Adds ability to load object sub-graph in a single call.
The graph may either be defined in the serializable
object-model format
?:
id: ...
type: ...
classVersion: ...
package: ...
prop1: value
prop2: value2
or in the MuranoPL format
ns:Type:
prop1: value1
prop2: value2
id: ...
name: ...
During the load IDs of the loaded objects are re-generated so
that explicit specification of IDs is only necessary for specification
of references within the graph and are not retained.
The load is done in the temporary ObjectStore. Loaded objects are
copied to the main ObjectStore then.
3rd overload of the new() function was added to deserialize the model:
new($model, $owner)
Change-Id: I849a5d6c9a28843398a4c4c884a1c3138ac7ede3
ObjectStore is a container for all of the objects that are either
loaded from object model or created at runtime. Thus ObjectStore
instance is required in order to either use new() function or use
class() contract with object model snippet.
In current implementation each object had a object_store property
that was pointing to the ObjectStore instance used to create it (the
one that has the object). In order to create new object an ObjectStore
of the $this object was used for that purpose. This approach caused
several issues:
* There is no $this object in static methods and thus no way to obtain
current ObjectStore
* Objects are bind to their stores so temporary ObjectStore instances
cannot be used to load object graphs
This refactoring moves ObjectStore instances to the thread-local attribute.
Thus there is always a "current" ObjectStore.
Also because ObjectStore has a reference to the MuranoDslExecutor instance
it becomes possible to get current executor and everything else that it contains
(current execution session, attribute store, package loader) from the local
thread storage without passing it in the hidden context variables.
Change-Id: I19a08b391486c1ae1b98ca559c8d3fafaca6e1ef
Test-Runner was putting all its output into the default logger instead
of stdout / stderr. Thus the output was often lost between the log
mesasges of MuranoPL executor.
This patch modifies the output to make it more readable and separates
it from the log output.
Also this patch changes the default for the 'use_stderr' configuration
parameter to 'False' so the log output is not returned to stderr
unless explicitly configured otherwise.
Closes-bug: #1585234
Change-Id: Ia7435aa0e42d74e12911d3b8c199ce530708b5c3
Test-runner was looking only for the locally-defined methods (i.e.
ignoring the inherited ones) when invoking service methods of test
fixtures, such as 'setUp' and 'tearDown'. This caused incorrect
behavior when these methods were defined in base classes of the actual
fixtures.
Change-Id: Ife4e4bed7e945093bb751da4ed0f8336c69c9065
Closes-bug: #1596509
Create separate murano-cfapi-paste.ini for service broker,
Change service broker start command to:
`murano-cfapi --config-file etc/murano/murano-cfapi.conf`
And move service broker api to the top level.
Change-Id: Id56786f31c16da11019a2064cc4285bdd266f538
partial-implement: bp separate-service-broker-from-murano
1) Create separate config use the separate config.py
to use: tox -egencfconfig
2) Create separate db for murano service broker
to use: tox -e venv murano-cfapi-db-manage \
--config-file etc/murano/murano-cfapi.conf upgrade
Change-Id: Ifd3551ace000e496d99725f46dbead62f7ef64b0
partial-implement: bp separate-service-broker-from-murano
Add insecure option to [rabbitmq] section of murano.conf
This is a partial fix because it improves Engine <-> RMQ
communications but the same problem exist on
Agent <-> RMQ side
Partial-Bug: #1578421
Change-Id: I55207c3016da12be45918a7dc33795abf69627b4
This commit adds ApiService/NotificationService service
implementation that has its own wait() and encapsulates
MessageHandlingServer instance.
Similar issue was fixed for murano-engine, this commit fixes the same
for murano-api service.
Change-Id: Ia1566dc79aa5a05a00851fcf48f3e7318ac85d54
Closes-Bug: #1521087
Group 'packages_opts' has always been inconsistent, since it included
'opts' into it's name and options in that group we related to both
engine and api. This commit moves engine related options to [engine]
group and api-related options to [murano] group.
This restores backward compatibility with liberty configs, that included
'load_packages_from' into [engine] group
'packages_opts' is added to all the options moved as deprecated_group,
thus retaining backward compatibility with old configs
Change-Id: I00b6f06ec352de4b57baaa86da9155bb36bcc23a
Closes-Bug: #1543027
The default values needed for murano'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 initialization procedure. This ensures
that if a value remains unset in the configuration file, it will
fallback to using sane defaults. It also ensures that an operator
modifying the configuration will be presented with that same
set of defaults.
Change-Id: I50a204e27a43991d94cfb5f39c1dd3e904eb5696
Closes-Bug: #1551836
* Single universal ClientManager class was dropped in favor of
of individual in-context methods to create OS clients without
ClientManager restrictions.
* Environment class was renamed to ExecutionSession to avoid
common confusion with io.murano.Environment
* execution_session_local module was introduced to simplify
keep of per-execution session (per-deployment) data. This
is similar to thread-locals with the difference that there can
be many threads in single session.
* All OS-clients related code was migrated to keystone client
sessions and API v3 (except for GLARE and Mistral that doesn't
support sessions). This increases performance and solves
authentication problems that could be caused by token expiration
even with trusts enabled.
* [DEFAULT]/home_region setting was introduced instead of
[murano]/region_for_services to configure what region
should be used by the clients by default (where Murano API
resides). All client factories respect this setting.
Change-Id: If02c7e5d7d39574d0621e0e8dc27d1f501a31984
Both properties and methods can be marked as Usage: Static
Statics can be accessed using ns:Class.property / ns:Class.method(),
:Class.property / :Class.method() to access class from current namespace
or type('full.name').property / type('full.name').method() to use full type name.
In static method $ / $this are referencing current class rather than object.
Static properties are not loaded from object model.
Also methods of io.murano.configuration.Linux class are now static.
Since static methods can be called on the instance it doesn't break
backward compatibility.
Implements blueprint: muranopl-statics
Change-Id: Ic7c6beed9222f4bca118877a60fdabfdd9d65e5a
Monkeypatching should be before everything, including imports.
This patch ensure eventlet have patched modules before they are loaded
and used.
Change-Id: I6056bdbd20c14e762702ad19c9779a4be79952b8
Closes-Bug: #1545538
This also adds a check to murano/hacking/checks.py that should
catch this error in the future.
Blueprint murano-python-3-support
Change-Id: I50a8b2f98ddbc2819ae180b68468e0a51c13281b
This also adds a check to murano/hacking/checks.py that
should catch this error in the future.
Blueprint murano-python-3-support
Change-Id: Ib8b2b91a40577d18739f0c1bf2c37b7cf4060560
Previously oslo.messaging's MessageHandlingServer
was used as as a murano-engine service in service launcher.
As a result it's wait() method was called. But after recent
changes it's wait method is supposed to be call only
after stop() to wait for graceful message processing to end.
As a result a warning was printed that stop() didn't finish
after 30 sec from wait() invocation (because it was never called).
This commit adds EngineService service implementation
that has its own wait() and encapsulates MessageHandlingServer
instance.
Change-Id: Ie553e0b27cc1c261b963907b4f12f89795b99a12
Closes-Bug: #1521087
It is used in murano-test-runner.
Mocks are inserted into new context, that is created
from the current context:
If mock for the current object exist, new linked context
(``murano.dsl.linked_context.LinkedContext``) will be returned. It links
existing context with the new context, where mock definition is presented.
So if mocked function will be called, context will contain two
definitions with that function: mock and original one, but mock will have
higher priority.
If there is no mock for the current object or class, existing context
will be returned. If there is no existing context, *None* will be returned.
Targets blueprint mock-context-manager
Depends-On: I9eccdf3af1802c731bfdfb93df92c4ad902a4d34
Change-Id: I9a55d07188ff06bdf98248f011a700c297e33417
In murano.cmd.api module, main() calls logging_setup() after
parse_args(), but logging_setup() is already called in
parse_args(). murano.cmd.engine module is the same.
This patch fixes to call logging_setup() once.
Change-Id: I2012cd7e60922fadbb20c6daa5302fe0cabbef22
Closes-Bug: #1518186
Previously, the help message of --os-auth-url, "Authentication URL
(Env: OS_AUTH_URL)", is not same as other arguments of OS
environment variable. So update it to same format.
Change-Id: Iaed9b56016af8ce4c3470c55157458563b41ddcb
Closes-Bug: #1515781
Help is shown if no arguments are provided.
Also additional formatting was added.
Closes-bug: #1508420
Closes-Bug: #1508422
Change-Id: Idf3b2bf0d5cbbc134795bcd2d1b24cf694f1975e