podman icon indicating copy to clipboard operation
podman copied to clipboard

Renaming a Podman connection to its current name deletes it

Open mdiniz97 opened this issue 3 days ago • 2 comments

Issue Description

Running podman system connection rename with identical source and destination names silently deletes the connection while returning a successful exit code (0).

If the affected connection is the default, the configuration retains a reference to a connection that no longer exists.

Steps to reproduce the issue

The following reproducer uses isolated configuration files and does not require a running Podman engine.

podman system connection add demo unix:///run/podman/repro.sock
podman system connection list
podman system connection rename demo demo
echo "rename exit code: $?"
podman system connection list
cat "$PODMAN_CONNECTIONS_CONF"

Describe the results you received

  • The demo connection is successfully created and set as the default.
  • Renaming demo to demo returns exit code 0.
  • The connection is no longer present in the connection list.
  • The configuration still references demo as the default connection.

Resulting configuration:

{"Connection":{"Default":"demo"},"Farm":{}}

Describe the results you expected

Renaming a connection to its current name should be a no-op.

The connection should remain available with its original URI, settings, and default status. No configuration data should be lost.

podman info output

OS: darwin/arm64
provider: libkrun
version: 6.3.0-dev

Host: macOS 27.0.1 (build 26A434), Mac16,7.

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

No

Additional environment details

No response

Additional information

No response

mdiniz97 avatar Nov 30 '26 20:11 mdiniz97

Hi! I'd like to work on this issue. Could you please assign it to me?

mdiniz97 avatar Nov 30 '26 20:11 mdiniz97

@mdiniz97 Please first read our organization-wide contributing guide: https://github.com/podman-container-tools/community/blob/main/CONTRIBUTING.md. It contains all the general recommendations on how to work with issues and how to create proper commits and PRs for the Project.

Honny1 avatar Dec 01 '26 11:12 Honny1