Project

General

Profile

Actions

action #17664

closed

Whitespace in auth module config causes webui to fail to start

Added by ktsamis over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Regressions/Crashes
Target version:
Start date:
2017-03-10
Due date:
% Done:

100%

Estimated time:

Description

Changed in /etc/openqa/openqa.ini:

[auth]
method = Fake

restart the openqa-webui service and I get:

503 error on webui. I see the following errors in the logs and the service fails to start.

Service:

e251:~ # systemctl status openqa-webui -l
● openqa-webui.service - The openQA web UI
   Loaded: loaded (/usr/lib/systemd/system/openqa-webui.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2017-03-10 14:56:41 CET; 11min ago
  Process: 2964 ExecStart=/usr/share/openqa/script/openqa prefork -m production --proxy -i 100 -H 400 -w 10 -a 100 -G 1000 -r 20 (code=exited, status=255)
 Main PID: 2964 (code=exited, status=255)

Mar 10 14:56:41 e251 openqa[2964]: Undefined subroutine &OpenQA::WebAPI::auth_config called at /usr/lib/perl5/vendor_perl/5.18.2/Mojo/Server.pm line 17.
Mar 10 14:56:41 e251 openqa[2964]: Mojolicious::AUTOLOAD('HASH(0x80043d8)') called at /usr/share/openqa/script/../lib/OpenQA/WebAPI.pm line 156
Mar 10 14:56:41 e251 openqa[2964]: OpenQA::WebAPI::startup('OpenQA::WebAPI=HASH(0x1a35988)') called at /usr/lib/perl5/vendor_perl/5.18.2/Mojolicious.pm line 179
Mar 10 14:56:41 e251 openqa[2964]: Mojolicious::new('OpenQA::WebAPI') called at /usr/lib/perl5/vendor_perl/5.18.2/Mojo/Server.pm line 17
Mar 10 14:56:41 e251 openqa[2964]: Mojo::Server::build_app('Mojo::Server=HASH(0x192af38)', 'OpenQA::WebAPI') called at /usr/lib/perl5/vendor_perl/5.18.2/Mojolicious/Commands.pm line 71
Mar 10 14:56:41 e251 openqa[2964]: Mojolicious::Commands::start_app('Mojolicious::Commands', 'OpenQA::WebAPI') called at /usr/share/openqa/script/../lib/OpenQA/WebAPI.pm line 501
Mar 10 14:56:41 e251 openqa[2964]: OpenQA::WebAPI::run() called at /usr/share/openqa/script/openqa line 35
Mar 10 14:56:41 e251 systemd[1]: openqa-webui.service: Main process exited, code=exited, status=255/n/a
Mar 10 14:56:41 e251 systemd[1]: openqa-webui.service: Unit entered failed state.
Mar 10 14:56:41 e251 systemd[1]: openqa-webui.service: Failed with result 'exit-code'.

logs:


2017-03-10T14:56:40.967877+01:00 e251 systemd[1]: Stopped The openQA web UI.
2017-03-10T14:56:40.985467+01:00 e251 systemd[1]: Started The openQA web UI.
2017-03-10T14:56:41.704731+01:00 e251 kernel: [  379.611924] audit: type=1400 audit(1489154201.700:47): apparmor="DENIED" operation="exec" profile="/usr/share/openqa/script/openqa" name="/usr/bin/unzip-plain" pid=2973 comm="openqa" requested_mask="x" denied_mask="x" fsuid=480 ouid=0
2017-03-10T14:56:41.933945+01:00 e251 openqa[2964]: Use of inherited AUTOLOAD for non-method OpenQA::WebAPI::auth_config() is
2017-03-10T14:56:41.934165+01:00 e251 openqa[2964]: deprecated at /usr/share/openqa/script/../lib/OpenQA/WebAPI.pm line 156 (#1)
2017-03-10T14:56:41.934277+01:00 e251 openqa[2964]: (D deprecated) As an (ahem) accidental feature, AUTOLOAD
2017-03-10T14:56:41.934381+01:00 e251 openqa[2964]: subroutines are looked up as methods (using the @ISA hierarchy)
2017-03-10T14:56:41.934480+01:00 e251 openqa[2964]: even when the subroutines to be autoloaded were called as plain
2017-03-10T14:56:41.934577+01:00 e251 openqa[2964]: functions (e.g. Foo::bar()), not as methods (e.g. Foo->bar() or
2017-03-10T14:56:41.934680+01:00 e251 openqa[2964]: $obj->bar()).
2017-03-10T14:56:41.934779+01:00 e251 openqa[2964]: This bug will be rectified in future by using method lookup only for
2017-03-10T14:56:41.934878+01:00 e251 openqa[2964]: methods' AUTOLOADs.  However, there is a significant base of existing
2017-03-10T14:56:41.934975+01:00 e251 openqa[2964]: code that may be using the old behavior.  So, as an interim step, Perl
2017-03-10T14:56:41.935071+01:00 e251 openqa[2964]: currently issues an optional warning when non-methods use inherited
2017-03-10T14:56:41.935167+01:00 e251 openqa[2964]: AUTOLOADs.
2017-03-10T14:56:41.935264+01:00 e251 openqa[2964]: The simple rule is:  Inheritance will not work when autoloading
2017-03-10T14:56:41.935361+01:00 e251 openqa[2964]: non-methods.  The simple fix for old code is:  In any module that used
2017-03-10T14:56:41.935459+01:00 e251 openqa[2964]: to depend on inheriting AUTOLOAD for non-methods from a base class
2017-03-10T14:56:41.935556+01:00 e251 openqa[2964]: named BaseClass, execute *AUTOLOAD = \&BaseClass::AUTOLOAD during
2017-03-10T14:56:41.935651+01:00 e251 openqa[2964]: startup.
2017-03-10T14:56:41.935750+01:00 e251 openqa[2964]: In code that currently says use AutoLoader; @ISA = qw(AutoLoader);
2017-03-10T14:56:41.935847+01:00 e251 openqa[2964]: you should remove AutoLoader from @ISA and change use AutoLoader; to
2017-03-10T14:56:41.935943+01:00 e251 openqa[2964]: use AutoLoader 'AUTOLOAD';.
2017-03-10T14:56:41.936096+01:00 e251 openqa[2964]: Undefined subroutine &OpenQA::WebAPI::auth_config called at
2017-03-10T14:56:41.936208+01:00 e251 openqa[2964]: /usr/lib/perl5/vendor_perl/5.18.2/Mojo/Server.pm line 17 (#2)
2017-03-10T14:56:41.936317+01:00 e251 openqa[2964]: (F) The subroutine indicated hasn't been defined, or if it was, it has
2017-03-10T14:56:41.936428+01:00 e251 openqa[2964]: since been undefined.
2017-03-10T14:56:41.936541+01:00 e251 openqa[2964]: Uncaught exception from user code:
2017-03-10T14:56:41.936656+01:00 e251 openqa[2964]: Undefined subroutine &OpenQA::WebAPI::auth_config called at /usr/lib/perl5/vendor_perl/5.18.2/Mojo/Server.pm line 17.
2017-03-10T14:56:41.936816+01:00 e251 openqa[2964]: Mojolicious::AUTOLOAD('HASH(0x80043d8)') called at /usr/share/openqa/script/../lib/OpenQA/WebAPI.pm line 156
2017-03-10T14:56:41.936930+01:00 e251 openqa[2964]: OpenQA::WebAPI::startup('OpenQA::WebAPI=HASH(0x1a35988)') called at /usr/lib/perl5/vendor_perl/5.18.2/Mojolicious.pm line 179
2017-03-10T14:56:41.937042+01:00 e251 openqa[2964]: Mojolicious::new('OpenQA::WebAPI') called at /usr/lib/perl5/vendor_perl/5.18.2/Mojo/Server.pm line 17
2017-03-10T14:56:41.937157+01:00 e251 openqa[2964]: Mojo::Server::build_app('Mojo::Server=HASH(0x192af38)', 'OpenQA::WebAPI') called at /usr/lib/perl5/vendor_perl/5.18.2/Mojolicious/Commands.pm line 71
2017-03-10T14:56:41.937268+01:00 e251 openqa[2964]: Mojolicious::Commands::start_app('Mojolicious::Commands', 'OpenQA::WebAPI') called at /usr/share/openqa/script/../lib/OpenQA/WebAPI.pm line 501
2017-03-10T14:56:41.937377+01:00 e251 openqa[2964]: OpenQA::WebAPI::run() called at /usr/share/openqa/script/openqa line 35
2017-03-10T14:56:41.952612+01:00 e251 systemd[1]: openqa-webui.service: Main process exited, code=exited, status=255/n/a
2017-03-10T14:56:41.953335+01:00 e251 systemd[1]: openqa-webui.service: Unit entered failed state.
2017-03-10T14:56:41.953501+01:00 e251 systemd[1]: openqa-webui.service: Failed with result 'exit-code'.

If I have OpenID in auth, I see the webui but can't authenticate/login because of action #17652. I get 500 from the microfocus openID. So I basically can't login in my instance. Retrying doesn't work.
openQA-4.4.1488895973.56121a4-103.1.noarch

Let me know if you need any logs.

Actions

Also available in: Atom PDF