cockpit-project / cockpit

Cockpit is a web-based graphical interface for servers.
http://www.cockpit-project.org/
GNU Lesser General Public License v2.1
11.2k stars 1.11k forks source link

users: Support for watching lastlog2 and wtpmdb on overview page #20472

Closed Lunarequest closed 5 months ago

Lunarequest commented 5 months ago

This follows up on the lastlog2 pr's to implement support for lastlog2. Lastlog2 slightly differs in behaviour from lastlog. Lastlog2 only prints user's who have already had entries in the lastlog2 database. Not having an entry is already treated as never logged in which matches the current behaviour

mvollmer commented 5 months ago

The subject of the commit should be more specific and talk about lastlog2, "users: Support for watching lastlog2 on overview page".

mvollmer commented 5 months ago

opensuse tests fail to build their rpm:

+ %tox
DEBUG: /var/tmp/rpm-tmp.UMP3Av: line 35: fg: no job control

The %tox macro probably doesn't exist on opensuse and then the shell tries to interpret "%tox" as a command... welcome to Unix.

Lunarequest commented 5 months ago

opensuse tests fail to build their rpm:

+ %tox
DEBUG: /var/tmp/rpm-tmp.UMP3Av: line 35: fg: no job control

The %tox macro probably doesn't exist on opensuse and then the shell tries to interpret "%tox" as a command... welcome to Unix.

yes, we do not have the tox macro. A fix will be submitted upstream soon

mvollmer commented 5 months ago

yes, we do not have the tox macro. A fix will be submitted upstream soon

Thanks!

Nykseli commented 5 months ago

Hi! I'm having issues seeing the inotify event of /var/lib/lastlog/lastlog2.db when the user logs out and the user list doesn't get updated. Using /var/lib/wtmpdb/wtmp.db seems to be more reliable. This also applies to https://github.com/cockpit-project/cockpit/blob/main/pkg/users/account-details.js#L107

Credit goes to @SludgeGirl for figuring this out!

mvollmer commented 5 months ago

I'm having issues seeing the inotify event of /var/lib/lastlog/lastlog2.db when the user logs out and the user list doesn't get updated.

Yeah, I think there is no way aroung getting our integration tests to run on OpenSUSE. Right now I am happy to merge things that don't break the rest of our platforms, but whether the new code actually works as expected on OpenSUSE... the tests would help a lot to gain confidence in that. So let's prioritize getting them running, I'd say.

mvollmer commented 5 months ago

Thanks!