This option can sometimes contain secrets.
For example when redis coordination backend is used and authentication
is enabled in redis, the plain redis password is put as an URL element.
[DEFAULT]
periodic_coordinator_backend_url=redis://:password@127.0.0.1:6379
Change-Id: I09040b54f6e2ee4f0e71c601400b601b5de19780
oslo.db 12.1.0 has changed the default value for the 'autocommit'
parameter of 'LegacyEngineFacade' from 'True' to 'False'. This is a
necessary step to ensure compatibility with SQLAlchemy 2.0. However, we
are currently relying on the autocommit behavior and need changes to
explicitly manage sessions. Until that happens, we need to override the
default.
Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I5dda36e43caeeb2983cb6a9e0743591fc246d323
As of Zed jsonschema version has been bumped to 4.14.0 in
upper-constraints, which means project should support running with
this version. This patch aims to fix ApiValidator that is not compatible
with new jsonschema.
Other deprecations, like FormatChecker.cls_checks decorator are left
intact and must be covered with follow-up patches.
We also move zuul queues to project scope as otherwise jobs do not
run due to config error.
We also replace iteritems with six method as iteritems have been dropped
from Python 3.
Change-Id: Ia8b69587aa9b3d04ffcdea7c6b97a8ae65f67534
It has been reported that "the various test cases and mixins
in 'oslo_db.sqlalchemy.test_base' have been deprecated since
oslo.db 4.34.0 (March 2018)." so migrate to a more stable
and supported solution.
Change-Id: I89aff35352406c0895d379ef6548b406572d076d
Since Flask 2.1, the same blueprint cannot be registered multiple
times with different url_prefix values, unless the 'name' parameter
is set. Otherwise the following error is reported: "The same blueprint
cannot be registered with the same name. Use name= when registering
to specify a unique name."
At the same time, disable the openstack-ansible job,
which started to fail again, but at this point the priority
is to unblock the gates.
Change-Id: I50df2fec3fd312082a14ef2a5b6774a2515afb44
The user property of oslo_context.context.RequestContext has been
deprecated in favor of the new user_id property. This change replaces
reference to the deprecated user property.
Change-Id: Ib5ca9b82970d217df5133b2498c3577af0e60dd9
The tenant argument of RequestContext is no longer available since
oslo.context >= 4.0.0 . This change fixes the compatibility issue
caused by that removal.
NOTE:
Because scenario jobs are still broken with this change, these jobs
are made non-voting temporally to unblock the other jobs. Currently
this issue is blocking package build in RDO.
Story: 2009921
Task: 44779
Change-Id: I1bc81b3c13d2c08bc175d0d4f4365de7b4f71cf9
In python 3, all strings are considered as unicode string.
This patch drops the explicit unicode literal (u'...')
or (u"..") appearances from the unicode strings.
Change-Id: I502bda0881b284d918f4afedba9bb24eb560211f
When querying the list of registered images, query according to some
characters of the iamge name.
Change-Id: I1c68efbe2583290bc41f7d35197ef108c484d607
... because it was already removed from cinder[1].
Note:
The sahara-openstack-ansible-functional job is made non-voting now
because it doesn't pull code changes. This issue is reported in [2]
and will be addressed separately.
[1] e05b261af7dcd24096b229860df65dff1d385910
[2] https://storyboard.openstack.org/#!/story/2009081
Change-Id: I10261693216ca93faa49d22f2827a939114d234d
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.
[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html
Change-Id: Ib2101f13171940857fe81f64dd9798dfe489743a
Exception's error message should be put right after the Exception
with a bracket, othersize it will be ignored.
Change-Id: I0be28c20ff21805d9a1a52b702cf497df7b9069e
With the removal of Python 2.x we can remove the unittest2 compat
wrappers and switch to assertCountEqual instead of assertItemsEqual
We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertCountEqual.
[1] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277
Change-Id: Ic0d8c9e1025cd05f4042f1c5ba440cc03a0b5834
Monkey patch the original current_thread to use the up-to-date _active
global variable. This solution is based on that documented at:
https://github.com/eventlet/eventlet/issues/592
Change-Id: I93ce7f11dcd8c1f01616580b65e5e581b775e8c5
Story: 2007614
In Python 3.8 unittest.mock can't successfully mock Flask.
So we need to use test_request_context instead.
Tests are slightly restructured: assertions are now done on an actual
Response object.
Remove some apparently duplicated lines.
Change-Id: I83f240400295d38fe40d54ab7a8f6442f3981729
Story: 2007596
Task: 39565
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Update local hacking checks for new flake8.
Note: The repo has been using an uncapped requirements, so was testing with
hacking 2.0 which disabled the old way of local testing integration.
Remove S367 and S368 since they are not working under python3
"NOTE(Kezar): This checks a good enough if we have only py2.7 supported.
As soon as we'll get py3.x we need to drop it or rewrite. You can read more
about it in dev-list archive, topic: "[hacking]proposed rules drop for 1.0"
Also, hacking now has H304 and H306 which test exactly the same.
Change-Id: I0b21554a5f9a69ed631b18c427b80c082011f774
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: Ic07c0f6fa0b23242eb884cc34ac9d963b3030b17
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
They are failing thanks to sqlalchemy.orm.exc.DetachedInstanceError:
Parent instance <ClusterVerification at ...> is not bound to a Session;
lazy load operation of attribute 'checks' cannot proceed
(Background on this error at: http://sqlalche.me/e/bhk3)
The issue seems to be difficult to tackle, so let's reevaluate after
cutting Ussuri branches.
Story: 2007450
Task: 39508
Change-Id: If0b47fa815ef778d58542f4c7d84218aef833802
The most recent version of python-cinderclient dropped the support
for cinderclient v1.
We could bump the minimum cinderclient version, but the Cinder v1
API has been deprecated since Juno, so we can safely ignore it.
Change-Id: I8e90e812882fa1288bc379606a55305c30cd6656
This is to remove the unncessary slash when the line doesn't
exceed the length of 79, to make the code more readable.
Change-Id: I2d25d55b6e3e7474d162fe6d2e6b9e325089980b
Sahara fails to connect and operate on remote machines
because the output from Subprocess on python 3 are bytes
and that breaks follow up actions.
Change-Id: Id55e6c06d3b6ead18501a0e2146af37bf493881d
After fully implementing policies in code, the authorize method
can be safely used and its a safeguard against introducing
policies for some API which are not properly defined in the code.
Change-Id: I499f13c34027b217bf1de905f829f36ef919e3b8
It is wreaking havoc on the openstack gates, let's fix the issues.
Fix:
- E117: Over-indented code blocks;
- E305: Expected 2 blank lines after class or function definition
Ignore for now:
- W504: Line break after binary operator
- W605: Invalid escape sequence
W504 should be fixed together with its sibling W503.
Change-Id: I1483fae77153ffb24bfc51de2b83ea9db6737bfd
First, we are fixing the adding of a new NTP server to ntp.conf.
The way it is currently done the server is added to the end of the
file and we fixed it to add it to the beginning of the config file.
Second, we are changing the order of when we set up ntp and the
service is started, because CDH fails to detect the sync'd time if
it has be synchronized after the start of the service.
Story: #2004981
Task: #29440
Change-Id: Ic2d7697a4036f5f689f065db081d53d4b37532cf
Since plugins are not part of Sahara core anymore, loading plugins
like we currently do fails when plugins are not installed.
Currently we check the list of loaded plugins by checking the CONF
file plugins session. To fix that, we are changing to check the list
of loaded plugins on the PluginManager variable loaded_plugins, this
way we can instead of failing to start sahara if a desired plugin
is not installed, we can warn that the plugin was not loaded and
continue the application.
Change-Id: Iaae3a75cd75b06e94bc4492e5dc654a6281fdff4
After this change, like all other configuration options,
it is written down by oslo-config-generator.
Story: 2004848
Task: 29060
Change-Id: Idf06726160ad789fe097a91eab315949bcae0059