|
Bugzilla – Full Text Bug Listing |
| Summary: | YaST2 Services Manager on console displays false row to be changed | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Distribution | Reporter: | Mészáros Gyula <meszaros.gyula> |
| Component: | YaST2 | Assignee: | Martin Vidner <mvidner> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P3 - Medium | CC: | igonzalezsosa, jlopez, lubos.kocman, meszaros.gyula, mvidner, walter.laub |
| Version: | Leap 15.2 | ||
| Target Milestone: | --- | ||
| Hardware: | x86-64 | ||
| OS: | Other | ||
| URL: | https://trello.com/c/FHZyHFj5 | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
YaST2 Services Manager on console displays false row to be changed
yast2 debug log table-cell.rb |
||
I was able to reproduce the problem using a QEMU virtual machine. However, if I login through SSH into the system, it works just fine. It works from graphical interface, but does not work from console and also not from SSH for me. (Before the tests I have made a system update.) Thanks for the report! Please reproduce the bug with Y2DEBUG: https://en.opensuse.org/openSUSE:Report_a_YaST_bug#The_y2logs_don.27t_seem_to_show_my_problem._Can_that_logging_be_made_any_more_verbose.3F and attach the logs. The logs will likely reveal a problem with the UI. Created attachment 832454 [details]
yast2 debug log
(In reply to Imobach Gonzalez Sosa from comment #1) > I was able to reproduce the problem using a QEMU virtual machine. However, > if I login through SSH into the system, it works just fine. I wasn't able to reproduce it @Martin: debug logs were provided. Could you pls check whether you can find a UI issue? Thanks Martin, this is waiting for input from your side. Please check. I have debugged it, and it seems to be a problem with libyui and n-curses. [327, 336] in /home/ivan/projects/yast/repos/services-manager/src/lib/services-manager/widgets/services_table.rb 327: # Updates the value for the start_mode column of a service 328: # 329: # @param service_name [String] 330: def refresh_start_mode_value(service_name) 331: byebug => 332: UI.ChangeWidget(id, Cell(service_name, 1), start_mode_value(service_name)) 333: end (byebug) id #<Yast::Term:0x0000563a60d24718 @value=:id, @params=[:services_table]> (byebug) Cell(service_name, 1) #<Yast::Term:0x0000563a60d36508 @value=:Cell, @params=["apparmor", 1]> In both cases (graphical interface and text mode) the UI.ChangeWidget method is call with the same values, but the result is different. In graphical mode, the current row is updated. In text mode, the sixth row before is modified. Tracking in trello. Created attachment 840354 [details]
table-cell.rb
I have reproduced and minimized the problem. Attaching a reproducing script.
I haven't traced down the exact cause but the bug is linked to table sorting.
A libyui table is by default sorted by its first column.
In TUI (libyui-ncurses) you can also press Ctrl-O to change the sorting column
(re*o*rder).
With sorting disabled, there is no bug: selecting an item uppercases its value:
/usr/sbin/yast ./table-cell.rb no-sort
With sorting enabled, the uppercased value appears elsewhere (but the internal
values are correct, as shown in y2log)
/usr/sbin/yast ./table-cell.rb
In the service manager the bug is only apparent when you have services starting with a capital letter, like NetworkManager. If you only have lowercase services, like in a JEOS, the bug is hidden. Copying an explanation from https://github.com/yast/yast-services-manager/pull/206 , which is a workaround. Cause: There is a long-standing bug in libyui-ncurses that is mostly hidden by circumstances. This commit does not fix that bug, only works around it. Services Manager does something other YaST modules don't do: it changes table contents cell by cell instead of wholesale. The ncurses (TUI) version of the table widget has a bug where this individual cell change ignores table sorting that may be set up. The bug seems to be old but it was masked by sorting being initially disabled for all tables. You had to press Ctrl-O to reorder the table. Since SLE/Leap 15.2 tables are initially sorted so the bug triggers. The workaround is to add the :keepSorting option which disables both the initial sorting and the user-triggered one. Another factor masking the bug is the fact that application code, aware that tables will not sort, was sorting the items before inserting them in tables. So in many cases the application order and the table order are the same and the bug is hidden. But if there are items in lowercase as well as Uppercase the two sort algorithms disagree and the bug becomes apparent. SP2: - Git: https://github.com/yast/yast-services-manager/pull/206 - RPM: yast2-services-manager-4.2.7 - IBS: https://build.suse.de/request/show/224203 master: - Git: https://github.com/yast/yast-services-manager/pull/207 - RPM: yast2-services-manager-4.3.3 - OBS: https://build.opensuse.org/request/show/825927 A proper fix is still Work In Progress: - https://github.com/libyui/libyui-ncurses/pull/98 (documentation only so far) The SP2/Leap 15.2 fix is a workaround by disabling re-sorting the table contents. For master I made a better fix in libyui-ncurses so the yast2-services-manager workaround will be reverted there: l-n: - Git: https://github.com/libyui/libyui-ncurses/pull/100 - RPM: libyui-ncurses13-2.56.2 - OBS: https://build.opensuse.org/request/show/829931 y-s-m: - Git: https://github.com/yast/yast-services-manager/pull/208 - RPM: yast2-services-manager-4.3.5 - OBS: (pending, blocked by an unrelated build glitch) yast2-services-manager: - OBS: https://build.opensuse.org/request/show/830189 SUSE-RU-2020:2589-1: An update that has three recommended fixes can now be installed. Category: recommended (moderate) Bug References: 1165388,1173408,1174615 CVE References: JIRA References: Sources used: SUSE Linux Enterprise Module for Basesystem 15-SP2 (src): yast2-services-manager-4.2.7-3.3.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination. openSUSE-RU-2020:1460-1: An update that has three recommended fixes can now be installed. Category: recommended (moderate) Bug References: 1165388,1173408,1174615 CVE References: JIRA References: Sources used: openSUSE Leap 15.2 (src): yast2-services-manager-4.2.7-lp152.2.3.1 *** Bug 1185025 has been marked as a duplicate of this bug. *** |
Created attachment 831656 [details] YaST2 Services Manager on console displays false row to be changed In console start YaST2, and enter System / Services Manager. Change e.g. Start Mode of a row, e.g. firebird from On Boot to Manually. YaST2 mark the incorrect row (6 above, the dracut-pre-trigger) to be changed. However, when you press Apply you can see that YaST2 really changes the row you have selected (firebird). So the operation is performed well, but the display is frightening. It works well in 15.1.