keystone WSGI fail: ArgsAlreadyParsedError: arguments already parsed: cannot register CLI option

Bug #1582729 reported by Alexander Nevenchannyy
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Dmitry Burmistrov
Mitaka
Fix Released
High
Dmitry Burmistrov
Newton
Fix Committed
High
Dmitry Burmistrov

Bug Description

mod_wsgi (pid=28386): Target WSGI script '/usr/lib/cgi-bin/keystone/main' cannot be loaded as Python module.
mod_wsgi (pid=28386): Exception occurred processing WSGI script '/usr/lib/cgi-bin/keystone/main'.
Traceback (most recent call last):
  File "/usr/lib/cgi-bin/keystone/main", line 25, in <module>
    application = wsgi_server.initialize_application(name)
  File "/usr/lib/python2.7/dist-packages/keystone/server/wsgi.py", line 51, in initialize_application
    common.configure()
  File "/usr/lib/python2.7/dist-packages/keystone/server/common.py", line 31, in configure
    config.configure()
  File "/usr/lib/python2.7/dist-packages/keystone/common/config.py", line 1200, in configure
    help='Do not monkey-patch threading system modules.'))
  File "/usr/lib/python2.7/dist-packages/oslo_config/cfg.py", line 1824, in __inner
    result = f(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/oslo_config/cfg.py", line 1999, in register_cli_opt
    raise ArgsAlreadyParsedError("cannot register CLI option")
ArgsAlreadyParsedError: arguments already parsed: cannot register CLI option

Upstream bug: https://bugs.launchpad.net/keystone/+bug/1516946

[root@fuel ~]# cat /etc/fuel_build_id
308

Folks, we need to resolve this bug as soon as possible

Changed in fuel:
importance: Undecided → Critical
status: New → Confirmed
assignee: nobody → MOS Puppet Team (mos-puppet)
Revision history for this message
Alexander Makarov (amakarov) wrote :

The fix:
- in Apache virtual host config change /usr/lib/cgi-bin/keystone/main to /usr/bin/keystone-wsgi-main following the deprecation warning recommendation.
- the same for admin app

Revision history for this message
Bug Checker Bot (bug-checker) wrote : Autochecker

(This check performed automatically)
Please, make sure that bug description contains the following sections filled in with the appropriate data related to the bug you are describing:

actual result

version

expected result

steps to reproduce

For more detailed information on the contents of each of the listed sections see https://wiki.openstack.org/wiki/Fuel/How_to_contribute#Here_is_how_you_file_a_bug

tags: added: need-info
Changed in fuel:
assignee: MOS Puppet Team (mos-puppet) → Dmitry Burmistrov (dmburmistrov)
Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

Why is this critical? What's the impact? If Keystone could not start, BVT would be broken, but it passes now:

https://product-ci.infra.mirantis.net/job/9.0.main.ubuntu.bvt_2/

tags: added: area-puppet
Revision history for this message
Dmitry Burmistrov (dmburmistrov) wrote :

This should be fixed in Newton:
1) https://review.openstack.org/#/c/318738/ prepared fuel noop tests
2) https://review.openstack.org/#/c/294303/ should fix current issue

For Mitaka patches backporting is in progress:
1) noop tests: https://review.openstack.org/#/c/322015/
2) upstream fix: https://review.openstack.org/321618

Roman, can you check this patches on your environment?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-library (stable/mitaka)

Reviewed: https://review.openstack.org/322015
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=891f6b0fa77762ce8fe57ea16c188be0233b8fdb
Submitter: Jenkins
Branch: stable/mitaka

