Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix example mapping file - etc/keystone/mapping.json #908

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pratik705
Copy link
Contributor

closes #907

@pratik705 pratik705 changed the title Fix example mapping file Fix example mapping file - etc/keystone/mapping.json Mar 17, 2025
Copy link
Contributor

@cloudnull cloudnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These entries are all required and what we have in production. Are you running into issues with these values?

@pratik705
Copy link
Contributor Author

These entries are all required and what we have in production. Are you running into issues with these values?

On recent installation, I faced an issue with default mapping.json:

# openstack mapping create --rules /opt/genestack/etc/keystone/mapping.json rackspace_mapping
Additional properties are not allowed ('description', 'domain', 'metadata', 'tags' were unexpected)
(HTTP 400) (Request-ID: req-310eb871-c08e-4e6a-a965-f1c0560ade9c)
 
 
 
2025-03-17 17:40:35.190650 : keystone.exception.ValidationError: Additional properties are not allowed ('description', 'domain', 'metadata', 'tags' were unexpected)
2025-03-17 17:40:35.190652 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application Traceback (most recent call last):
2025-03-17 17:40:35.190653 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/flask/app.py", line 870, in full_dispatch_request
2025-03-17 17:40:35.190655 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     rv = self.dispatch_request()
2025-03-17 17:40:35.190656 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/flask/app.py", line 855, in dispatch_request
2025-03-17 17:40:35.190658 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
2025-03-17 17:40:35.190659 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/flask_restful/__init__.py", line 489, in wrapper
2025-03-17 17:40:35.190660 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     resp = resource(*args, **kwargs)
2025-03-17 17:40:35.190661 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/flask/views.py", line 110, in view
2025-03-17 17:40:35.190662 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     return current_app.ensure_sync(self.dispatch_request)(**kwargs)  # type: ignore[no-any-return]
2025-03-17 17:40:35.190663 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/flask_restful/__init__.py", line 604, in dispatch_request
2025-03-17 17:40:35.190665 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     resp = meth(*args, **kwargs)
2025-03-17 17:40:35.190666 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/keystone/api/os_federation.py", line 306, in put
2025-03-17 17:40:35.190667 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     am = self._internal_normalize_and_validate_attribute_mapping(
2025-03-17 17:40:35.190668 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/keystone/api/os_federation.py", line 296, in _internal_normalize_and_validate_attribute_mapping
2025-03-17 17:40:35.190670 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     utils.validate_mapping_structure(mapping)
2025-03-17 17:40:35.190671 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/keystone/federation/utils.py", line 310, in validate_mapping_structure
2025-03-17 17:40:35.190673 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     raise exception.ValidationError(messages)
2025-03-17 17:40:35.190674 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application keystone.exception.ValidationError: Additional properties are not allowed ('description', 'domain', 'metadata', 'tags' were unexpected)
2025-03-17 17:40:35.190675 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application
2025-03-17 17:40:35.190676 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application
2025-03-17 17:40:35.190892 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application [None req-e3f476c7-bd5f-4abe-8867-a21cef47ffda 0878ba93993b41e2b837142e5d3bb49d 617cd0cca21e40efb419e9ad39613536 - - default default] Additional properties are not allowed ('description', 'domain', 'metadata', 'tags' were unexpected)

@cloudnull
Copy link
Contributor

These entries are all required and what we have in production. Are you running into issues with these values?

On recent installation, I faced an issue with default mapping.json:

# openstack mapping create --rules /opt/genestack/etc/keystone/mapping.json rackspace_mapping
Additional properties are not allowed ('description', 'domain', 'metadata', 'tags' were unexpected)
(HTTP 400) (Request-ID: req-310eb871-c08e-4e6a-a965-f1c0560ade9c)
 
 
 
2025-03-17 17:40:35.190650 : keystone.exception.ValidationError: Additional properties are not allowed ('description', 'domain', 'metadata', 'tags' were unexpected)
2025-03-17 17:40:35.190652 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application Traceback (most recent call last):
2025-03-17 17:40:35.190653 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/flask/app.py", line 870, in full_dispatch_request
2025-03-17 17:40:35.190655 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     rv = self.dispatch_request()
2025-03-17 17:40:35.190656 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/flask/app.py", line 855, in dispatch_request
2025-03-17 17:40:35.190658 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
2025-03-17 17:40:35.190659 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/flask_restful/__init__.py", line 489, in wrapper
2025-03-17 17:40:35.190660 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     resp = resource(*args, **kwargs)
2025-03-17 17:40:35.190661 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/flask/views.py", line 110, in view
2025-03-17 17:40:35.190662 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     return current_app.ensure_sync(self.dispatch_request)(**kwargs)  # type: ignore[no-any-return]
2025-03-17 17:40:35.190663 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/flask_restful/__init__.py", line 604, in dispatch_request
2025-03-17 17:40:35.190665 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     resp = meth(*args, **kwargs)
2025-03-17 17:40:35.190666 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/keystone/api/os_federation.py", line 306, in put
2025-03-17 17:40:35.190667 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     am = self._internal_normalize_and_validate_attribute_mapping(
2025-03-17 17:40:35.190668 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/keystone/api/os_federation.py", line 296, in _internal_normalize_and_validate_attribute_mapping
2025-03-17 17:40:35.190670 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     utils.validate_mapping_structure(mapping)
2025-03-17 17:40:35.190671 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application   File "/var/lib/openstack/lib/python3.10/site-packages/keystone/federation/utils.py", line 310, in validate_mapping_structure
2025-03-17 17:40:35.190673 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application     raise exception.ValidationError(messages)
2025-03-17 17:40:35.190674 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application keystone.exception.ValidationError: Additional properties are not allowed ('description', 'domain', 'metadata', 'tags' were unexpected)
2025-03-17 17:40:35.190675 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application
2025-03-17 17:40:35.190676 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application
2025-03-17 17:40:35.190892 2025-03-17 17:40:35.189 10 ERROR keystone.server.flask.application [None req-e3f476c7-bd5f-4abe-8867-a21cef47ffda 0878ba93993b41e2b837142e5d3bb49d 617cd0cca21e40efb419e9ad39613536 - - default default] Additional properties are not allowed ('description', 'domain', 'metadata', 'tags' were unexpected)

I think the issue is that the image is out of date. I'd make sure you pull the most recent image and then try again.

@pratik705
Copy link
Contributor Author

I tried using these version: 6.2.0, 6.6.0 and 6.6.1. But it still failed[1]. Am I missing anything?

[1]

(genestack) root@1335099-controller1:~# whereis openstack
openstack: /usr/bin/openstack /usr/local/bin/openstack /root/.venvs/genestack/bin/openstack

(genestack) root@1335099-controller1:~# /root/.venvs/genestack/bin/openstack --version
openstack 6.2.0
(genestack) root@1335099-controller1:~# /root/.venvs/genestack/bin/openstack  mapping create --rules mappings.json rackspace_mapping
Additional properties are not allowed ('description', 'domain', 'metadata', 'tags' were unexpected)
 (HTTP 400) (Request-ID: req-c41d28b3-9789-4ebe-a954-04777b1bbe64)

(genestack) root@1335099-controller1:~# /usr/local/bin/openstack --version
openstack 6.6.0
(genestack) root@1335099-controller1:~# /usr/local/bin/openstack mapping create --rules mappings.json rackspace_mapping
Additional properties are not allowed ('description', 'domain', 'metadata', 'tags' were unexpected)
 (HTTP 400) (Request-ID: req-86ca6a6f-0c8c-4b69-a511-c09e5baf911d)

(genestack) root@1335099-controller1:~# kubectl exec -it openstack-admin-client2 -n openstack -- bash
root@openstack-admin-client2:/# openstack --version
openstack 6.6.1
root@openstack-admin-client2:/# openstack mapping create --rules mappings.json rackspace_mapping
Additional properties are not allowed ('description', 'domain', 'metadata', 'tags' were unexpected)
 (HTTP 400) (Request-ID: req-a41d436b-2513-46a0-be02-6f8fd87213d9)

@cloudnull
Copy link
Contributor

cloudnull commented Mar 25, 2025

I believe the keystone image your running is old. We just deployed all this in a brand new environment with Dfw.Dev today, and didn'tahve any of the described issues with the mapping file. Try pulling the following image and let me know how it goes ghcr.io/rackerlabs/genestack/keystone-rxt:2024.1-ubuntu_jammy-1735886895

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

openstack mapping create fails with the example mapping file
2 participants