Skip to content

Commit

Permalink
pybridge: Fix cockpit_Machines directory lookup
Browse files Browse the repository at this point in the history
lookup_config() must be called with a relative path, as otherwise
joining some "/etc/.." prefix to the given value always results in the
value itself, due to how path joining works. That led to trying to write
the config into the nonexisting /machines.d/ directory, breaking a lot
of TestMultiMachine tests on CoreOS with the Python bridge.
  • Loading branch information
martinpitt committed Jun 28, 2023
1 parent e787723 commit 0ffd695
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cockpit/internal_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def do_identity_changed(self, fd: Optional[int], errno: Optional[int]) -> None:
self.notify()

def __init__(self):
self.path = config.lookup_config('/machines.d')
self.path = config.lookup_config('machines.d')
self.loop = asyncio.get_running_loop()

# ignore the first callback
Expand Down

0 comments on commit 0ffd695

Please sign in to comment.