commit 891f6b0fa77762ce8fe57ea16c188be0233b8fdb
Author: Alex Schultz <email address hidden>
Date: Thu May 19 09:15:01 2016 -0600

    Update keystone noop tests for wsgi files

    Change I03a7a057cae0bf86331191faf47ec394487150a7 is updating the source
    path of the wsgi files used to configure keystone under apache. This
    change updates the noop tests to just check that the files exist and
    configured in the catalog but to exclude the path information. Once the
    change in upstream gets merged, we could add the path information back
    in but fuel really shouldn't care where it lives so long as they are
    configured. The upstream tests should be relied on to ensure the
    source/destination paths are managed correctly.

    Change-Id: I9969185306c77254e781b2c52a6b9bededf40a98
    Related-Bug: #1539201
    Related-Bug: #1582729
    (cherry picked from commit b09d1cbbc159ffbbf2263a7a1dae994ef2023c39)

tags: added: in-stable-mitaka
Revision history for this message
Dmitry Burmistrov (dmburmistrov) wrote :

Last change for mitaka was merged (https://review.openstack.org/#/c/321618/).
All fixes are committed now.

tags: added: on-verification
Revision history for this message
Alexander Petrov (apetrov-n) wrote :

Verified on MOS 9.0 ISO 479

tags: removed: on-verification
Revision history for this message
Shlomi (shlomi-tsadok) wrote :

I'm encountering the exact same issue on an updated MOS 9.2. Appeared suddenly on a working deployment. Makes sense? Any intermediate manual workaround for a running controller?

Revision history for this message
shivani tripathi (shivani-1997) wrote :

We have deployed Openstack Train Version using kolla-ansible(9.3.1)

After adding AD server configuration details in the keystone.conf where the path as /etc/kolla/keystone/keystone.conf.

I referred to this link for setting up AD DS server on keystone identity container-->
https://wiki.openstack.org/wiki/HowtoIntegrateKeystonewithAD

Outcome:
Need to integrate keystone identity service with AD DS server.

Below is the issue when we restart the container of keystone identity service:

==> keystone-apache-admin-error.log <==
2021-06-22 19:41:29.302222 mod_wsgi (pid=32): Target WSGI script '/var/lib/kolla/venv/bin/keystone-wsgi-admin' cannot be loaded as Python module.
2021-06-22 19:41:29.302370 mod_wsgi (pid=32): Exception occurred processing WSGI script '/var/lib/kolla/venv/bin/keystone-wsgi-admin'.
2021-06-22 19:41:29.302451 Traceback (most recent call last):
2021-06-22 19:41:29.302505 File "/var/lib/kolla/venv/bin/keystone-wsgi-admin", line 52, in <module>
2021-06-22 19:41:29.302581 application = initialize_admin_application()
2021-06-22 19:41:29.302608 File "/var/lib/kolla/venv/lib/python2.7/site-packages/keystone/server/wsgi.py", line 24, in initialize_public_application
2021-06-22 19:41:29.302656 name='public', config_files=flask_core._get_config_files())
2021-06-22 19:41:29.302680 File "/var/lib/kolla/venv/lib/python2.7/site-packages/keystone/server/flask/core.py", line 157, in initialize_application
2021-06-22 19:41:29.302726 keystone.server.configure(config_files=config_files)
2021-06-22 19:41:29.302750 File "/var/lib/kolla/venv/lib/python2.7/site-packages/keystone/server/__init__.py", line 28, in configure
2021-06-22 19:41:29.302848 keystone.conf.configure()
2021-06-22 19:41:29.302882 File "/var/lib/kolla/venv/lib/python2.7/site-packages/keystone/conf/__init__.py", line 137, in configure
2021-06-22 19:41:29.302931 deprecated_since=versionutils.deprecated.STEIN))
2021-06-22 19:41:29.302955 File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_config/cfg.py", line 2051, in __inner
2021-06-22 19:41:29.303002 result = f(self, *args, **kwargs)
2021-06-22 19:41:29.303056 File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_config/cfg.py", line 2329, in register_cli_opt
2021-06-22 19:41:29.303153 raise ArgsAlreadyParsedError("cannot register CLI option")
2021-06-22 19:41:29.303221 ArgsAlreadyParsedError: arguments already parsed: cannot register CLI option

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.