Bug 1203653

Summary: cockpit-tukit does not work in web interface
Product: [SUSE ALP - SUSE Adaptable Linux Platform] ALP Reporter: Rainer König <rainer.konig>
Component: CockpitAssignee: YaST Team <yast-internal>
Status: IN_PROGRESS --- QA Contact:
Severity: Normal    
Priority: P5 - None CC: jtomasiak, rainer.konig
Version: unspecifiedFlags: jtomasiak: needinfo? (rainer.konig)
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://trello.com/c/3qI56oaX
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: cockpit-tukit screenshot

Description Rainer König 2022-09-22 09:36:17 UTC
Installed ALP-VM.x86_64-0.0.1-kvm-Build13.5.qcow2 and then
- cockpit-ws
- cockpit-tukit

When connecting to the cockpit web-UI there is "Transactional Update" listed under Tools/Applications, but when I click on the link then localhost:9090/tukit will result in a "Not found" message.
Comment 1 Jacek Tomasiak 2022-10-27 10:53:09 UTC
Created attachment 862493 [details]
cockpit-tukit screenshot
Comment 2 Jacek Tomasiak 2022-10-27 10:53:58 UTC
I'm sorry but I can't reproduce this with current build (ALP-VM.x86_64-0.0.1-kvm-Build21.1.qcow2).

My steps:
- download the image
- create basic VM using that
- go through the first-run wizard
- call `transactional-update pkg install cockpit-ws cockpit-tukit` (I had to agree to downgrade some packages but this might be temporary)
- reboot
- login as root to https://<my-test-machine>:9090
- "Software Updates" item points to https://<my-test-machine>:9090/updates and works as expected (see attached screenshot).

I have no idea why you see "Transactional Update" under Tools/Applications and why the link is wrong there.
Comment 3 Jacek Tomasiak 2022-10-27 12:31:45 UTC
Can you reproduce it with latest image?
If it still happens, could you provide some more details on how you set this up?
Comment 4 Rainer König 2022-10-27 18:14:34 UTC
Tried now with ALP-VM.x86_64-0.0.1-kvm-Build21.1.qcow2 and problem is still there.

Steps to setup:
- Downlaod qcow-image
- transfer it to the virtpool for KVM
- start Vitrual machine manager
- setup new machine
- select the ALP image
- Memory 2048 MB, 4 CPU cores
- Start it
- Log in as root
- transactional-update pkg-install cockpit-ws cockpit-tukit cockpit-packagekit 
  (Note cockpit-packagekit seems to be needed to show the applications menu 
  in cockpit)

At this point I get a notice that some dependencies could not be resoved. So Cancel.

- zypper lr and we see that repo 2 is disabled
- zypper mr --enable 2
- transactional-update pkg-isntall cockpit-ws cockpit-tukit
- reboot
- login as root
- systemctl enable --now cockpit.socket
- open a web browser and go to <alp_ip_address>:9090
- login as root in the web interface
- click on "Applications" in the left navigation bar.

Now you should see podman and transactional update.

Clicking on podman takes you to podman as expected.

Clicking on Transactional Update brings only "Not Found". 

App info:

localhost:~ # rpm -qi cockpit-tukit
Name        : cockpit-tukit
Version     : 0.0.3~git28.b446f50
Release     : 3.4
Architecture: noarch
Install Date: Thu Oct 27 19:45:46 2022
Group       : Unspecified
Size        : 274129
License     : LGPL-2.1-or-later
Signature   : RSA/SHA256, Sun Oct 16 09:06:42 2022, Key ID fd9b7d2aeeaf3498
Source RPM  : cockpit-tukit-0.0.3~git28.b446f50-3.4.src.rpm
Build Date  : Sun Oct 16 09:04:15 2022
Build Host  : obs-arm-11
Vendor      : obs://build.opensuse.org/SUSE:ALP
URL         : https://github.com/openSUSE/cockpit-tukit
Summary     : Cockpit module for Transactional Update
Description :
Cockpit module for Transactional Update
Distribution: SUSE:ALP

localhost:~ # rpm -ql cockpit-tukit

Looking at the po.<language>.js.gz files the text seems to match perfectly what I see under "Software Updates". So now I wonder if the bug is only that clicking on "Transactional Updates" in the "Applications Menu" doesn't take me to "Software Updates" but ends up in "Not Found". (desperately looking for documentaton so that I understand what should happen, at the moment I'm clicking around and look what happens).
Comment 5 Jacek Tomasiak 2022-10-27 20:20:50 UTC
Ah, this clarifies a lot!

First of all, you should not install cockpit-packagekit as it's mutually exclusive with cockpit-tukit (maybe some Conflicts should be added to the spec for that). They both use the same /updates URL path and cockpit-packagekit doesn't know how to handle transactional-update.

Second, you're right that "Applications" menu comes as part of cockpit-packagekit. That's why I've never seen this before (see first point).

Third, this small change: https://github.com/openSUSE/cockpit-tukit/pull/18 should solve the problem if at some point in the future, cockpit-packagekit will be allowed to be used together with cockpit-tukit (which is unlikely in current structure, see first point).