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

Podman API returns 500 in case network is not found instead of 404 #7184

Closed
orenbm opened this issue Aug 2, 2020 · 0 comments · Fixed by #7188
Closed

Podman API returns 500 in case network is not found instead of 404 #7184

orenbm opened this issue Aug 2, 2020 · 0 comments · Fixed by #7188
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@orenbm
Copy link

orenbm commented Aug 2, 2020

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

Running docker-compose build <service-name> doesn't create the network properly. This happens because docker-compose build (or any other docker-compose command that creates an image) will start by creating a network. It will run GET /v1.24/networks/test_default and will get a 500 response. However, Docker returns 404 in this case (which makes sense as the network is not found).

Steps to reproduce the issue:

  1. Start podman service with podman system service -t 0 tcp:0.0.0.0:8080

  2. Run curl command to get a non-existing network:

curl http://localhost:8080/networks/non-existing-network

Describe the results you received:

{"cause":"network not found","message":"unable to find network configuration for non-existing-network: network not found","response":500}

Describe the results you expected:

{"cause":"network not found","message":"unable to find network configuration for non-existing-network: network not found","response":400}

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

Output of podman version:

podman version 2.0.4

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.15.0
  cgroupVersion: v1
  conmon:
    package: conmon-2.0.20-1.el8.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.20, commit: ee5acee39338dff8d32a921a46909359315197b6'
  cpus: 2
  distribution:
    distribution: '"rhel"'
    version: "8.2"
  eventLogger: file
  hostname: ip-172-31-13-47.eu-central-1.compute.internal
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 4.18.0-193.el8.x86_64
  linkmode: dynamic
  memFree: 303247360
  memTotal: 3959033856
  ociRuntime:
    name: runc
    package: runc-1.0.0-145.rc91.git24a3cf8.el8.x86_64
    path: /usr/bin/runc
    version: 'runc version spec: 1.0.2-dev'
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 0
  swapTotal: 0
  uptime: 89h 52m 11.99s (Approximately 3.71 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageStore:
    number: 1
  runRoot: /var/run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 1
  Built: 0
  BuiltTime: Thu Jan  1 00:00:00 1970
  GitCommit: ""
  GoVersion: go1.13.4
  OsArch: linux/amd64
  Version: 2.0.4

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

podman-2.0.4-1.el8.x86_64

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

  • Running on RHEL 8.2
  • Downloaded podman using CentOS 8 instructions from the installation guide (as RHEL doesn't have Podman 2.0 yet in its repos)
  • Ran export DOCKER_HOST=localhost:8080 so that docker-compose will talk with the Podman API service.
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 2, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
2 participants