Bug 1561773 - zram-stats fails with SyntaxError invalid syntax
Summary: zram-stats fails with SyntaxError invalid syntax
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-28 22:04 UTC by Chris Murphy
Modified: 2019-10-02 00:47 UTC (History)
8 users (show)

Fixed In Version: anaconda-31.22.5-1.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-02 00:47:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Chris Murphy 2018-03-28 22:04:03 UTC
Description of problem:

/usr/libexec/anaconda/zram-stats doesn't seem to work, maybe use zramctl instead?


Version-Release number of selected component (if applicable):
anaconda-core-28.22.2-7.fc28.x86_64

How reproducible:
Always

Steps to Reproduce:

1. Boot netinstall
2. Confirm zram device

[anaconda root@localhost ~]# swapon
NAME       TYPE      SIZE USED PRIO
/dev/zram0 partition   2G   0B  100
[anaconda root@localhost ~]# 

3. Check stats /usr/libexec/anaconda/zram-stats



Actual results:


[root@localhost-live ~]# /usr/libexec/anaconda/zram-stats
/sys/block/zram0
disksize:         2089226240 
cat: /sys/block/zram0/num_reads: No such file or directory
num_reads:                 0 
cat: /sys/block/zram0/num_writes: No such file or directory
num_writes:                0 
cat: /sys/block/zram0/invalid_io: No such file or directory
invalid_io:                0 
cat: /sys/block/zram0/notify_free: No such file or directory
notify_free:               0 
cat: /sys/block/zram0/zero_pages: No such file or directory
zero_pages:                0 
cat: /sys/block/zram0/orig_data_size: No such file or directory
orig_data_size:            0 
cat: /sys/block/zram0/compr_data_size: No such file or directory
compr_data_size:           0 
cat: /sys/block/zram0/mem_used_total: No such file or directory
mem_used_total:            0 
  File "<stdin>", line 1
    print *100/
          ^
SyntaxError: invalid syntax
/usr/libexec/anaconda/zram-stats: line 33: printf: %: invalid number
avg_compr_ratio:           0 
  File "<stdin>", line 1
    print ( - ) * 100 / 						
              ^
SyntaxError: invalid syntax
/usr/libexec/anaconda/zram-stats: line 33: printf: %: invalid number
mem_overhead:              0 

[root@localhost-live ~]# 



[root@localhost-live ~]# dnf provides /usr/libexec/anaconda/zram-stats
Fedora 28 - x86_64 - Test Updates                                                                       3.5 MB/s |  12 MB     00:03    
Fedora 28 - x86_64 - Updates                                                                            1.8 kB/s | 257  B     00:00    
Fedora 28 - x86_64                                                                                      6.1 MB/s |  60 MB     00:09    
Last metadata expiration check: 0:00:00 ago on Wed 28 Mar 2018 05:49:14 PM EDT.
anaconda-core-28.22.2-7.fc28.x86_64 : Core of the Anaconda installer
Repo        : @System
Matched from:
Filename    : /usr/libexec/anaconda/zram-stats

anaconda-core-28.22.2-7.fc28.x86_64 : Core of the Anaconda installer
Repo        : updates-testing
Matched from:
Filename    : /usr/libexec/anaconda/zram-stats

anaconda-core-28.22.2-6.fc28.x86_64 : Core of the Anaconda installer
Repo        : fedora
Matched from:
Filename    : /usr/libexec/anaconda/zram-stats

