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

When populating the Keystone database, FreeBSD was reported as an unsupported platform by py-trio #1

Open
starbops opened this issue Nov 13, 2023 · 0 comments

Comments

@starbops
Copy link
Member

starbops commented Nov 13, 2023

Description

When populating the identity service database:

$ sudo CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1 keystone-manage --config-file etc/keystone.conf db_sync
Traceback (most recent call last):
  File "/home/starbops/keystone/.venv_sys/bin/keystone-manage", line 6, in <module>
    from keystone.cmd.manage import main
  File "/home/starbops/keystone/.venv_sys/lib/python3.9/site-packages/keystone/cmd/manage.py", line 20, in <module>
    from keystone.cmd import cli
  File "/home/starbops/keystone/.venv_sys/lib/python3.9/site-packages/keystone/cmd/cli.py", line 28, in <module>
    from keystone.cmd import bootstrap
  File "/home/starbops/keystone/.venv_sys/lib/python3.9/site-packages/keystone/cmd/bootstrap.py", line 17, in <module>
    from keystone.common import driver_hints
  File "/home/starbops/keystone/.venv_sys/lib/python3.9/site-packages/keystone/common/driver_hints.py", line 18, in <module>
    from keystone import exception
  File "/home/starbops/keystone/.venv_sys/lib/python3.9/site-packages/keystone/exception.py", line 19, in <module>
    import keystone.conf
  File "/home/starbops/keystone/.venv_sys/lib/python3.9/site-packages/keystone/conf/__init__.py", line 19, in <module>
    import oslo_messaging
  File "/usr/local/lib/python3.9/site-packages/oslo_messaging/__init__.py", line 17, in <module>
    from .notify import *
  File "/usr/local/lib/python3.9/site-packages/oslo_messaging/notify/__init__.py", line 28, in <module>
    from .listener import *
  File "/usr/local/lib/python3.9/site-packages/oslo_messaging/notify/listener.py", line 140, in <module>
    from oslo_messaging import server as msg_server
  File "/usr/local/lib/python3.9/site-packages/oslo_messaging/server.py", line 27, in <module>
    from oslo_service import service
  File "/usr/local/lib/python3.9/site-packages/oslo_service/service.py", line 35, in <module>
    import eventlet
  File "/usr/local/lib/python3.9/site-packages/eventlet/__init__.py", line 17, in <module>
    from eventlet import convenience
  File "/usr/local/lib/python3.9/site-packages/eventlet/convenience.py", line 7, in <module>
    from eventlet.green import socket
  File "/usr/local/lib/python3.9/site-packages/eventlet/green/socket.py", line 21, in <module>
    from eventlet.support import greendns
  File "/usr/local/lib/python3.9/site-packages/eventlet/support/greendns.py", line 79, in <module>
    setattr(dns, pkg, import_patched('dns.' + pkg))
  File "/usr/local/lib/python3.9/site-packages/eventlet/support/greendns.py", line 61, in import_patched
    return patcher.import_patched(module_name, **modules)
  File "/usr/local/lib/python3.9/site-packages/eventlet/patcher.py", line 132, in import_patched
    return inject(
  File "/usr/local/lib/python3.9/site-packages/eventlet/patcher.py", line 109, in inject
    module = __import__(module_name, {}, {}, module_name.split('.')[:-1])
  File "/usr/local/lib/python3.9/site-packages/dns/asyncquery.py", line 38, in <module>
    from dns.query import (
  File "/usr/local/lib/python3.9/site-packages/dns/query.py", line 63, in <module>
    import httpcore
  File "/usr/local/lib/python3.9/site-packages/httpcore/__init__.py", line 1, in <module>
    from ._api import request, stream
  File "/usr/local/lib/python3.9/site-packages/httpcore/_api.py", line 5, in <module>
    from ._sync.connection_pool import ConnectionPool
  File "/usr/local/lib/python3.9/site-packages/httpcore/_sync/__init__.py", line 1, in <module>
    from .connection import HTTPConnection
  File "/usr/local/lib/python3.9/site-packages/httpcore/_sync/connection.py", line 12, in <module>
    from .._synchronization import Lock
  File "/usr/local/lib/python3.9/site-packages/httpcore/_synchronization.py", line 13, in <module>
    import trio
  File "/usr/local/lib/python3.9/site-packages/trio/__init__.py", line 19, in <module>
    from ._core import TASK_STATUS_IGNORED as TASK_STATUS_IGNORED  # isort: skip
  File "/usr/local/lib/python3.9/site-packages/trio/_core/__init__.py", line 21, in <module>
    from ._local import RunVar
  File "/usr/local/lib/python3.9/site-packages/trio/_core/_local.py", line 5, in <module>
    from . import _run
  File "/usr/local/lib/python3.9/site-packages/trio/_core/_run.py", line 2548, in <module>
    raise NotImplementedError("unsupported platform")
NotImplementedError: unsupported platform

A Python async library, trio, reported that FreeBSD was not supported. The problematic line of code tests the attribute
of select to see if the platform supports kqueue. Apparently, hasattr(select, "kqueue") was False. However, when I executed the following code directly on the same machine, it returned True:

$ python
Python 3.9.17 (main, Jun 13 2023, 15:30:06) 
[Clang 13.0.0 ([email protected]:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a on freebsd14
Type "help", "copyright", "credits" or "license" for more information.
>>> import select
>>> hasattr(select, "kqueue")
True

It's unclear that why the difference exists.

Expected Result

Able to populate the database without errors.

Environment

Platform: FreeBSD 14.0-CURRENT
OpenStack version: Xena (stable/xena)

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

No branches or pull requests

1 participant