diff options
author | Michael Johnson <johnsomor@gmail.com> | 2022-08-16 22:17:39 +0000 |
---|---|---|
committer | Michael Johnson <johnsomor@gmail.com> | 2022-08-18 22:35:48 +0000 |
commit | f674574fe7b9fe170af1ec0e170ed01bb0e19b79 (patch) | |
tree | c195c4089133c3a3acee5478ca6deedae939344a | |
parent | 410c1e8d60a6b3844050dd4d3ecc46f640356bfb (diff) | |
download | designate-f674574fe7b9fe170af1ec0e170ed01bb0e19b79.tar.gz |
Fix designate-manage pool update MissingProjectID
This patch fixes a bug where adding an additional pool to designate using the "designate-manage pool update" command may fail with an exception:
designate.exceptions.MissingProjectID: A project ID must be specified when not using a project scoped token.
There was an extra check added as part of the scoped token work that a project ID must be provided when creating pools. This was incorrect as pools are still valid with a None project ID as they are a system resource and not tied to a specific project.
This patch removes that check, but retains the RBAC check for and "admin" token.
Closes-Bug: #1986733
Change-Id: I7345d7ef505420767209ba037e3c8930a282d03f
(cherry picked from commit a03c4657c2bf957fef035807ef7df732f7a1c994)
-rw-r--r-- | designate/central/service.py | 2 | ||||
-rw-r--r-- | releasenotes/notes/fix-designate-manage-pool-7d812f938e894133.yaml | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/designate/central/service.py b/designate/central/service.py index 6c37a8a0..e8afa7c6 100644 --- a/designate/central/service.py +++ b/designate/central/service.py @@ -2524,8 +2524,6 @@ class Service(service.RPCService): policy.check('create_pool', context) - self._is_valid_project_id(pool.tenant_id) - created_pool = self.storage.create_pool(context, pool) return created_pool diff --git a/releasenotes/notes/fix-designate-manage-pool-7d812f938e894133.yaml b/releasenotes/notes/fix-designate-manage-pool-7d812f938e894133.yaml new file mode 100644 index 00000000..7d8868ed --- /dev/null +++ b/releasenotes/notes/fix-designate-manage-pool-7d812f938e894133.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixed an issue in central where "designate manage pool update" may return + an error designate.exceptions.MissingProjectID when attempting to create a + new pool. |