Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

CRC podman does not work behind proxy #14156

Closed
mkonzal opened this issue May 9, 2022 · 6 comments
Closed

CRC podman does not work behind proxy #14156

mkonzal opened this issue May 9, 2022 · 6 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. remote Problem is in podman-remote windows issue/bug on Windows

Comments

@mkonzal
Copy link

mkonzal commented May 9, 2022

/kind bug

Description

CRC podman it is not able to pull a image from the internet.
Original CRC issue.

Steps to reproduce the issue:

  1. setup environment variables HTTP_PROXY, HTTPS_PROXY and NO_PROXY

  2. run podman VM (crc set config preset podman, crc setup, crc start, & crc podman-env | Invoke-Expression)

  3. try to pull a image podman pull docker.io/library/httpd

Describe the results you received:

Trying to pull docker.io/library/httpd:latest...
Error: initializing source docker://httpd:latest: pinging container registry registry-1.docker.io: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io: no such host

Describe the results you expected:
The image will be pulled.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Client:
Version:      3.4.4
API Version:  3.4.4
Go Version:   go1.16.8
Git Commit:   f6526ada1025c2e3f88745ba83b8b461ca659933
Built:        Wed Dec  8 22:14:28 2021
OS/Arch:      windows/amd64

Server:
Version:      3.4.4
API Version:  3.4.4
Go Version:   go1.16.8
Built:        Wed Dec  8 22:45:07 2021
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.23.1
  cgroupControllers:
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.0-2.fc35.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.0, commit: '
  cpus: 6
  distribution:
    distribution: fedora
    variant: coreos
    version: "35"
  eventLogger: journald
  hostname: podman.crc.testing
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.15.18-200.fc35.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 16258805760
  memTotal: 16673415168
  ociRuntime:
    name: crun
    package: crun-1.4.2-1.fc35.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.4.2
      commit: f6fbc8f840df1a414f31a60953ae514fa497c748
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/user/1000/podman/podman.sock
  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: true
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.12-2.fc35.x86_64
    version: |-
      slirp4netns version 1.1.12
      commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.3
  swapFree: 0
  swapTotal: 0
  uptime: 3m 0.15s
plugins:
  log:
  - k8s-file
  - none
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /var/home/core/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /var/home/core/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 0
  runRoot: /run/user/1000/containers
  volumePath: /var/home/core/.local/share/containers/storage/volumes
version:
  APIVersion: 3.4.4
  Built: 1638999907
  BuiltTime: Wed Dec  8 21:45:07 2021
  GitCommit: ""
  GoVersion: go1.16.8
  OsArch: linux/amd64
  Version: 3.4.4

Package info (e.g. output of rpm -q podman or apt list podman):

N/A

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

Yes (version latest available CRC)

Additional environment details (AWS, VirtualBox, physical, etc.):

CRC
proxy on the same host like VM.

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label May 9, 2022
@github-actions github-actions bot added remote Problem is in podman-remote windows issue/bug on Windows labels May 9, 2022
@mheon
Copy link
Member

mheon commented May 9, 2022

@baude PTAL. Is CRC using the same mechanisms podman machine does? Because I know we resolved this for machine

@Luap99
Copy link
Member

Luap99 commented May 9, 2022

Given that the reported version is 3.4.4 which does not have machine support on windows I would say no.

Is HTTP_PROXY set in the VM? If no then this is a crc problem. If yes then it is a problem with podman.

@mkonzal
Copy link
Author

mkonzal commented May 10, 2022

HTTP_PROXY was not set, but when I set it now like described in #11941, the result is the same.

@rhatdan
Copy link
Member

rhatdan commented May 10, 2022

HTTP_PROXY has to be set within the VM and before the podman service is started.

You can add this to containers.conf in the VM and then restart the service.

# Environment variables to be used when running the container engine (e.g., Podman, Buildah).
# For example "http_proxy=internal.proxy.company.com".
# Note these environment variables will not be used within the container.
# Set the env section under [containers] table, if you want to set environment variables for the container.
#
#env = []

@cfergeau
Copy link
Contributor

cfergeau commented May 10, 2022

Ah, interesting hint regarding containers.conf. I've come up with https://github.com/cfergeau/crc/tree/podmanproxy which I still need to try against a proxy. This uses /etc/environment.d and /etc/systemd/system/podman.service.d/ to make sure podman is run with the proxy environment variables. But imo this is more of a crc issue than of something for podman

@rhatdan
Copy link
Member

rhatdan commented May 10, 2022

That works also.

@containers containers locked and limited conversation to collaborators May 10, 2022
@rhatdan rhatdan converted this issue into discussion #14185 May 10, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
kind/bug Categorizes issue or PR as related to a bug. remote Problem is in podman-remote windows issue/bug on Windows
Projects
None yet
Development

No branches or pull requests

5 participants