Skip to content

GraphOptions mixes image store with additional image stores (which are not returned) #2094

Closed
containers/podman
#24731
@vrothberg

Description

@vrothberg

Additional image stores are getting increasingly important for bootc. In bootc-dev/bootc#644 I shared the desire to use podman info to query additional image stores to prevent bootc from parsing storage.conf files.

For testing, I configured /usr/share/containers/storage.conf as follows:

additionalimagestores = [
"/usr/lib/containers/storage",
"/var/lib/containers/storage",
"/var/lib/containers/storage123",
]

The returned data (sudo podman info --format=json | jq .store) looks as follows:

{
  "configFile": "/usr/share/containers/storage.conf",
  "containerStore": {
    "number": 0,
    "paused": 0,
    "running": 0,
    "stopped": 0
  },
  "graphDriverName": "overlay",
  "graphOptions": {
    "overlay.imagestore": "/var/lib/containers/storage123",
    "overlay.mountopt": "nodev,metacopy=on"
  },
  "graphRoot": "/var/lib/containers/storage",
  "graphRootAllocated": 106219679744,
  "graphRootUsed": 3021795328,
  "graphStatus": {
    "Backing Filesystem": "btrfs",
    "Native Overlay Diff": "false",
    "Supports d_type": "true",
    "Supports shifting": "true",
    "Supports volatile": "true",
    "Using metacopy": "true"
  },
  "imageCopyTmpDir": "/var/tmp",
  "imageStore": {
    "number": 2
  },
  "runRoot": "/run/containers/storage",
  "volumePath": "/var/lib/containers/storage/volumes",
  "transientStore": false
}

What I observe is that the overlay.imagestore points to the last entry in the list. That is because the "imagestore" key is returned three times and Podman takes the last one. However, an additional image store is not the "imagestore".

I suggest to fix that logic and add a new key for options.additionalimagestores.

Cc: @giuseppe

I may pick up the issue next week but feel free to assign it to someone else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions