Bug 1195584 - Yast GUI tools not starting due to /var/log/YaST2/y2log not being initialized
Yast GUI tools not starting due to /var/log/YaST2/y2log not being initialized
Status: CONFIRMED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2
Current
x86-64 openSUSE Tumbleweed
: P5 - None : Normal (vote)
: ---
Assigned To: YaST Team
Jiri Srain
https://trello.com/c/bNmUYhEu
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-02-05 12:15 UTC by Mark Stutter
Modified: 2022-02-19 10:52 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Stutter 2022-02-05 12:15:02 UTC
Hello guys :-)

On my system the GUI version of the Yast apps didn't start.
The initial Yast window opens fine, but when you click any of the tools (like software management, partitioner, etc.) you see the progress wheel spinning for a few seconds and then just die off.

The terminal version of yast worked perfectly fine and then I realized that after I had executed cli-yast just once the GUI version started to work.

So I've pinned down the issue and found that it was caused by me mounting /var/log to a ram-drive. It seems that yast needs the file /var/log/YaST2/y2log in order to work. The folder /var/log/YaST2 and y2log in it are generated when cli-yast is executed and subsequently GUI yast works as well.

I'm aware that this is perhaps a niche issue for my particular configuration, but then it had worked perfectly fine for me in the past.

It could also be an easy fix I believe by just making sure the log folder gets generated if it doesn't exist at start-time ... pretty much just copying some code from cli-yast ...

Well, thanks for considering anyways and all the best.

Keep up the good work :-)
Comment 1 Ladislav Slezák 2022-02-08 15:14:52 UTC
That is strange, the location of /var/log/YaST2 should not matter, RAM drive should be fine (you just loose the files after reboot). And the directory is automatically created when it does not exist.

Please try running some YaST application in a terminal as the root "user" (e.g. "yast2 repositories") and attach the printed messages here.
Comment 2 beginner 2022-02-09 08:22:29 UTC
yast2 repositories
terminate called after throwing an instance of 'YUIPluginException'
  what():  Couldn't load plug-in qt
/sbin/yast2: Zeile 473:  4219 Abgebrochen             (Speicherabzug geschrieben) $ybindir/y2start $module "$@" "$SELECTED_GUI" $Y2_GEOMETRY $Y2UI_ARGS
Comment 3 Mark Stutter 2022-02-09 08:45:03 UTC
(In reply to Ladislav Slezák from comment #1)
> That is strange, the location of /var/log/YaST2 should not matter, RAM drive
> should be fine (you just loose the files after reboot). And the directory is
> automatically created when it does not exist.
> 
> Please try running some YaST application in a terminal as the root "user"
> (e.g. "yast2 repositories") and attach the printed messages here.

Yeah, I thought about that first, but if you start yast at the command-line it starts the CLI version of yast which doesn't have the problem, so you don't get error messages related to the GUI version obviously.
Comment 4 Mark Stutter 2022-02-09 08:57:10 UTC
You can easily reproduce the error by adding the line:
tmpfs /var/log tmpfs defaults,mode=1777,noatime 0 0
to your /etc/fstab

The error is strictly dependent on the forlder /var/log/YaST2 existing or not, it doesn't have to contain any files or folders actually.
I ruled that out by manually deleting first the contents and executing cli-yast (works fine) and then deleting the folder (doesn't work any more).

Perhaps it is some permissions issue the gui-yast doesn't have the necessary permnissions to create the folder at execution time, but cli-yast does have them for some reason?
Comment 5 Mark Stutter 2022-02-09 08:59:50 UTC
You can easily reproduce the error by adding the line:
tmpfs /var/log tmpfs defaults,mode=1777,noatime 0 0
to your /etc/fstab

The error is strictly dependent on the folder /var/log/YaST2 existing or not, it doesn't have to contain any files or folders actually.
I ruled that out by manually deleting first the contents and executing cli-yast (works fine) and then deleting the folder (doesn't work any more).

Perhaps it is some permissions issue caused by gui-yast not having the necessary permnissions to create the folder at execution time, but cli-yast having it for some reason?
Comment 6 Mark Stutter 2022-02-09 09:14:52 UTC
(In reply to Mark Stutter from comment #5)
> You can easily reproduce the error by adding the line:
> tmpfs /var/log tmpfs defaults,mode=1777,noatime 0 0
> to your /etc/fstab
> 
> The error is strictly dependent on the folder /var/log/YaST2 existing or
> not, it doesn't have to contain any files or folders actually.
> I ruled that out by manually deleting first the contents and executing
> cli-yast (works fine) and then deleting the folder (doesn't work any more).
> 
> Perhaps it is some permissions issue caused by gui-yast not having the
> necessary permissions to create the folder at execution time, but cli-yast
> having it for some reason?

I meant to say:

The error is strictly dependent on the folder /var/log/YaST2 existing or
not, it doesn't have to contain any files or folders actually.
I ruled that out by manually deleting first the contents and executing
GUI-yast (works fine) and then deleting the folder (doesn't work any more).


I had a long coding night yesterday, sorry for the mess ;-)
Comment 7 Ancor Gonzalez Sosa 2022-02-14 15:45:19 UTC
I tried to reproduce this myself. The problem is not in the YaST modules being executed, but in the way yast-control-center executes them.

Test 1:

a. Delete /var/log/YaST
b. Execute "yast2 repositories"
Result. Works perfectly fine, YaST runs in graphical mode and the directory is created.

Test 2:
a. Delete /var/log/YaST
b. Execute "yast2"
c. At the graphical YaST Control Center, select the repositories module
Result. The following error is printed in the terminal:

> Run command: /usr/bin/nohup /usr/sbin/yast2 repositories > /var/log/YaST2/nohup.out 2>&1 &
> sh: line 1: /var/log/YaST2/nohup.out: No such file or directory

So this looks like a consequence of this relatively new change
https://github.com/yast/yast-control-center/pull/53
Comment 8 Lukas Ocilka 2022-02-15 11:14:38 UTC
Similar issue can be easily reproduced with command like this:

  ls > /tmp/nonexistent/xyz/oops
  bash: /tmp/nonexistent/xyz/oops: No such file or directory

while

  mkdir -p /tmp/nonexistent/xyz/; ls > /tmp/nonexistent/xyz/sorry_error

succeds
Comment 9 Mark Stutter 2022-02-19 10:52:07 UTC
(In reply to Ancor Gonzalez Sosa from comment #7)
> I tried to reproduce this myself. The problem is not in the YaST modules
> being executed, but in the way yast-control-center executes them.
> 
> Test 1:
> 
> a. Delete /var/log/YaST
> b. Execute "yast2 repositories"
> Result. Works perfectly fine, YaST runs in graphical mode and the directory
> is created.
> 
> Test 2:
> a. Delete /var/log/YaST
> b. Execute "yast2"
> c. At the graphical YaST Control Center, select the repositories module
> Result. The following error is printed in the terminal:
> 
> > Run command: /usr/bin/nohup /usr/sbin/yast2 repositories > /var/log/YaST2/nohup.out 2>&1 &
> > sh: line 1: /var/log/YaST2/nohup.out: No such file or directory
> 
> So this looks like a consequence of this relatively new change
> https://github.com/yast/yast-control-center/pull/53

Nice! ... that seems to be causing the issue indeed.

Creating the directory at execution time of the yast control-center would solve the issue then.

On a side-note (if you have the time):
How did you get to start the graphical version of yast control center from the command line? When I execute yast2 from my terminal emulator (konsole on plasma desktop) it starts the terminal version within the terminal.