Bug 1824355 - Cockpit worker is crashing with message undefined local variable or method `stdin'
Summary: Cockpit worker is crashing with message undefined local variable or method `s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.11.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.11.6
Assignee: Yuri Rudman
QA Contact: Niyaz Akhtar Ansari
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-16 01:36 UTC by Nikhil Gupta
Modified: 2023-10-06 19:40 UTC (History)
7 users (show)

Fixed In Version: 5.11.6.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-10 13:39:10 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:
pm-rhel: cfme-5.11.z+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:2480 0 None None None 2020-06-10 13:39:20 UTC

Description Nikhil Gupta 2020-04-16 01:36:27 UTC
Description of problem:

After enabling the Cockpit worker, the cockpit-ws process is getting aborted with the following messages:
~~~
# tail -f log/evm.log | grep cockpit
/var/www/miq/vmdb/app/models/miq_cockpit_ws_worker.rb:23:in `sync_workers'
[----] I, [2020-04-15T21:24:20.679870 #7135:2af619f685bc]  INFO -- : MIQ(MiqCockpitWsWorker::Runner#start_cockpit_ws) MIQ(MiqCockpitWsWorker::Runner) Started cockpit-ws Process
[----] I, [2020-04-15T21:24:23.680358 #7135:2af619f685bc]  INFO -- : MIQ(MiqCockpitWsWorker::Runner#check_cockpit_ws) MIQ(MiqCockpitWsWorker::Runner) Cockpit-ws Process gone. Restarting...
[----] I, [2020-04-15T21:24:23.680573 #7135:2af619f685bc]  INFO -- : MIQ(MiqCockpitWsWorker::Runner#start_cockpit_ws) MIQ(MiqCockpitWsWorker::Runner) Starting cockpit-ws Process
[----] I, [2020-04-15T21:24:23.680674 #7135:2af619f685bc]  INFO -- : MIQ(MiqCockpitWsWorker::Runner#cockpit_ws_run) MIQ(MiqCockpitWsWorker::Runner) cockpit-ws process starting
[----] E, [2020-04-15T21:24:23.751927 #7135:2af619f685bc] ERROR -- : MIQ(MiqCockpitWsWorker::Runner#start_cockpit_ws_process) MIQ(MiqCockpitWsWorker::Runner) cockpit-ws Process aborted because [undefined local variable or method `stdin' for #<MiqCockpitWsWorker::Runner:0x000055ec3457dde0>
[----] E, [2020-04-15T21:24:23.755046 #7135:2af619f685bc] ERROR -- : /var/www/miq/vmdb/app/models/miq_cockpit_ws_worker/runner.rb:154:in `cockpit_ws_run'
/var/www/miq/vmdb/app/models/miq_cockpit_ws_worker/runner.rb:51:in `start_cockpit_ws_process'
/var/www/miq/vmdb/app/models/miq_cockpit_ws_worker/runner.rb:46:in `start_cockpit_ws'
/var/www/miq/vmdb/app/models/miq_cockpit_ws_worker/runner.rb:39:in `check_cockpit_ws'
/var/www/miq/vmdb/app/models/miq_cockpit_ws_worker/runner.rb:19:in `do_work'
/var/www/miq/vmdb/app/models/miq_cockpit_ws_worker.rb:23:in `sync_workers'
[----] I, [2020-04-15T21:24:23.755258 #7135:2af619f685bc]  INFO -- : MIQ(MiqCockpitWsWorker::Runner#start_cockpit_ws) MIQ(MiqCockpitWsWorker::Runner) Started cockpit-ws Process
[----] I, [2020-04-15T21:24:26.756030 #7135:2af619f685bc]  INFO -- : MIQ(MiqCockpitWsWorker::Runner#check_cockpit_ws) MIQ(MiqCockpitWsWorker::Runner) Cockpit-ws Process gone. Restarting...
[----] I, [2020-04-15T21:24:26.756323 #7135:2af619f685bc]  INFO -- : MIQ(MiqCockpitWsWorker::Runner#start_cockpit_ws) MIQ(MiqCockpitWsWorker::Runner) Starting cockpit-ws Process
[----] I, [2020-04-15T21:24:26.756504 #7135:2af619f685bc]  INFO -- : MIQ(MiqCockpitWsWorker::Runner#cockpit_ws_run) MIQ(MiqCockpitWsWorker::Runner) cockpit-ws process starting
[----] E, [2020-04-15T21:24:26.814415 #7135:2af619f685bc] ERROR -- : MIQ(MiqCockpitWsWorker::Runner#start_cockpit_ws_process) MIQ(MiqCockpitWsWorker::Runner) cockpit-ws Process aborted because [undefined local variable or method `stdin' for #<MiqCockpitWsWorker::Runner:0x000055ec3457dde0>
~~~

Version-Release number of selected component (if applicable):

cfme-5.11.4.2-1.el8cf.x86_64


How reproducible:
Always

Steps to Reproduce:
1. Enable Cockpit Server Role
2. Check evm.log file


Actual results:
Getting error: "undefined local variable or method `stdin' for #<MiqCockpitWsWorker::Runner:0x000055ec3457dde0>"

Expected results:
Cockpit worker process should not be aborted.


Additional info:

# rake evm:status
Checking EVM status...
 Region | Zone    | Server | Status  |  PID | SPID | Workers | Version  | Started     | Heartbeat   | MB Usage | Roles
--------+---------+--------+---------+------+------+---------+----------+-------------+-------------+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     99 | default | EVM*   | started | 6678 | 6814 |      16 | 5.11.4.2 | 01:21:45UTC | 01:22:37UTC |      267 | automate:cockpit_ws:database_operations:database_owner:embedded_ansible:ems_inventory:ems_operations:event:remote_console:reporting:scheduler:smartstate:user_interface:web_services

* marks a master appliance

 Type                                     | Status  |  PID | SPID | Queue                                                                       | Started     | Heartbeat   | MB Usage
------------------------------------------+---------+------+------+-----------------------------------------------------------------------------+-------------+-------------+----------
 CockpitWs                                | started | 7135 | 7206 |                                                                             | 01:21:53UTC | 01:22:39UTC | 235/400
 EventHandler                             | started | 7144 | 7258 | ems                                                                         | 01:21:53UTC | 01:22:42UTC | 206/500
 Generic                                  | started | 7153 | 7320 | generic                                                                     | 01:21:53UTC | 01:22:43UTC | 223/700
 Generic                                  | started | 7162 | 7316 | generic                                                                     | 01:21:54UTC | 01:22:43UTC | 225/700
 Openstack::Cloud::EventCatcher           | started | 7099 | 7192 | ems_99000000000004                                                          | 01:21:51UTC | 01:22:29UTC | 218/2048
 Openstack::Cloud::Refresh                | started | 7108 | 7312 | ems_99000000000002:ems_99000000000003:ems_99000000000004:ems_99000000000005 | 01:21:51UTC | 01:22:16UTC | 309/2048
 Openstack::Network::EventCatcher         | started | 7117 | 7197 | ems_99000000000005                                                          | 01:21:52UTC | 01:22:29UTC | 216/2048
 Openstack::Storage::Cinder::EventCatcher | started | 7126 | 7212 | ems_99000000000002                                                          | 01:21:52UTC | 01:22:30UTC | 216/2048
 Priority                                 | started | 7171 | 7222 | generic                                                                     | 01:21:54UTC | 01:22:43UTC | 233/600
 Priority                                 | started | 7180 | 7238 | generic                                                                     | 01:21:54UTC | 01:22:43UTC | 233/600
 RemoteConsole                            | started | 7244 |      | http:5000                                                                   | 01:21:57UTC | 01:22:36UTC | 210/1024
 Reporting                                | started | 7189 | 7313 | reporting                                                                   | 01:21:55UTC | 01:22:43UTC | 207/500
 Reporting                                | started | 7200 | 7314 | reporting                                                                   | 01:21:55UTC | 01:22:43UTC | 208/500
 Schedule                                 | started | 7213 | 7266 |                                                                             | 01:21:56UTC | 01:22:30UTC | 208/500
 Ui                                       | started | 7225 |      | http:3000                                                                   | 01:21:56UTC | 01:22:35UTC | 208/1024
 WebService                               | started | 7234 |      | http:4000                                                                   | 01:21:57UTC | 01:22:36UTC | 210/1024

All rows have the values: Region=99, Zone=default, Server=EVM


# ps ax | grep cockpit
 7328 ?        SNl    0:00 /usr/libexec/cockpit-ws --port 9002 --address 127.0.0.1 --no-tls
 7792 pts/0    R+     0:00 grep --color=auto cockpit

Comment 8 CFME Bot 2020-04-22 17:09:16 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/7bb07354e4ce0f678b333b34f038e3d0fec32dd7
commit 7bb07354e4ce0f678b333b34f038e3d0fec32dd7
Author:     Yuri Rudman <yrudman>
AuthorDate: Thu Apr 16 17:41:35 2020 +0000
Commit:     Yuri Rudman <yrudman>
CommitDate: Thu Apr 16 17:41:35 2020 +0000

    changes:
     fixed possible nil.close,
     close stderr and stdout when process terminated
     added missing default value in MiqCockpitWsWorker::Runner#wait_on_cockpit_ws(pid) method,
     added logging what command used to start cockpit process and enviroment settings
     fixed typo when accessig command to start cockpit
     return pid or raise error if cockpit process not started

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1824355

 app/models/miq_cockpit_ws_worker/runner.rb | 21 +-
 1 file changed, 14 insertions(+), 7 deletions(-)

Comment 9 CFME Bot 2020-04-23 21:55:16 UTC
New commit detected on ManageIQ/manageiq/jansa:

https://github.com/ManageIQ/manageiq/commit/6787863defd4a01889cb07787ede02db13a61a43
commit 6787863defd4a01889cb07787ede02db13a61a43
Author:     Joe Rafaniello <jrafanie.github.com>
AuthorDate: Tue Apr 21 17:42:19 2020 +0000
Commit:     Joe Rafaniello <jrafanie.github.com>
CommitDate: Tue Apr 21 17:42:19 2020 +0000

    Merge pull request #20077 from yrudman/check-for-nilif-stdin-not-nil-in-cockpit-worker

    Fixed cockpit process starting

    (cherry picked from commit 87de914b8bd946dc2d91b6446d66db5187daef92)

    https://bugzilla.redhat.com/show_bug.cgi?id=1824355

 app/models/miq_cockpit_ws_worker/runner.rb | 21 +-
 lib/miq_cockpit.rb | 2 +-
 2 files changed, 15 insertions(+), 8 deletions(-)

Comment 10 CFME Bot 2020-05-07 18:00:22 UTC
New commit detected on ManageIQ/manageiq/ivanchuk:

https://github.com/ManageIQ/manageiq/commit/c9453d4c6f6f32d472a72a8bb7e103b6852985eb
commit c9453d4c6f6f32d472a72a8bb7e103b6852985eb
Author:     Joe Rafaniello <jrafanie.github.com>
AuthorDate: Tue Apr 21 17:42:19 2020 +0000
Commit:     Joe Rafaniello <jrafanie.github.com>
CommitDate: Tue Apr 21 17:42:19 2020 +0000

    Merge pull request #20077 from yrudman/check-for-nilif-stdin-not-nil-in-cockpit-worker

    Fixed cockpit process starting

    (cherry picked from commit 87de914b8bd946dc2d91b6446d66db5187daef92)

    https://bugzilla.redhat.com/show_bug.cgi?id=1824355

 app/models/miq_cockpit_ws_worker/runner.rb | 21 +-
 lib/miq_cockpit.rb | 2 +-
 2 files changed, 15 insertions(+), 8 deletions(-)

Comment 14 errata-xmlrpc 2020-06-10 13:39:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:2480


Note You need to log in before you can comment on or make changes to this bug.