15782 Commits

Author SHA1 Message Date
Zane Bitter
af7f8e380a Add separate policy for updates with no changes
Allow operators to set a different (presumably looser) policy on PATCH
updates that don't make any changes to the stack, but just retrigger a
new update traversal (that will result in e.g. replacing any unhealthy
resources).

Change-Id: Id29e7ec7f6cf127177ea7ab29127b0568afaa18b
Task: 37305
2021-03-15 17:38:14 +05:30
Zuul
34ecc26a11 Merge "Fix avoid deprecation warnings from policy" 2021-03-14 15:24:36 +00:00
Rico Lin
7230082f87 Fix avoid deprecation warnings from policy
We received huge amount of warnings during service start.
Most about stop using `deprecated_reason` and `deprecated_since` by
`policy.DocumentedRuleDefault` directly. And should use them under
`policy.DeprecatedRule instead.

This patch apply for above suggestion.
Also bump oslo.policy lower-constraints and requirements to `3.7.0` to alias
policy behavior.

Story: 2008707
Task: 42041

Change-Id: Iefcfc30a051fe25ccc5121c7ddb817e8c271fcb6
2021-03-12 20:46:17 +08:00
Zuul
98dc789fbc Merge "Switch to collections.abc.*" 2021-03-12 08:07:07 +00:00
Zuul
66c321ffaf Merge "Workaround client race in legacy nested stack delete" 2021-03-11 23:12:56 +00:00
Zuul
5338ba0aed Merge "Ignore old 'vN-branch' tags when scanning for release notes" 2021-03-11 22:53:56 +00:00
Zuul
de09a017f6 Merge "Optimise resource type listing" 2021-03-11 21:25:48 +00:00
Zuul
fc056ef70a Merge "Remove deprecated tail_log function" 2021-03-11 21:19:21 +00:00
Zuul
4d07bb7914 Merge "Fix duplicated words issue like "can be be used"" 2021-03-11 21:19:08 +00:00
Zuul
9c37e0457c Merge "Always reset CONF when starting the wsgi app" 2021-03-11 19:37:12 +00:00
Zuul
e84fb27cbc Merge "Fix invalid argument formatting in exception messages" 2021-03-11 16:07:40 +00:00
Zuul
ef0f64e3c8 Merge "Regenerate trust when update with different user" 2021-03-11 16:04:46 +00:00
Zuul
ee219a86f4 Merge "Use neutron client for server.addresses" 2021-03-11 16:04:28 +00:00
Zuul
a118f3626b Merge "Fix typo in documentation" 2021-03-11 14:32:34 +00:00
Zuul
37b43087d8 Merge "Move testing to Fedora 33" 2021-03-11 14:31:39 +00:00
ramishra
0b593c218d Allow deleting Server/DeployedServer without swift/zaqar
When swift and zaqar used for software_config_transport
are removed/disabled in the deployment, we should be
able to delete Server/DeplpyedServer resources.

Change-Id: I4c9e0729f338de67b4b598fcd0e72646289d5025
Task: 2008685
2021-03-05 10:40:38 +05:30
Lance Bragstad
93594c30ec Implement secure RBAC
This commit updates default policies to account for system scope
and default roles. This is part of a broader change to provide a
consistent and secure authorization experience across OpenStack
projects.

- Introduces basic/reusable check strings in base.py
- Implements secure RBAC for build info API
- Implements secure RBAC for the action API
- Implements secure RBAC for cloud formations
- Implements secure RBAC for events
- Implements secure RBAC for the resource API
- Implements secure RBAC for the service API
- Implements secure RBAC for software configs
- Implements secure RBAC for software deployments
- Implements secure RBAC for stacks
- Adds unit tests for legacy and new secure-rbac policies.

Change-Id: Iff1e39481ea3b1f00bd89dba4a00aed30334ecec
2021-03-02 09:32:41 +05:30
Rico Lin
8daa7e9389 Allow using database configs on db retry
Allow following db configs when calling wrap_db_retry:
    * database.db_max_retries
    * database.db_retry_interval
    * database.db_inc_retry_interval
    * database.db_max_retry_interval
So database cofig can now control db retries.
Please reference [1] for what each config options can do.

[1] https://opendev.org/openstack/oslo.db/src/branch/master/oslo_db/options.py

Change-Id: I034625733c2d22f0f5635f58e9df3d5785e58cf5
2021-02-27 15:42:07 +08:00
Zuul
5609e25765 Merge "Don't create deployment when changing transport" 2021-02-18 18:37:45 +00:00
Harald Jensås
45750c603a Use neutron client for server.addresses
The server.addresses (/servers/{server_id}/ips)
endpoint can contain stale data causing attribute
lookups to fail.

This change replaces the use of server.addresses
and instead uses the neutron client to list ports
with 'device_id' matching the server id.

Story: 2008632
Task: 41843
Related: RHBZ#1902230
Change-Id: I1b9293041f2ad92eac0e9bc9646e7b2d7c6f7fd0
2021-02-18 12:20:39 +00:00
Kevin Carter
c37a72e471 Fix iter bug with SQlAlchemy 1.3.23
With SQlAlchemy 1.3.23 constraint.copy() fails with error[0].
This seems like a regression after[1].

This patch fixes the issue by providing the ``target_table``
argument to c.copy().

[0] http://paste.openstack.org/show/802486
[1] 7dd3381edb

Change-Id: Ia25b8443bbe576f73fb7debe54f307deadf34e04
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2021-02-18 09:59:50 +05:30
ramishra
79fb6509a9 Don't create deployment when changing transport
Earlier when changing software config transport we used to
create a dummy deployment to push the metadata. However
this would not work with convergence as we take
resource lock for the update which updates the config
transport (another engine would try to update the resource
metadata for deployment when one engine has locked it).

Currently it works when updating transport as we ignore
the error in creating dummy deployment, but if there are
any new depoyments for the server they would fail.

We don't need to push the metadata as it would be pushed
when the there is a new/updated deployment.

Few additional changes in the patch:

- We don't need to ignore the error as servers are now
not replaced if the resource is in ERROR when nova server
is good/ACTIVE.
- Delete the existing tempurls and zaqar queues when
  changing transport.

Task: 41744
Change-Id: Id592b29df36320d8697bd370252ada02612ba7d0
2021-02-03 10:52:09 +05:30
Pierre Riteau
46d31c729b Fix typo in documentation
Change-Id: I018b75dcd28978e13be33a471be64fae3b31f585
2021-02-02 08:32:31 +00:00
Stephen Finucane
57e9754093 Switch to collections.abc.*
The abstract base classes previously defined in 'collections' were moved
to 'collections.abc' in 3.3. The aliases will be removed in 3.10.
Preempt this change now with a simple find-replace:

  $ ag -l 'collections.($TYPES)' | \
      xargs sed -i 's/\(collections\)\.\($TYPES\)/\1.abc.\2/g'

Where $TYPES is the list of moved ABCs from [1].

[1] https://docs.python.org/3/library/collections.abc.html

Change-Id: Ia282479bb1d466bd2189ebb21b51d91e89b9581e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-02-01 11:15:59 +00:00
Zuul
32f9014207 Merge "Add openstack-python3-wallaby-jobs-arm64 job" 2021-01-19 20:24:56 +00:00
Zuul
cc23b0c16a Merge "Imported Translations from Zanata" 2021-01-19 18:12:23 +00:00
Matthias Runge
6a9c35d898 Move testing to Fedora 33
Now that the gate is unblocked, we can also test F33 for gating purposes
here.

Change-Id: Ie1c9075623d85b27aaf1ac67a3063e219726bc6f
2021-01-19 16:38:43 +00:00
Zuul
48097207d3 Merge "Use TOX_CONSTRAINTS_FILE" 2021-01-19 16:32:48 +00:00
Zuul
d06e850627 Merge "Update doc8 version" 2021-01-19 16:07:41 +00:00
Zuul
900a581be6 Merge "Delete default security groups created by stack." 2021-01-19 16:07:12 +00:00
Zuul
b611a8308e Merge "Use assertCountEqual instead of assertItemsEqual" 2021-01-19 15:47:30 +00:00
Zuul
fd0986c6ec Merge "Fix pygments style" 2021-01-19 15:47:13 +00:00
Zuul
c71ac82359 Merge "Bump requirements to support secure RBAC effort" 2021-01-19 15:47:07 +00:00
Lance Bragstad
042345703f Bump requirements to support secure RBAC effort
The broader OpenStack community is working towards implementing secure
RBAC, which is a common set of personas (role and scope permutations)
that deliver the most common asks for custom policies. It also addresses
long-standing issues with tenancy and enforce scope checking.

This commit updates the requirements for oslo.log, oslo.context,
oslo.i18n, oslo.policy, oslo.serialization and keystonemiddleware, which
are necessary for implementing this work. Subsequent patches will go
through and update the default policies.

Change-Id: Ib28f1b333f032b8c9f960a2510e4d23487541631
2021-01-11 18:23:23 +05:30
ramishra
f4ab9d0bc0 Fix multiple gate issues
- Remove B322 bandit from exclusions
- Fix tests for db resource update exposed by SQLAlchemy>=1.3.21

Change-Id: I18efbbbe211a42325a946f5ca74b4e26bfb3316e
2021-01-06 16:56:52 +05:30
wangzihao
f616f43ced Update doc8 version
The doc8 lib supports Py36 starting from version 0.8.1

Change-Id: Ie6d64485622381031130fa12f963eab5a6a9c555
2021-01-06 16:28:32 +08:00
OpenStack Proposal Bot
823a303222 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Id3d93fae5580f839fc819a9aed17fb900c84dc7e
2020-12-13 06:38:26 +00:00
OpenStack Proposal Bot
7e12f69845 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I7698dde8e40e6c537377a37ee8f2b296b8f8fd10
2020-12-11 06:38:52 +00:00
Zuul
a50afeba34 Merge "Fix args for initializing trove client" 2020-12-10 12:41:15 +00:00
Rabi Mishra
4370af1572 Align lower-constraints for new pip
New pip version is quite strict and does not allow conflicting
minimum version deps in lower-constraints.

Change-Id: Ie524c54e3b982bc6b0786c875d34d177444ec6fc
2020-12-09 10:04:52 +05:30
ricolin
555c49b89f Add openstack-python3-wallaby-jobs-arm64 job
This is a non-voting job to validate py3 unittests on ARM64

Task: 41375
Story: 2007938

Change-Id: I41ffb55e31756c53e6c060f88ce70e7a77fe5c0d
2020-12-08 16:27:03 +08:00
Lingxian Kong
defb617ce5 Fix args for initializing trove client
Trove client is using the 'retries' as 'connect_retries' when instantiating
trove Client.

Ref:
https://github.com/openstack/python-troveclient/blob/master/troveclient/client.py#L469

Story: 2008422
Task: 41366

Change-Id: I58a6e235410e2ca28b3822400151621c18ad882d
2020-12-07 21:03:17 +13:00
ricolin
896166161e Restore to vote for grenade job
Depends-On: https://review.opendev.org/c/openstack/heat/+/765539
Change-Id: I9abe3a71977d019fce443dc6a8b8004b79331a66
2020-12-07 15:55:13 +08:00
Matthias Runge
61e53c4eca Replace Fedora test image with F32
Fedora 31 was retired and the image is gone from mirrors.
heat-cfntools have been dropped from fedora images, disable
the test till that's resolved.

Also makes grenade job non-voting, till this is backported
to stable/victoria.

Change-Id: Id869f83a46454897c2fe7a532eebfa2863befe5e
2020-12-04 12:18:59 +05:30
OpenStack Proposal Bot
041e500ea5 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I187ea4008afdf5e56e153d63ca71603dc42a827c
2020-11-27 06:40:47 +00:00
zhufl
af53e4b4c2 Fix invalid argument formatting in exception messages
This is to fix the invalid argument formatting in exception messages.

Change-Id: I3ed91a4fd22b36815b5cefdd8c9b2fc2a7df4471
2020-11-26 17:14:13 +08:00
Zuul
473e01f6fc Merge "Use TOX_CONSTRAINTS_FILE" 2020-11-25 15:48:23 +00:00
Zuul
5e629cc9f8 Merge "Adopt grenade to multinode setting" 2020-11-25 11:12:44 +00:00
OpenStack Proposal Bot
54956ada88 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: If9fb6b337123ed413f8ef56834f225ed8fe7806e
2020-11-25 07:12:23 +00:00
likui
a5e3ebe76e Use TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

Change-Id: I68d6faca20e5d8f1523dbd9f3e4f077a2680aa18
2020-11-24 17:06:37 +08:00