Skip to content

Conversation

@darkdoc
Copy link
Contributor

@darkdoc darkdoc commented Nov 21, 2025

No description provided.

mbaldessari and others added 2 commits November 21, 2025 11:20
This avoids network activity when we check for the oc client

$ strace -f -e trace=network -y oc version 2>&1 | grep -e socket -e connect
[pid 31622] socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4<socket:[157959]>
[pid 31622] connect(4<socket:[157959]>, {sa_family=AF_UNIX, sun_path="/run/systemd/resolve/io.systemd.Resolve"}, 42) = -1 ENOENT (No such file or directory)
[pid 31622] socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 4<socket:[157960]>
[pid 31622] setsockopt(4<socket:[157960]>, SOL_IP, IP_RECVERR, [1], 4) = 0
[pid 31622] connect(4<socket:[157960]>, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("172.16.15.254")}, 16) = 0
[pid 31622] sendmmsg(4<socket:[157960]>, [{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="Ol\1\0\0\1\0\0\0\0\0\0\3api\7mcg-hub\3aws\21val"..., iov_len=54}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=54}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\253o\1\0\0\1\0\0\0\0\0\0\3api\7mcg-hub\3aws\21val"..., iov_len=54}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=54}], 2, MSG_NOSIGNAL) = 2
[pid 31622] recvfrom(4<socket:[157960]>, "\253o\201\200\0\1\0\0\0\1\0\0\3api\7mcg-hub\3aws\21val"..., 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("172.16.15.254")}, [28 => 16]) = 163
[pid 31622] recvfrom(4<socket:[157960]>, "Ol\201\200\0\1\0\1\0\0\0\0\3api\7mcg-hub\3aws\21val"..., 65536, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("172.16.15.254")}, [28 => 16]) = 70
[pid 31622] socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 4<socket:[150273]>
[pid 31622] connect(4<socket:[150273]>, {sa_family=AF_INET, sin_port=htons(6443), sin_addr=inet_addr("35.181.252.216")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 31624] getsockopt(4<socket:[150273]>, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
[pid 31624] getpeername(4<socket:[150273]>, {sa_family=AF_INET, sin_port=htons(6443), sin_addr=inet_addr("35.181.252.216")}, [112 => 16]) = 0
[pid 31624] getsockname(4<socket:[150273]>, {sa_family=AF_INET, sin_port=htons(52090), sin_addr=inet_addr("172.16.0.4")}, [112 => 16]) = 0
[pid 31624] setsockopt(4<socket:[150273]>, SOL_TCP, TCP_NODELAY, [1], 4) = 0
[pid 31624] setsockopt(4<socket:[150273]>, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
[pid 31624] setsockopt(4<socket:[150273]>, SOL_TCP, TCP_KEEPIDLE, [30], 4) = 0
[pid 31624] setsockopt(4<socket:[150273]>, SOL_TCP, TCP_KEEPINTVL, [15], 4) = 0
[pid 31624] setsockopt(4<socket:[150273]>, SOL_TCP, TCP_KEEPCNT, [9], 4) = 0

$ strace -f -e trace=network -y oc version --client=true 2>&1 | grep -e socket -e connect
$
Do not poke the network when checking for the oc cli
@day0hero
Copy link
Contributor

/lgtm

@day0hero day0hero merged commit 34ab9c5 into v1 Nov 21, 2025
14 checks passed
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.

4 participants