Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid OpenQA::IPC::ipc being called premetaure #1185

Merged
merged 1 commit into from Jan 18, 2017

Conversation

coolo
Copy link
Contributor

@coolo coolo commented Jan 18, 2017

This singleton is very dangerous as if you call it wrong the first time,
it will stick to that. And that's what happened in the full-stack test.
The websocket server was calling the scheduler with ipc->scheduler during
its startup phase - and this set the singleton to its own event loop.
Just that we never called that event loop - and so the dbus service was
stuck on the bus and caused everything else to lockup.

I overreacted a bit and now expect the fake tests to set an environment
variable if they want the testing event loop and the websocket service
to always call ipc with 1 - which will use the mojo loop

@codecov-io
Copy link

codecov-io commented Jan 18, 2017

Current coverage is 85.31% (diff: 85.71%)

Merging #1185 into master will increase coverage by 1.52%

@@             master      #1185   diff @@
==========================================
  Files           103        103          
  Lines          7045       7046     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           5903       6011   +108   
+ Misses         1142       1035   -107   
  Partials          0          0          

Powered by Codecov. Last update 4fb9084...c5398fe

@coolo
Copy link
Contributor Author

coolo commented Jan 18, 2017

No idea yet where the 220 misses come from now

@coolo
Copy link
Contributor Author

coolo commented Jan 18, 2017

===(     708;92  1/?  0/? )=============================================Uncaught exception from user code:
	org.freedesktop.DBus.Error.AccessDenied: Connection ":1.7" is not allowed to own the service "org.opensuse.openqa.Scheduler" due to security policies in the configuration file
	Net::DBus::Binding::Bus::request_name('Net::DBus::Binding::Bus=HASH(0xa188ab0)', 'org.opensuse.openqa.Scheduler') called at /home/travis/perl_modules/lib/perl5/x86_64-linux/Net/DBus/Service.pm line 82
	Net::DBus::Service::new('Net::DBus::Service', 'Net::DBus=HASH(0xa175820)', 'org.opensuse.openqa.Scheduler') called at /home/travis/perl_modules/lib/perl5/x86_64-linux/Net/DBus.pm line 361
	Net::DBus::export_service('Net::DBus=HASH(0xa175820)', 'org.opensuse.openqa.Scheduler') called at lib/OpenQA/IPC.pm line 71
	OpenQA::IPC::register_service('OpenQA::IPC=HASH(0x9785430)', 'scheduler') called at lib/OpenQA/Scheduler.pm line 60
	OpenQA::Scheduler::new('OpenQA::Scheduler') called at ./t/20-workers-ws.t line 33
[15:23:24] ./t/20-workers-ws.t ....................... Dubious, test returned 11 (wstat 2816, 0xb00)

@coolo coolo force-pushed the restart_on_deployment branch 2 times, most recently from add90cd to ad79966 Compare January 18, 2017 15:49
This singleton is very dangerous as if you call it wrong the first time,
it will stick to that. And that's what happened in the full-stack test.
The websocket server was calling the scheduler with ipc->scheduler during
its startup phase - and this set the singleton to its own event loop.
Just that we never called that event loop - and so the dbus service was
stuck on the bus and caused everything else to lockup.

I overreacted a bit and now expect the fake tests to set an environment
variable if they want the testing event loop and the websocket service
to always call ipc with 1 - which will use the mojo loop
@coolo coolo merged commit b597cd6 into os-autoinst:master Jan 18, 2017
@coolo coolo deleted the restart_on_deployment branch January 18, 2017 16:17
coolo pushed a commit that referenced this pull request Jan 18, 2017
commit b597cd6
Author:     Stephan Kulow <coolo@kde.org>
AuthorDate: Wed Jan 18 17:17:10 2017 +0100
Commit:     GitHub <noreply@github.com>
CommitDate: Wed Jan 18 17:17:10 2017 +0100

    Avoid OpenQA::IPC::ipc being called premetaure (#1185)

    This singleton is very dangerous as if you call it wrong the first time,
    it will stick to that. And that's what happened in the full-stack test.
    The websocket server was calling the scheduler with ipc->scheduler during
    its startup phase - and this set the singleton to its own event loop.
    Just that we never called that event loop - and so the dbus service was
    stuck on the bus and caused everything else to lockup.

    I overreacted a bit and now expect the fake tests to set an environment
    variable if they want the testing event loop and the websocket service
    to always call ipc with 1 - which will use the mojo loop
@okurz
Copy link
Member

okurz commented Jan 18, 2017

I would have preferred the typo premetaure to be fixed - unless I should learn this new word?

@aaannz
Copy link
Contributor

aaannz commented Jan 18, 2017

Once it is in git history it is as good as in Oxford dictionary. :D

@coolo
Copy link
Contributor Author

coolo commented Jan 18, 2017

I think you should give my fingers credit :)

The UK layout is just not good to my typing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants