action #45473

[functional][y] Enable Y2DEBUG for all yast module tests

Added by riafarov 5 months ago. Updated 23 days ago.

Status:ResolvedStart date:21/12/2018
Priority:NormalDue date:07/05/2019
Assignee:mloviska% Done:

0%

Category:Enhancement to existing testsEstimated time:3.00 hours
Target version:SUSE QA tests - Milestone 24
Difficulty:
Duration: 98

Description

Motivation

Debug logs help to investigate failures, to increase logging level for the YaST modules, we need setting same env variable as for installer, namely Y2DEBUG=1
This will provide required info for the developers when not able to reproduce an issue.

Acceptance criteria

  1. All YaST modules are started with Y2DEBUG=1 env variable

Suggestions

It's should be possible just to set this variable for the root once, and then it will be inherited. Might need something on top in case of running modules xdg-su.

Documentation

https://en.opensuse.org/openSUSE:YaST_debugging

History

#1 Updated by agraul 5 months ago

  • Subject changed from [funtional][y] Enable Y2DEBUG for all yast module tests to [functional][y] Enable Y2DEBUG for all yast module tests

#2 Updated by agraul 5 months ago

  • Category set to Enhancement to existing tests

#3 Updated by okurz 3 months ago

  • Target version set to Milestone 24

#4 Updated by ybonatakis 3 months ago

  • Assignee set to ybonatakis

#5 Updated by riafarov 2 months ago

  • Due date set to 23/04/2019
  • Assignee deleted (ybonatakis)

Let's unassign as not planned for the current sprint.

#6 Updated by riafarov about 1 month ago

  • Due date changed from 23/04/2019 to 07/05/2019

No capacity

#7 Updated by mloviska about 1 month ago

  • Description updated (diff)

#8 Updated by oorlov about 1 month ago

  • Due date changed from 07/05/2019 to 23/04/2019
  • Status changed from New to Workable
  • Estimated time set to 3.00

#9 Updated by mloviska about 1 month ago

  • Status changed from Workable to In Progress
  • Assignee set to mloviska

#10 Updated by mloviska about 1 month ago

  • Status changed from In Progress to Workable

#11 Updated by riafarov about 1 month ago

  • Due date changed from 23/04/2019 to 07/05/2019
  • Status changed from Workable to In Progress

#12 Updated by mloviska about 1 month ago

for GUI and x11_start_program.

x11_start_program("sh -c 'xdg-su -c \" env -S Y2DEBUG=-1 /sbin/yast2 $module\"; echo \"yast2-$module-status-\$?\" > /dev/$serialdev'", target_match => @tags, match_timeout => $args{match_timeout});

Get PID and check env variables of the process

➜  ~ sudo ps axu | grep  "yast2 lan"
martin   15284  0.0  0.0   7112  3460 ?        S    17:10   0:00 /bin/sh /usr/bin/xdg-su -c env -S Y2DEBUG=-1 yast2 lan                                                                                           
martin   15288  0.6  0.1 338816 34108 ?        Sl   17:10   0:00 /usr/bin/gnomesu -c env -S Y2DEBUG=-1 yast2 lan                                                                                                  
root     15291  0.0  0.0  10896  7532 ?        S    17:10   0:00 /usr/lib/libgnomesu/gnomesu-pam-backend 12 11 root env -S Y2DEBUG=-1 yast2 lan                                                                   
root     15309  0.0  0.0   6980  3600 ?        S    17:10   0:00 /bin/bash /sbin/yast2 lan
martin   15843  0.0  0.0   6196  2176 pts/3    S+   17:11   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn yast2 lan 

