Skip to content

chore(e2e): prevent 'unable to use a TTY' message#2274

Merged
diafour merged 1 commit into
mainfrom
chore/e2e/fix-error-message-unable-to-use-a-tty
Apr 24, 2026
Merged

chore(e2e): prevent 'unable to use a TTY' message#2274
diafour merged 1 commit into
mainfrom
chore/e2e/fix-error-message-unable-to-use-a-tty

Conversation

@diafour
Copy link
Copy Markdown
Member

@diafour diafour commented Apr 24, 2026

Description

No need to enable tty and input when executing vlctl.

See also #1967

Why do we need it, and what problem does it solve?

Error message is confusing while dumping Pod info on test fail:

STEP: Checking initial CPU configuration @ 04/24/26 10:45:39.046
  STEP: Applying CPU core changes @ 04/24/26 10:45:41.704
  [FAILED] in [It] - /home/runner/work/virtualization/virtualization/test/e2e/vm/hotplug_cpu.go:87 @ 04/24/26 10:45:42.312
  STEP: Failed: save resource dump @ 04/24/26 10:45:42.312
  Failed to get pod guest info:
  PodName: d8v-vm-vm-1-3-w24z6
  Error: Unable to use a TTY - input is not a terminal or the right kind of file
  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  Error: failed to create client: context deadline exceeded
  command terminated with exit code 1
  STEP: Cleanup: process deferred deletions @ 04/24/26 10:46:10.139
  STEP: Cleanup: delete namespace @ 04/24/26 10:46:24.818
• [FAILED] [142.693 seconds]

"Unable to use a TTY" is not a relevant error: vlctl guest info not requires tty and input:

[virtlab] root@virtlab-mi-0 ~/vm-alpine # echo "QWE" | k -n vm exec -ti d8v-vm-vm-alpine-uefi-gh4ld -- vlctl guest info
Unable to use a TTY - input is not a terminal or the right kind of file
^^^^^^^^^^^^^^^^^^^
<VirtualMachineInstanceGuestAgentInfo>
  <Kind></Kind>
  <APIVersion></APIVersion>
  <GAVersion>9.1.2</GAVersion>
  <SupportedCommands>
    <Name>guest-network-get-route</Name>
    <Enabled>true</Enabled>
...

[virtlab] root@virtlab-mi-0 ~/vm-alpine # k -n vm exec d8v-vm-vm-alpine-uefi-gh4ld -- vlctl guest info
<VirtualMachineInstanceGuestAgentInfo>
  <Kind></Kind>
  <APIVersion></APIVersion>
  <GAVersion>9.1.2</GAVersion>
  <SupportedCommands>
...

What is the expected result?

No errors when dumping Pod info.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

@diafour diafour added this to the v1.9.0 milestone Apr 24, 2026
@diafour diafour self-assigned this Apr 24, 2026
@diafour diafour requested a review from Isteb4k as a code owner April 24, 2026 11:39
No need to enable tty and input when executing vlctl.

See also #1967

Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
@diafour diafour force-pushed the chore/e2e/fix-error-message-unable-to-use-a-tty branch from fd02b71 to b1f43b5 Compare April 24, 2026 11:39
@diafour diafour merged commit 5d85b47 into main Apr 24, 2026
27 of 28 checks passed
@diafour diafour deleted the chore/e2e/fix-error-message-unable-to-use-a-tty branch April 24, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants