Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: (minor) "the input device is not a TTY" redis-cli #38

Open
wdoekes opened this issue Nov 16, 2024 · 0 comments
Open

runtime: (minor) "the input device is not a TTY" redis-cli #38

wdoekes opened this issue Nov 16, 2024 · 0 comments
Labels
purely-informational This contains logs but not an issue per se

Comments

@wdoekes
Copy link
Member

wdoekes commented Nov 16, 2024

Description

root@leaf1:~# redis-cli -n 4 --raw keys "BGP_NEIGHBOR|*" | head -n3
BGP_NEIGHBOR|default|10.0.0.47
BGP_NEIGHBOR|10.0.0.75
BGP_NEIGHBOR|10.0.0.61
root@leaf1:~# redis-cli -n 4 --raw keys "BGP_NEIGHBOR|*" | xargs redis-cli -n 4 del
the input device is not a TTY
root@leaf1:~# redis-cli -n 4 --raw keys "BGP_NEIGHBOR|*" | xargs redis-cli -n 4 del | cat
116

Caused by:

  • the -t flag even though stdin is not a tty
root@leaf1:~# docker exec -it database cat < /dev/null
the input device is not a TTY

cat $(which redis-cli)

#!/bin/bash

DOCKER_EXEC_FLAGS="i"

# Determine whether stdout is on a terminal
if [ -t 1 ] ; then
    DOCKER_EXEC_FLAGS+="t"
fi

docker exec -$DOCKER_EXEC_FLAGS database redis-cli "$@"

Which build are we running (if any)

SONiC Software Version: SONiC.Edgecore-SONiC_20241018_041000_ec202211_ecsonic_431
SONiC OS Version: 11
Distribution: Debian 11.11
Kernel: 5.10.0-18-2-amd64
Build commit: 885c31394
Build date: Fri Oct 18 10:42:28 UTC 2024
Built by: ubuntu@ip-10-5-1-163

Platform: x86_64-accton_as7326_56x-r0
HwSKU: Accton-AS7326-56X
ASIC: broadcom
ASIC Count: 1

Upstream issues/PRs

@wdoekes wdoekes added the purely-informational This contains logs but not an issue per se label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
purely-informational This contains logs but not an issue per se
Projects
None yet
Development

No branches or pull requests

1 participant