Bug 2268982

Summary: ipsilon-server-install fails with expected schema argument to be a string, got <class 'sqlalchemy.engine.base.Engine'>.
Product: [Fedora] Fedora Reporter: Jan Pazdziora (Red Hat) <jpazdziora>
Component: ipsilonAssignee: Kevin Fenzi <kevin>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 40CC: adelton, jonathan, jpazdziora, kevin
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: ipsilon-3.0.5-0.1.git20241202.01109c1.fc40 ipsilon-3.0.5-0.1.git20241202.01109c1.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-12-11 02:25:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.