Skip to content

Commit

Permalink
Use rpm-ostree's RegisterClient() method for stopping suicide
Browse files Browse the repository at this point in the history
This is a better workaroud for
https://issues.redhat.com/browse/RHEL-49603
than the hack commit e20543c. Revert the latter.
  • Loading branch information
martinpitt committed Aug 27, 2024
1 parent 8063787 commit 1a17c39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ class RPMOSTreeDBusClient {
this.sysroot.addEventListener("changed", this.on_sysroot_changed);
this.sysroot.wait(() => {
if (this.client) {
/* HACK: by default, rpm-ostreed's IdleTimeout is way too aggressive and broken
* Tell it to not do that */
this.sysroot.RegisterClient({ id: cockpit.variant("s", "cockpit-ostree") })
.catch(ex => console.error("Failed to register client:", JSON.stringify(ex)));

this.os_proxies = this.client.proxies(OS, PATH);
this.os_proxies_added = (event, proxy) => {
if (proxy.Name)
Expand Down
5 changes: 0 additions & 5 deletions test/check-ostree
Original file line number Diff line number Diff line change
Expand Up @@ -878,11 +878,6 @@ class OstreeOCICase(testlib.MachineCase):
if m.image.endswith("-bootc"):
# this works with rpm-ostree as well, but let's use the future designated CLI
m.execute(f"bootc switch localhost:5000/bootc:{new_branch}")

# HACK: rpm-ostreed hard-timeouts in a crash-like manner after a minute, with no
# obvious way to keep it alive; https://issues.redhat.com/browse/RHEL-49603
b.reload()
b.enter_page("/updates")
else:
m.execute(f"rpm-ostree rebase {new_repo_branch}")

Expand Down

0 comments on commit 1a17c39

Please sign in to comment.