➜ ~ sudo ps -p 15309 eww
PID TTY STAT TIME COMMAND
15309 ? S 0:00 /bin/bash /sbin/yast2 lan SHELL=/usr/bin/zsh SESSION_MANAGER=local/eris:@/tmp/.ICE-unix/3095,unix/eris:/tmp/.ICE-unix/3095 COLORTERM=1 XDG_CONFIG_DIRS=/etc/xdg:/etc/xdg QT_SYSTEM_DIR=/usr/share/desktop-data LESS=-M -I -R XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_MENU_PREFIX=xfce- GTK_IM_MODULE=ibus MACHTYPE=x86_64-suse-linux G_BROKEN_FILENAMES=1 HISTSIZE=1000 HOSTNAME=eris FROM_HEADER= MINICOM=-c on GDMFLEXISERVER=/usr/lib/lightdm/gdmflexiserver QT4_IM_MODULE=ibus JAVA_ROOT=/usr/lib64/jvm/jre-1.8.0-openjdk JAVA_HOME=/usr/lib64/jvm/jre-1.8.0-openjdk VDPAU_DRIVER=va_gl AUDIODRIVER=pulseaudio JRE_HOME=/usr/lib64/jvm/jre SSH_AUTH_SOCK=/tmp/ssh-NGctyqpaqIBw/agent.3043 CPU=x86_64 INPUT_METHOD=ibus JAVA_BINDIR=/usr/lib64/jvm/jre-1.8.0-openjdk/bin XMODIFIERS=@im=ibus DESKTOP_SESSION=xfce SSH_AGENT_PID=3089 GTK_MODULES=canberra-gtk-module XDG_SEAT=seat0 PWD=/home/martin QEMU_AUDIO_DRV=pa LOGNAME=root XDG_SESSION_DESKTOP=xfce XDG_SESSION_TYPE=x11 MANPATH=/usr/local/man:/usr/share/man XAUTHORITY=/root/.xauth8EupSG XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/martin XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB XNLSPATH=/usr/share/X11/nls HOME=/root SSH_ASKPASS=/usr/lib/ssh/ssh-askpass LANG=en_US.utf8 XDG_CURRENT_DESKTOP=XFCE PYTHONSTARTUP=/etc/pythonstart OSTYPE=linux XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 QT_IM_SWITCHER=imsw-multi LESS_ADVANCED_PREPROCESSOR=no NNTPSERVER=news GLADE_CATALOG_PATH=: XSESSION_IS_UP=yes LESSCLOSE=lessclose.sh %s %s XDG_SESSION_CLASS=user TERM=xterm G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-15,CP1252 HOST=eris XAUTHLOCALHOSTNAME=eris LESSOPEN=lessopen.sh %s USER=root SDL_AUDIODRIVER=pulse MORE=-sl CSHEDIT=emacs DISPLAY=:0.0 SHLVL=2 WINDOWMANAGER=startxfce4 PAGER=less QT_IM_MODULE=ibus CVS_RSH=ssh XDG_VTNR=7 XDG_SESSION_ID=2 OOO_FORCE_DESKTOP=gnome LC_CTYPE=en_US.UTF-8 GLADE_MODULE_PATH=: PILOTPORT=usb: XDG_RUNTIME_DIR=/run/user/0 GLADE_PIXMAP_PATH=: XCURSOR_THEME=DMZ XDG_DATA_DIRS=/usr/share/xfce:/usr/share:/usr/share CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin GDMSESSION=xfce PROFILEREAD=true MAIL=/var/spool/mail/martin HOSTTYPE=x86_64 LESSKEY=/etc/lesskey.bin OLDPWD=/home/martin _=/usr/bin/gnomesu ICEAUTHORITY=/root/.ICEauthority Y2DEBUG=-1

#14 Updated by mloviska 26 days ago

  • Status changed from In Progress to Feedback

#15 Updated by JERiveraMoya 24 days ago

  • Status changed from Feedback to In Progress

#16 Updated by mloviska 24 days ago

  • o3 VRs:

opensuse-Tumbleweed-DVD-x86_64-Build20190430-yast2_gui@64bit

y2_logs after

2019-05-02 16:37:32 <0> susetest(4783) [agent-system] ../../libscr/src/include/scr/Y2AgentComponent.h(evaluate):142 Execute, arg size is 2
2019-05-02 16:37:32 <0> susetest(4783) [agent-system] SystemAgent.cc(Execute):918 Execute (.bash_output)
2019-05-02 16:37:32 <0> susetest(4783) [bash] ShellCommand.cc(shellcommand):31 shellcommand start
2019-05-02 16:37:32 <0> susetest(4783) [bash] ShellCommand.cc(shellcommand):199 shellcommand end
2019-05-02 16:37:32 <1> susetest(4783) [Ruby] clients/firewall.rb:73 ret=next
2019-05-02 16:37:32 <1> susetest(4783) [Ruby] clients/firewall.rb:75 Firewall client finished
2019-05-02 16:37:32 <1> susetest(4783) [Ruby] clients/firewall.rb:76 ----------------------------------------
2019-05-02 16:37:32 <1> susetest(4783) [Interpreter] bin/y2start:62 Called YaST client returned.
2019-05-02 16:37:32 <0> susetest(4783) [Interpreter] bin/y2start:62 Called YaST client returned: `next

y2logs before

2019-04-29 15:39:57 <1> susetest(4781) [Ruby] yast2/systemctl.rb:34 systemctl reload firewalld.service 
2019-04-29 15:39:57 <1> susetest(4781) [Ruby] yast2/systemctl.rb:34 systemctl show firewalld.service  --property=Id  --property=MainPID  --property=Description  --property=LoadState  --property=ActiveState  --property=SubState  --property=UnitFileState  --property=FragmentPath  --property=CanReload 
2019-04-29 15:39:57 <1> susetest(4781) [Ruby] yast2/systemctl.rb:34 systemctl show firewalld.service  --property=Id  --property=MainPID  --property=Description  --property=LoadState  --property=ActiveState  --property=SubState  --property=UnitFileState  --property=FragmentPath  --property=CanReload 
2019-04-29 15:39:57 <1> susetest(4781) [Ruby] clients/firewall.rb:73 ret=next
2019-04-29 15:39:57 <1> susetest(4781) [Ruby] clients/firewall.rb:75 Firewall client finished
2019-04-29 15:39:57 <1> susetest(4781) [Ruby] clients/firewall.rb:76 ----------------------------------------
2019-04-29 15:39:57 <1> susetest(4781) [Interpreter] bin/y2start:62 Called YaST client returned.
2019-04-29 15:39:57 <1> susetest(4781) [qt-ui] YQUI.cc(uiThreadDestructor):332 Destroying UI thread

#18 Updated by JERiveraMoya 23 days ago

  • Status changed from Feedback to Resolved

Nice, I checked one of the VR and 167 lines more of info now with your changes. Let's resolve it.

#19 Updated by mloviska 23 days ago

JERiveraMoya wrote:

Nice, I checked one of the VR and 167 lines more of info now with your changes. Let's resolve it.

thanks!

Also available in: Atom PDF