Bug 2253761 - ipsilon-server-install fails with module 'jinja2.ext' has no attribute 'autoescape'
Summary: ipsilon-server-install fails with module 'jinja2.ext' has no attribute 'autoe...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ipsilon
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-12-09 10:20 UTC by Jan Pazdziora (Red Hat)
Modified: 2023-12-20 01:25 UTC (History)
3 users (show)

Fixed In Version: ipsilon-3.0.4-11.fc39
Clone Of:
Environment:
Last Closed: 2023-12-20 01:25:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora (Red Hat) 2023-12-09 10:20:35 UTC
Running ipsilon-server-install started to fail with module 'jinja2.ext' has no attribute 'autoescape'.


Reproducible: Always

Steps to Reproduce:
1. dnf install -y ipsilon ipsilon-authform
2. ipsilon-server-install --form yes

Actual Results:  
Installation initiated
Installing default config files
Considering datastore AdminStore
Initializing schema for AdminStore
module 'jinja2.ext' has no attribute 'autoescape'
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.

The /var/log/ipsilon-install.log has:

[2023-12-09 11:13:21,011] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/helpers/__pycache__ for class Installer
[2023-12-09 11:13:21,011] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/helpers/__init__.py for class Installer
[2023-12-09 11:13:21,012] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/helpers/common.py for class Installer
[2023-12-09 11:13:21,012] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/login/__pycache__ for class Installer
[2023-12-09 11:13:21,012] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/login/__init__.py for class Installer
[2023-12-09 11:13:21,012] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/login/authtest.py for class Installer
[2023-12-09 11:13:21,012] [09/Dec/2023:11:13:21]  Added module authtest as testauth
[2023-12-09 11:13:21,012] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/login/common.py for class Installer
[2023-12-09 11:13:21,012] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/login/authform.py for class Installer
[2023-12-09 11:13:21,012] [09/Dec/2023:11:13:21]  Added module authform as form
[2023-12-09 11:13:21,012] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/info/__pycache__ for class Installer
[2023-12-09 11:13:21,013] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/info/__init__.py for class Installer
[2023-12-09 11:13:21,013] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/info/common.py for class Installer
[2023-12-09 11:13:21,013] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/info/infonss.py for class Installer
[2023-12-09 11:13:21,013] [09/Dec/2023:11:13:21]  Added module infonss as nss
[2023-12-09 11:13:21,013] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/providers/openid for class Installer
[2023-12-09 11:13:21,013] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/providers/__pycache__ for class Installer
[2023-12-09 11:13:21,013] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/providers/openidp.py for class Installer
[2023-12-09 11:13:21,024] [09/Dec/2023:11:13:21]  Added module openidp as openid
[2023-12-09 11:13:21,024] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/providers/__init__.py for class Installer
[2023-12-09 11:13:21,024] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/providers/common.py for class Installer
[2023-12-09 11:13:21,024] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/authz/__pycache__ for class Installer
[2023-12-09 11:13:21,024] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/authz/__init__.py for class Installer
[2023-12-09 11:13:21,024] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/authz/allow.py for class Installer
[2023-12-09 11:13:21,024] [09/Dec/2023:11:13:21]  Added module allow as allow
[2023-12-09 11:13:21,024] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/authz/common.py for class Installer
[2023-12-09 11:13:21,025] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/authz/deny.py for class Installer
[2023-12-09 11:13:21,025] [09/Dec/2023:11:13:21]  Added module deny as deny
[2023-12-09 11:13:21,025] [09/Dec/2023:11:13:21]  Check module /usr/lib/python3.12/site-packages/ipsilon/authz/spgroup.py for class Installer
[2023-12-09 11:13:21,025] [09/Dec/2023:11:13:21]  Added module spgroup as spgroup
[2023-12-09 11:13:21,027] Installation arguments:
[2023-12-09 11:13:21,027] admin_dburi: None
[2023-12-09 11:13:21,027] admin_user: admin
[2023-12-09 11:13:21,027] authz_allow: yes
[2023-12-09 11:13:21,027] authz_deny: no
[2023-12-09 11:13:21,027] authz_spgroup: no
[2023-12-09 11:13:21,027] authz_spgroup_prefix: None
[2023-12-09 11:13:21,027] authz_spgroup_suffix: None
[2023-12-09 11:13:21,027] az_order: ['allow']
[2023-12-09 11:13:21,027] cleanup_interval: 30
[2023-12-09 11:13:21,027] config_profile: None
[2023-12-09 11:13:21,027] database_url: sqlite:///%(datadir)s/%(dbname)s.sqlite
[2023-12-09 11:13:21,027] form: yes
[2023-12-09 11:13:21,027] form_service: ipsilon
[2023-12-09 11:13:21,027] hostname: machine.example.com
[2023-12-09 11:13:21,027] info_nss: no
[2023-12-09 11:13:21,027] instance: idp
[2023-12-09 11:13:21,027] lm_order: ['form']
[2023-12-09 11:13:21,027] openid: yes
[2023-12-09 11:13:21,027] openid_dburi: None
[2023-12-09 11:13:21,028] openid_extensions: 
[2023-12-09 11:13:21,028] root_instance: False
[2023-12-09 11:13:21,028] samlsessions_dburi: None
[2023-12-09 11:13:21,028] secure: yes
[2023-12-09 11:13:21,028] server_debugging: False
[2023-12-09 11:13:21,028] session_timeout: 30
[2023-12-09 11:13:21,028] system_user: ipsilon
[2023-12-09 11:13:21,028] testauth: no
[2023-12-09 11:13:21,028] testauth_groups: None
[2023-12-09 11:13:21,028] transaction_dburi: None
[2023-12-09 11:13:21,028] uninstall: False
[2023-12-09 11:13:21,028] users_dburi: None
[2023-12-09 11:13:21,028] yes: False
[2023-12-09 11:13:21,028] Installation initiated
[2023-12-09 11:13:21,028] Installing default config files
[2023-12-09 11:13:21,033] Considering datastore AdminStore
[2023-12-09 11:13:21,041] Initializing schema for AdminStore
[2023-12-09 11:13:21,069] module 'jinja2.ext' has no attribute 'autoescape'
[2023-12-09 11:13:21,069] module 'jinja2.ext' has no attribute 'autoescape'
Traceback (most recent call last):
  File "/usr/sbin/ipsilon-server-install", line 528, in <module>
    install(fplugins, opts)
  File "/usr/sbin/ipsilon-server-install", line 185, in install
    dbupgrade.execute_upgrade(ipsilon_conf)
  File "/usr/lib/python3.12/site-packages/ipsilon/tools/dbupgrade.py", line 81, in execute_upgrade
    template_env = Environment(
                   ^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/jinja2/environment.py", line 363, in __init__
    self.extensions = load_extensions(self, extensions)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/jinja2/environment.py", line 117, in load_extensions
    extension = t.cast(t.Type["Extension"], import_string(extension))
                                            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/jinja2/utils.py", line 149, in import_string
    return getattr(__import__(module, None, None, [obj]), obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'jinja2.ext' has no attribute 'autoescape'
[2023-12-09 11:13:21,071] Installation aborted.
[2023-12-09 11:13:21,071] See log file /var/log/ipsilon-install.log for details

Comment 2 Jan Pazdziora (Red Hat) 2023-12-11 12:47:31 UTC
A patch https://github.com/adelton/webauthinfra/commit/83a8d6b872b54deb72946e62da74ab93b48ab397#diff-7a40af808e820a43a47268133ba7a1e4df116486154046847a7df6e2ff1c6599 seems to fix the problem for me, on the installed system.

Comment 3 Fedora Update System 2023-12-11 18:51:30 UTC
FEDORA-2023-a7abef214f has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-a7abef214f

Comment 4 Fedora Update System 2023-12-12 01:30:42 UTC
FEDORA-2023-a7abef214f has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-a7abef214f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-a7abef214f

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

Comment 5 Fedora Update System 2023-12-20 01:25:03 UTC
FEDORA-2023-a7abef214f has been pushed to the Fedora 39 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.