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

[release-1.22] Setting CONTAINERD_NO_PROXY does not work #5708

Closed
brandond opened this issue Jun 14, 2022 · 1 comment
Closed

[release-1.22] Setting CONTAINERD_NO_PROXY does not work #5708

brandond opened this issue Jun 14, 2022 · 1 comment

Comments

@brandond
Copy link
Contributor

Backport to branch release-1.22:

@VestigeJ
Copy link

##Environment Details

Infrastructure

  • Cloud
  • Hosted

Node(s) CPU architecture, OS, and Version:

Linux 5.4.0-1009-aws x86_64 GNU/Linux-Ubuntu 20.04 LTS

Cluster Configuration:

single node

NAME STATUS ROLES AGE VERSION
ip-1-3-2-1 Ready control-plane,master 2m52s v1.22.8+k3s1

Config.yaml:
N/A

Replication Steps

$  VERSION=v1.22.8+k3s1
$  sudo INSTALL_K3S_VERSION=$VERSION INSTALL_K3S_SKIP_START=true sh - ./install-k3s.sh
$  sudo vim /etc/systemd/system/k3s.service.env
$  sudo systemctl start k3s
$  kubectl get nodes
$  kgp -A
$  ps -aux | grep -i containerd
$  ps -aux | grep -i k3s

Results:
$ sudo cat /proc/32530/environ (containerd proxy variable is blank)

PATH=/var/lib/rancher/k3s/data/2d9caaf03c6d8266857cc47e590fb7246539b380ab3ead71c1009406b27be3ce/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/var/lib/rancher/k3s/data/2d9caaf03c6d8266857cc47e590fb7246539b380ab3ead71c1009406b27be3ce/bin/auxINVOCATION_ID=ac4236b6383f45ceae051a30330a59fcJOURNAL_STREAM=9:216602HTTP_PROXY=http://this.is.my.fake.proxy/HTTPS_PROXY=https://this.is.my.fake.proxy/NO_PROXY=.svc,.cluster.local,10.42.0.0/16,10.43.0.0/16RES_OPTIONS= K3S_DATA_DIR=/var/lib/rancher/k3s/data/2d9caaf03c6d8266857cc47e590fb7246539b380ab3ead71c1009406b27be3ceNODE_NAME=etet

$ sudo cat /proc/32506/environ (k3s is correctly viewing the variables)

PATH=/var/lib/rancher/k3s/data/2d9caaf03c6d8266857cc47e590fb7246539b380ab3ead71c1009406b27be3ce/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/var/lib/rancher/k3s/data/2d9caaf03c6d8266857cc47e590fb7246539b380ab3ead71c1009406b27be3ce/bin/auxNOTIFY_SOCKET=/run/systemd/notifyINVOCATION_ID=ac4236b6383f45ceae051a30330a59fcJOURNAL_STREAM=9:216602CONTAINERD_HTTP_PROXY=http://this.is.my.fake.proxy/CONTAINERD_HTTPS_PROXY=https://this.is.my.fake.proxy/CONTAINERD_NO_PROXY=.docker.ioRES_OPTIONS= K3S_DATA_DIR=/var/lib/rancher/k3s/data/2d9caaf03c6d8266857cc47e590fb7246539b380ab3ead71c1009406b27be3ce

Validated with VERSION=v1.22.11-rc1+k3s1

Validation Steps

$  VERSION=v1.22.11-rc1+k3s1
$  sudo INSTALL_K3S_VERSION=$VERSION INSTALL_K3S_SKIP_START=true sh - ./install-k3s.sh
$  sudo vim /etc/systemd/system/k3s.service.env
$  sudo systemctl start k3s
$  kubectl get nodes
$  kgp -A
$  ps -aux | grep -i containerd
$  ps -aux | grep -i k3s

Results:

$ ps -aux | grep -i containerd

root       21919  1.7 12.7 834736 127452 ?       Sl   20:44   0:41 containerd 
ubuntu     23719  0.0  0.2   8520  2308 pts/0    S+   21:23   0:00 grep --color=auto -i containerd

$ sudo cat /proc/21919/environ

PATH=/var/lib/rancher/k3s/data/69ab787c6ac1423ae3f540b082680de41b2b2885b773aae731bf73081c3beb4c/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/var/lib/rancher/k3s/data/69ab787c6ac1423ae3f540b082680de41b2b2885b773aae731bf73081c3beb4c/bin/auxINVOCATION_ID=3e4c96cb57a84315ad3c17260ba05db8JOURNAL_STREAM=9:166693SYSTEMD_EXEC_PID=21899RES_OPTIONS= K3S_DATA_DIR=/var/lib/rancher/k3s/data/69ab787c6ac1423ae3f540b082680de41b2b2885b773aae731bf73081c3beb4cNO_PROXY=.docker.ioNODE_NAME=k3HTTP_PROXY=http://this.is.my.fake.proxy/HTTPS_PROXY=https://this.is.my.fake.proxy/

$ ps -aux | grep -i k3s

root       21899  6.4 43.6 1181692 436536 ?      Ssl  20:44   2:30 /usr/local/bin/k3s server
ubuntu     23721  0.0  0.2   8520  2472 pts/0    S+   21:23   0:00 grep --color=auto -i k3s

$ sudo cat /proc/21899/environ

PATH=/var/lib/rancher/k3s/data/69ab787c6ac1423ae3f540b082680de41b2b2885b773aae731bf73081c3beb4c/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/var/lib/rancher/k3s/data/69ab787c6ac1423ae3f540b082680de41b2b2885b773aae731bf73081c3beb4c/bin/auxNOTIFY_SOCKET=/run/systemd/notifyINVOCATION_ID=3e4c96cb57a84315ad3c17260ba05db8JOURNAL_STREAM=9:166693SYSTEMD_EXEC_PID=21899CONTAINERD_HTTP_PROXY=http://this.is.my.fake.proxy/CONTAINERD_HTTPS_PROXY=https://this.is.my.fake.proxy/CONTAINERD_NO_PROXY=.docker.ioRES_OPTIONS= K3S_DATA_DIR=/var/lib/rancher/k3s/data/69ab787c6ac1423ae3f540b082680de41b2b2885b773aae731bf73081c3beb4c

Additional context / logs:

$ sudo cat /etc/systemd/system/k3s.service.env (used on both versions to reproduce/validate)

CONTAINERD_HTTP_PROXY=http://this.is.my.fake.proxy/
CONTAINERD_HTTPS_PROXY=https://this.is.my.fake.proxy/
CONTAINERD_NO_PROXY=".docker.io"

Development [DEPRECATED] automation moved this from To Test to Done Issue / Merged PR Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

3 participants