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 remote error: strconv.Atoi: parsing "": invalid syntax #16509

Closed
dustymabe opened this issue Nov 14, 2022 · 4 comments · Fixed by #16526
Closed

podman remote error: strconv.Atoi: parsing "": invalid syntax #16509

dustymabe opened this issue Nov 14, 2022 · 4 comments · Fixed by #16526
Assignees
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

@dustymabe
Copy link
Contributor

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

/kind bug

Description

Parsing of the CONTAINER_HOST environment variable regressed. Previous values that were used no longer work and give an error.

Steps to reproduce the issue:

[coreos-assembler]$ export REMOTEHOST=1.1.1.1
export REMOTEUSER=user
export REMOTEUID=1001                                                                                                export CONTAINER_HOST="ssh://${REMOTEUSER}@${REMOTEHOST}/run/user/${REMOTEUID}/podman/podman.sock"
export CONTAINER_SSHKEY=/srv/sshkey
[coreos-assembler]$ podman --remote info
Error: strconv.Atoi: parsing "": invalid syntax

Describe the results you received:

Error: strconv.Atoi: parsing "": invalid syntax

Describe the results you expected:

No error.

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

This can be worked around by adding the port to the CONTAINER_HOST
variable entry:

CONTAINER_HOST="ssh://${REMOTEUSER}@${REMOTEHOST}:22/run/user/${REMOTEUID}/podman/podman.sock"

Output of podman version:

Client:       Podman Engine
Version:      4.3.0
API Version:  4.3.0
Go Version:   go1.18.7
Built:        Fri Oct 21 08:16:35 2022
OS/Arch:      linux/amd64

Output of podman info:

host:
  arch: amd64
  buildahVersion: 1.28.0
  cgroupControllers:
  - memory
  - pids
  cgroupManager: cgroupfs
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.4-3.fc36.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.4, commit: '
  cpuUtilization:
    idlePercent: 93.81
    systemPercent: 0.82
    userPercent: 5.38
  cpus: 12
  distribution:
    distribution: fedora
    variant: container
    version: "36"
  eventLogger: file
  hostname: 856778bb8ff9
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.19.10-100.fc35.x86_64
  linkmode: dynamic
  logDriver: k8s-file
  memFree: 1664892928
  memTotal: 67366096896
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.6-2.fc36.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.6
      commit: 18cf2efbb8feb2b2f20e316520e0fd0b6c41ef4d
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/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: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-0.2.beta.0.fc36.x86_64
    version: |-
      slirp4netns version 1.2.0-beta.0
      commit: 477db14a24ff1a3de3a705e51ca2c4c1fe3dda64
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.3
  swapFree: 10659028992
  swapTotal: 12884893696
  uptime: 1056h 34m 28.00s (Approximately 44.00 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /usr/share/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
  graphRootAllocated: 607574138880
  graphRootUsed: 560324374528
  graphStatus:
    Backing Filesystem: overlayfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 0
  runRoot: /run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 4.3.0
  Built: 1666340195
  BuiltTime: Fri Oct 21 08:16:35 2022
  GitCommit: ""
  GoVersion: go1.18.7
  Os: linux
  OsArch: linux/amd64
  Version: 4.3.0

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

podman-4.3.0-2.fc36.x86_64

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

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 14, 2022
dustymabe added a commit to dustymabe/coreos-ci-lib that referenced this issue Nov 14, 2022
There is a regression in podman [1] that causes podman remote sessions
to not work unless the port is specified. Let's just add the port so we
can get unblocked.

[1] containers/podman#16509
dustymabe added a commit to coreos/coreos-ci-lib that referenced this issue Nov 14, 2022
There is a regression in podman [1] that causes podman remote sessions
to not work unless the port is specified. Let's just add the port so we
can get unblocked.

[1] containers/podman#16509
@vrothberg
Copy link
Member

Thanks @dustymabe!

@cdoern, looks like we need an additional check to only parse the port if it has been set.

cdoern added a commit to cdoern/podman that referenced this issue Nov 15, 2022
if no port is specified for an ssh style url, default to 22

resolves containers#16509

Signed-off-by: Charlie Doern <cdoern@redhat.com>
cdoern added a commit to cdoern/podman that referenced this issue Nov 15, 2022
if no port is specified for an ssh style url, default to 22

resolves containers#16509

Signed-off-by: Charlie Doern <cdoern@redhat.com>
cdoern added a commit to cdoern/podman that referenced this issue Nov 16, 2022
if no port is specified for an ssh style url, default to 22

resolves containers#16509

Signed-off-by: Charlie Doern <cdoern@redhat.com>
cdoern added a commit to cdoern/podman that referenced this issue Nov 16, 2022
if no port is specified for an ssh style url, default to 22

resolves containers#16509

Signed-off-by: Charlie Doern <cdoern@redhat.com>
@dustymabe
Copy link
Contributor Author

dustymabe commented Jul 6, 2023

FTR I just tried this again and had a similar problem:

[dustymabe@media containers]$ export CONTAINER_HOST="ssh://runner@dustymabe.com/run/user/1001/podman/podman.sock"
[dustymabe@media containers]$ podman --remote info                       
Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` 
and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman socket: Get "http://d/v4.5.0/libpod/_ping": strconv.Atoi: parsing "": invalid syntax
[dustymabe@media containers]$ rpm -q podman
podman-4.5.0-1.fc37.x86_64
[dustymabe@media containers]$ export CONTAINER_HOST="ssh://runner@dustymabe.com:22/run/user/1001/podman/podman.sock"
[dustymabe@media containers]$ podman --remote info                       
host:         
  arch: arm64             
  buildahVersion: 1.30.0
...
...

It's using podman-4.5.0 which the fix for this should have been in. Am I doing something wrong?

@vrothberg
Copy link
Member

Thanks for reaching out! That looks like a parsing error. Would you open a new issue for it?

@dustymabe
Copy link
Contributor Author

#19162

@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 Oct 13, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 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
Development

Successfully merging a pull request may close this issue.

3 participants