Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1493756 - cockpit fails with empty page when a link os-release is wrong
cockpit fails with empty page when a link os-release is wrong
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cockpit (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Peter
Jan Ščotka
Depends On:
  Show dependency treegraph
Reported: 2017-09-20 16:12 EDT by Jan Stavel
Modified: 2018-04-10 11:58 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2018-04-10 11:58:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0876 None None None 2018-04-10 11:58 EDT

  None (edit)
Description Jan Stavel 2017-09-20 16:12:14 EDT
Description of problem:

a link /usr/lib/os-release may point to a wrong path.
I do not know how but if I create instance in ci-rhos the link
'/usr/lib/os-release' points to a wrong path '/usr/lib/os-release.d/os-release-rhel' instead of '/usr/lib/os.release.d/os-release-rhel'.

cockpit runs but if I log-in I see just empty page.

How reproducible:

[root@stoner-cockpit-test ~]# ls -al /usr/lib/os-release 

   lrwxrwxrwx. 1 root root 30 18. zář 10.05 /usr/lib/os-release -> ./os-release.d/os-release-rhel

[root@stoner-cockpit-test ~]# systemctl status -l cockpit.service

   ● cockpit.service - Cockpit Web Service
      Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
      Active: active (running) since St 2017-09-20 15:58:53 EDT; 11min ago
        Docs: man:cockpit-ws(8)
     Process: 16629 ExecStartPre=/usr/sbin/remotectl certificate --ensure --user=root --group=cockpit-ws --selinux-type=etc_t (code=exited, status=0/SUCCESS)
    Main PID: 16631 (cockpit-ws)
       Tasks: 3
      CGroup: /system.slice/cockpit.service
              ├─16631 /usr/libexec/cockpit-ws
              └─16642 /usr/bin/ssh-agent

   zář 20 15:58:53 stoner-cockpit-test systemd[1]: Started Cockpit Web Service.
   zář 20 15:58:53 stoner-cockpit-test cockpit-ws[16631]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
   zář 20 15:58:53 stoner-cockpit-test cockpit-ws[16631]: error loading contents of os-release: Failed to open file '/usr/lib/os-release': No such file or directory
   zář 20 15:59:08 stoner-cockpit-test cockpit-session[16637]: pam_ssh_add: Failed adding some keys
Comment 2 Jan Stavel 2017-09-20 16:16:45 EDT
If you open dev console in a browser you can open a row in js file that throws an exception:

            function h(e, t) {
                var n, o = JSON.parse(window.localStorage["os-release"] || "{}"), r = c(e)[0];
                if (r && (n = window.getComputedStyle(r)), n) {
                    var a, i = n.content;
                    return i && "none" != i && "normal" != i ? (a = i.length, ('"' === i[0] || "'" === i[0]) && a > 2 && i[a - 1] === i[0] && (i = i.substr(1, a - 2)), 
                    r.innerHTML = d.format(i, o) || t, c(r).text()) : void 0;

And it points to a line with JSON.parse(window.localStorage["os-release"]...)
Comment 3 Peter 2017-09-21 16:45:31 EDT
Fixing upstream: https://github.com/cockpit-project/cockpit/pull/7730
Comment 4 Martin Pitt 2017-10-13 06:22:04 EDT
This will be fixed in 7.5 through rebasing Cockpit to upstream version 153. See bug 1470780.
Comment 9 errata-xmlrpc 2018-04-10 11:58:14 EDT
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.


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