Bug 2268982 - ipsilon-server-install fails with expected schema argument to be a string, got <class 'sqlalchemy.engine.base.Engine'>.
Summary: ipsilon-server-install fails with expected schema argument to be a string, go...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ipsilon
Version: 40
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-03-11 10:00 UTC by Jan Pazdziora (Red Hat)
Modified: 2024-12-12 01:33 UTC (History)
4 users (show)

Fixed In Version: ipsilon-3.0.5-0.1.git20241202.01109c1.fc40 ipsilon-3.0.5-0.1.git20241202.01109c1.fc41
Clone Of:
Environment:
Last Closed: 2024-12-11 02:25:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora (Red Hat) 2024-03-11 10:00:02 UTC
Running ipsilon-server-install started to fail with

expected schema argument to be a string, got <class 'sqlalchemy.engine.base.Engine'>.



Reproducible: Always

Steps to Reproduce:
1. dnf install -y ipsilon ipsilon-authform
2. ipsilon-server-install --form yes
Actual Results:  
/usr/sbin/ipsilon-server-install:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources  # pylint: disable=unused-import
Installation initiated
Installing default config files
Considering datastore AdminStore
expected schema argument to be a string, got <class 'sqlalchemy.engine.base.Engine'>.
Installation aborted.
See log file /var/log/ipsilon-install.log for details


Expected Results:  
Installation initiated
Installing default config files
Considering datastore AdminStore
Initializing schema for AdminStore
Handling sessions datastore
File based, skipping
Handling default datastore UserStore
Considering datastore UserStore
Initializing schema for UserStore
Handling default datastore TranStore
Considering datastore TranStore
Initializing schema for TranStore
Configuring environment helpers
Configuring login managers
Configuring Info provider
Configuring Authentication Providers
Configuring Authorization providers
Considering datastore AdminStore
Schema for AdminStore is up-to-date
Handling sessions datastore
File based, skipping
Handling default datastore UserStore
Considering datastore UserStore
Schema for UserStore is up-to-date
Handling default datastore TranStore
Considering datastore TranStore
Schema for TranStore is up-to-date
Handling plugin openid
Creating plugin AdminStore table
Creating plugin UserStore table
Handling plugin datastore OpenIDStore
Considering datastore OpenIDStore
Schema for OpenIDStore is up-to-date
Handling plugin form
Creating plugin AdminStore table
Creating plugin UserStore table
Handling plugin allow
Creating plugin AdminStore table
Creating plugin UserStore table
Installation complete.
Please restart HTTPD to enable the IdP instance.

(These are the results from Fedora 39.)


The /var/log/ipsilon-install.log ends with

[2024-03-11 10:57:50,374] testauth_groups: None
[2024-03-11 10:57:50,374] transaction_dburi: None
[2024-03-11 10:57:50,374] uninstall: False
[2024-03-11 10:57:50,374] users_dburi: None
[2024-03-11 10:57:50,374] yes: False
[2024-03-11 10:57:50,375] Installation initiated
[2024-03-11 10:57:50,375] Installing default config files
[2024-03-11 10:57:50,411] Considering datastore AdminStore
[2024-03-11 10:57:50,412] expected schema argument to be a string, got <class 'sqlalchemy.engine.base.Engine'>.
[2024-03-11 10:57:50,412] expected schema argument to be a string, got <class 'sqlalchemy.engine.base.Engine'>.
Traceback (most recent call last):
  File "/usr/sbin/ipsilon-server-install", line 543, in <module>
    install(fplugins, opts)
  File "/usr/sbin/ipsilon-server-install", line 200, in install
    dbupgrade.execute_upgrade(ipsilon_conf)
  File "/usr/lib/python3.12/site-packages/ipsilon/tools/dbupgrade.py", line 73, in execute_upgrade
    if _upgrade_database(adminstore) not in [True, None]:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ipsilon/tools/dbupgrade.py", line 29, in _upgrade_database
    current_version = datastore._get_schema_version()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ipsilon/util/data.py", line 800, in _get_schema_version
    q = self._query(self._db, 'dbinfo', OPTIONS_TABLE, trans=False)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ipsilon/util/data.py", line 167, in __init__
    self._table = self._get_table(table, table_def)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ipsilon/util/data.py", line 212, in _get_table
    table = Table(name, MetaData(self._db.engine()), *table_creation)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/sqlalchemy/sql/schema.py", line 5470, in __init__
    raise exc.ArgumentError(
sqlalchemy.exc.ArgumentError: expected schema argument to be a string, got <class 'sqlalchemy.engine.base.Engine'>.
[2024-03-11 10:57:50,416] Installation aborted.
[2024-03-11 10:57:50,416] See log file /var/log/ipsilon-install.log for details

Comment 2 Fedora Update System 2024-12-02 19:02:23 UTC
FEDORA-2024-d81d47287e (ipsilon-3.0.5-0.1.git20241202.01109c1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-d81d47287e

Comment 3 Fedora Update System 2024-12-02 19:02:24 UTC
FEDORA-2024-49400e9733 (ipsilon-3.0.5-0.1.git20241202.01109c1.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-49400e9733

Comment 4 Fedora Update System 2024-12-03 03:06:16 UTC
FEDORA-2024-49400e9733 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-49400e9733`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-49400e9733

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2024-12-04 02:23:34 UTC
FEDORA-2024-d81d47287e has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-d81d47287e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-d81d47287e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2024-12-11 02:25:12 UTC
FEDORA-2024-49400e9733 (ipsilon-3.0.5-0.1.git20241202.01109c1.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2024-12-12 01:33:38 UTC
FEDORA-2024-d81d47287e (ipsilon-3.0.5-0.1.git20241202.01109c1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.