Skip to content

Commit 66af9a6

Browse files
committed
Do not hand k8s an ssh-backed verifier it must never use
Audited every ssh_obj call on the lblk path. All of them are either behind a k8s branch, inside a docker-only mixin, or pure bookkeeping (notify_outage_started only resets an in-memory clock). One was not: _init_lblk built a RawDeviceVerifier over ssh_obj on both platforms. On k8s it was inert -- _provision_raw replaces it with the pod-backed runner, and _lblk_devices is empty until then, so nothing called it. But an ssh-backed verifier sitting on a k8s object is an invitation for the next change to use it and hang until the ssh timeout, which is exactly how this path produced Exception: All usernames failed for 10.0.0.10. Last error: timed out None on k8s makes the mistake impossible rather than merely unlikely.
1 parent e5c430d commit 66af9a6

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎e2e/e2e_tests/lblk/test_lblk.py‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,14 @@ def _spdk_runner(self):
126126
return self.ssh_obj
127127

128128
def _init_lblk(self):
129-
self._verifier = RawDeviceVerifier(self.ssh_obj, self.logger)
129+
# Docker's verifier reaches a client machine over ssh. K8s has no
130+
# ssh-reachable target at all, so it gets no verifier here --
131+
# _provision_raw builds one over _PodDeviceRunner once the block pod
132+
# exists. Left as None rather than an ssh-backed one that happens to be
133+
# unused: an ssh verifier sitting on a k8s object is an invitation for
134+
# the next change to call it and hang for a timeout.
135+
self._verifier = (None if self.k8s_test
136+
else RawDeviceVerifier(self.ssh_obj, self.logger))
130137
self._lblk_devices = {}
131138
self._lblk_volumes = []
132139
self._k8s_raw_pods = []

0 commit comments

Comments
 (0)