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

sosreport: Port to fsinfo #21059

Open martinpitt opened 1 month ago

martinpitt commented 1 month ago

fswatch1 is being deprecated. This also gets rid of the ugly find | xargs stat shellery, as fsinfo gets us the modification time.

fsinfo also gives us an initial 'change' event, so we don't need the "initial" and "on change" handler duplication.


This by and large works fine, but there is something really concerning: Instantiating an FsInfoClient breaks an existing fswatch1 channel (which I could still understand, somehow interfering inotify's -- even though it should work). But it also breaks the

superuser.addEventListener("changed", restart);

this never gets called any more. The D-Bus notify signal itself works, but cockpit.js then messes it up. This is somehow related to the new Transport and Channel classes.

Debugging note for myself:

grep -lrw preload /usr/share/cockpit | xargs sed -i '/\bpreload\b/d'