[root@localhost-live ~]# ls -l /sys/block/zram0/
total 0
-r--r--r--. 1 root root 4096 Mar 28 17:49 alignment_offset
lrwxrwxrwx. 1 root root    0 Mar 28 17:49 bdi -> ../../bdi/251:0
-r--r--r--. 1 root root 4096 Mar 28 17:49 capability
--w-------. 1 root root 4096 Mar 28 17:49 compact
-rw-r--r--. 1 root root 4096 Mar 28 17:49 comp_algorithm
-r--r--r--. 1 root root 4096 Mar 28 17:49 debug_stat
-r--r--r--. 1 root root 4096 Mar 28 17:49 dev
-r--r--r--. 1 root root 4096 Mar 28 17:49 discard_alignment
-rw-r--r--. 1 root root 4096 Mar 28 17:47 disksize
-r--r--r--. 1 root root 4096 Mar 28 17:49 ext_range
-r--r--r--. 1 root root 4096 Mar 28 17:49 hidden
drwxr-xr-x. 2 root root    0 Mar 28 17:49 holders
-r--r--r--. 1 root root 4096 Mar 28 17:49 inflight
-r--r--r--. 1 root root 4096 Mar 28 17:48 initstate
drwxr-xr-x. 2 root root    0 Mar 28 17:49 integrity
-r--r--r--. 1 root root 4096 Mar 28 17:49 io_stat
-rw-r--r--. 1 root root 4096 Mar 28 17:47 max_comp_streams
--w-------. 1 root root 4096 Mar 28 17:49 mem_limit
--w-------. 1 root root 4096 Mar 28 17:49 mem_used_max
-r--r--r--. 1 root root 4096 Mar 28 17:49 mm_stat
drwxr-xr-x. 2 root root    0 Mar 28 17:49 power
drwxr-xr-x. 2 root root    0 Mar 28 17:49 queue
-r--r--r--. 1 root root 4096 Mar 28 17:49 range
-r--r--r--. 1 root root 4096 Mar 28 17:49 removable
--w-------. 1 root root 4096 Mar 28 17:49 reset
-r--r--r--. 1 root root 4096 Mar 28 17:47 ro
-r--r--r--. 1 root root 4096 Mar 28 17:49 size
drwxr-xr-x. 2 root root    0 Mar 28 17:49 slaves
-r--r--r--. 1 root root 4096 Mar 28 17:49 stat
lrwxrwxrwx. 1 root root    0 Mar 28 17:49 subsystem -> ../../../../class/block
drwxr-xr-x. 2 root root    0 Mar 28 17:49 trace
-rw-r--r--. 1 root root 4096 Mar 28 17:49 uevent
[root@localhost-live ~]# grep . /sys/block/zram0/*
/sys/block/zram0/alignment_offset:0
grep: /sys/block/zram0/bdi: Is a directory
/sys/block/zram0/capability:10
grep: /sys/block/zram0/compact: Permission denied
/sys/block/zram0/comp_algorithm:[lzo] lz4 lz4hc 842 
/sys/block/zram0/debug_stat:version: 1
/sys/block/zram0/debug_stat:       0
/sys/block/zram0/dev:251:0
/sys/block/zram0/discard_alignment:0
/sys/block/zram0/disksize:2089226240
/sys/block/zram0/ext_range:1
/sys/block/zram0/hidden:0
grep: /sys/block/zram0/holders: Is a directory
/sys/block/zram0/inflight:       0        0
/sys/block/zram0/initstate:1
grep: /sys/block/zram0/integrity: Is a directory
/sys/block/zram0/io_stat:       0        0        0      145
/sys/block/zram0/max_comp_streams:2
grep: /sys/block/zram0/mem_limit: Permission denied
grep: /sys/block/zram0/mem_used_max: Permission denied
/sys/block/zram0/mm_stat:11563008  3596404  4284416        0  4296704       51        0
grep: /sys/block/zram0/power: Is a directory
grep: /sys/block/zram0/queue: Is a directory
/sys/block/zram0/range:1
/sys/block/zram0/removable:0
grep: /sys/block/zram0/reset: Permission denied
/sys/block/zram0/ro:0
/sys/block/zram0/size:4080520
grep: /sys/block/zram0/slaves: Is a directory
/sys/block/zram0/stat:     461        0     3688        4     2968        0    23744       31        0       35       35
grep: /sys/block/zram0/subsystem: Is a directory
grep: /sys/block/zram0/trace: Is a directory
/sys/block/zram0/uevent:MAJOR=251
/sys/block/zram0/uevent:MINOR=0
/sys/block/zram0/uevent:DEVNAME=zram0
/sys/block/zram0/uevent:DEVTYPE=disk
[root@localhost-live ~]# 



Expected results:


shrug - I'm not sure what this script is used for but I guess there's been changes in the sysfs export compared to what the script expects (?)

Additional info:

Comment 1 Ben Cotton 2019-05-02 21:58:45 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Ben Cotton 2019-05-28 19:48:24 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 3 Martin Kolman 2019-09-18 13:46:15 UTC
> /usr/libexec/anaconda/zram-stats doesn't seem to work, maybe use zramctl
> instead?
Yep, lets do that - the output zramctl provides seems to be as good if not better than the old & now broken script has provided.

So lets scrap the old script and make sure the zramctl tool gets pulled in to the installation environment.

Comment 4 Martin Kolman 2019-09-20 13:43:56 UTC
Anaconda PR removing zram-stats:
https://github.com/rhinstaller/anaconda/pull/2138
Lorax PR for keepin zramctl on boot iso:
https://github.com/weldr/lorax/pull/854

Comment 5 Fedora Update System 2019-09-25 15:57:00 UTC
FEDORA-2019-448da09d7e has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-448da09d7e

Comment 6 Fedora Update System 2019-09-26 02:56:08 UTC
anaconda-31.22.5-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-448da09d7e

Comment 7 Fedora Update System 2019-10-02 00:47:32 UTC
anaconda-31.22.5-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.


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