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

proxy settings are not immediately reflected #24752

Open
hideo-nakamura opened this issue Dec 4, 2024 · 0 comments
Open

proxy settings are not immediately reflected #24752

hideo-nakamura opened this issue Dec 4, 2024 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. machine remote Problem is in podman-remote

Comments

@hideo-nakamura
Copy link

hideo-nakamura commented Dec 4, 2024

Issue Description

Using Windows version of Podman, proxy environment variables are reflected on second boot of Podman machine.

Steps to reproduce the issue

Steps to reproduce the issue

  1. Unset proxy variables.

    set http_proxy=
    set https_proxy=

  2. podman machine start

  3. podman machine stop

  4. Set proxy variables.

    set http_proxy=proxy.company.com:8080
    set https_proxy=proxy.company.com:8080

  5. podman machine start

  6. podman pull ubi8-micro

Describe the results you received

Resolved "ubi8-micro" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull registry.access.redhat.com/ubi8-micro:latest...
Error: initializing source docker://registry.access.redhat.com/ubi8-micro:latest: pinging container registry registry.access.redhat.com: Get "https://registry.access.redhat.com/v2/": EOF

Describe the results you expected

Resolved "ubi8-micro" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull registry.access.redhat.com/ubi8-micro:latest...
Getting image source signatures
Checking if image destination supports signatures
Copying blob sha256:...

podman info output

host:
  arch: amd64
  buildahVersion: 1.38.0
  cgroupControllers: []
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: conmon-2.1.12-2.fc40.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.12, commit: '
  cpuUtilization:
    idlePercent: 91.43
    systemPercent: 5.69
    userPercent: 2.88
  cpus: 4
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    variant: container
    version: "40"
  eventLogger: journald
  freeLocks: 2048
  hostname: XXXXXXXXXX
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
  kernel: 5.15.167.4-microsoft-standard-WSL2
  linkmode: dynamic
  logDriver: journald
  memFree: 7748759552
  memTotal: 8305631232
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.12.2-2.fc40.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.12.2
    package: netavark-1.12.2-1.fc40.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.12.2
  ociRuntime:
    name: crun
    package: crun-1.18.2-1.fc40.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.18.2
      commit: 00ab38af875ddd0d1a8226addda52e1de18339b5
      rundir: /run/user/1000/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20241030.gee7d0b6-1.fc40.x86_64
    version: |
      pasta 0^20241030.gee7d0b6-1.fc40.x86_64
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: unix:///run/user/1000/podman/podman.sock
  rootlessNetworkCmd: pasta
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: true
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 2147483648
  swapTotal: 2147483648
  uptime: 0h 0m 29.00s
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /home/user/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/user/.local/share/containers/storage
  graphRootAllocated: 1081101176832
  graphRootUsed: 879046656
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 0
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /home/user/.local/share/containers/storage/volumes
version:
  APIVersion: 5.3.1
  Built: 1732147200
  BuiltTime: Thu Nov 21 09:00:00 2024
  GitCommit: ""
  GoVersion: go1.22.7
  Os: linux
  OsArch: linux/amd64
  Version: 5.3.1

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

Windows 11 Enterprise, 22H2, 22621.4460

On Windows Server 2022, error messages are slightly different.
Error: initializing source docker://registry.access.redhat.com/ubi8-micro:latest: pinging container registry registry.access.redhat.com: Get "https://registry.access.redhat.com/v2/\": dial tcp 23.51.14.174:443: i/o timeout"

Additional information

On podman-machine-default /etc/environment.d/default-env.conf contains proxy environment variables.
But systemctl --user show-environment does not print proxy environment variables.

'>podman machine ssh
$ systemctl --user show-environment
.... (no proxy variables)

systemd appears to be starting up before the file /etc/environment.d/default-env.conf is created.
systemctl --user daemon-reload command updates systemd and podman pull works right.

$ systemctl --user daemon-reload
$ systemctl --user show-environment
http_proxy=proxy.company.com:8080
https_proxy=proxy.company.com:8080
...
$ exit
'>podman pull ubi8-micro
Resolved "ubi8-micro" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull registry.access.redhat.com/ubi8-micro:latest...
Getting image source signatures
Checking if image destination supports signatures
Copying blob sha256:...

@hideo-nakamura hideo-nakamura added the kind/bug Categorizes issue or PR as related to a bug. label Dec 4, 2024
@github-actions github-actions bot added the remote Problem is in podman-remote label Dec 4, 2024
@Luap99 Luap99 added the machine label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. machine remote Problem is in podman-remote
Projects
None yet
Development

No branches or pull requests

2 participants