containers/podman-compose

KeyError: 'mountPoint'

Closed this issue ยท 8 comments

shyim commented
podman pod create --name=n8n --share net -p 127.0.0.1:5678:5678
Error: error adding pod to state: name n8n is in use: pod already exists
125
podman volume inspect n8n_mongo_8200441bf978d432b039f919725c677f || podman volume create n8n_mongo_8200441bf978d432b039f919725c677f
Traceback (most recent call last):
  File "/usr/local/bin/podman-compose", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/podman_compose.py", line 1093, in main
    podman_compose.run()
  File "/usr/local/lib/python3.7/dist-packages/podman_compose.py", line 625, in run
    cmd(self, args)
  File "/usr/local/lib/python3.7/dist-packages/podman_compose.py", line 782, in wrapped
    return func(*args, **kw)
  File "/usr/local/lib/python3.7/dist-packages/podman_compose.py", line 898, in compose_up
    detached=args.detach, podman_command=podman_command)
  File "/usr/local/lib/python3.7/dist-packages/podman_compose.py", line 457, in container_to_args
    mount_args = mount_desc_to_args(compose, volume, cnt['_service'], cnt['name'])
  File "/usr/local/lib/python3.7/dist-packages/podman_compose.py", line 386, in mount_desc_to_args
    mount_desc = mount_dict_vol_to_bind(compose, fix_mount_dict(mount_desc, proj_name, srv_name))
  File "/usr/local/lib/python3.7/dist-packages/podman_compose.py", line 366, in mount_dict_vol_to_bind
    src = json.loads(out)[0]["mountPoint"]
KeyError: 'mountPoint'

Tried to run these docker-compose files
https://github.com/n8n-io/n8n/tree/master/docker/compose/withMongo

I've seen such bug before, are you sure you are using latest devel branch

shyim commented

I did used pip3. So stable

please use

pip3 install https://github.com/containers/podman-compose/archive/devel.tar.gz

Any hints on when this fix will be released?

I suggest to keep this open until the fixed release was published on PyPI.

We are migrating from docker destkop to podman.

Running the following docker-compose.yaml gives this KeyError. Is there a solution?

version: "3"
services:
  postgres:
    image: docker.io/library/postgres:12.8
    ports:
      - "5432:5432"
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: ${POSTGRES_DB}
    volumes:
      # Named volumes
      - pgdata:/var/lib/postgresql/data
      # Bind mounts
      - ${INIT_SQL_DIR}:/docker-entrypoint-initdb.d
volumes:
  pgdata:

Error details

โžœ   podman-compose up
podman pod create --name=jrecloud --share net -p 5432:5432
a63aeed7615a035657c5d5cdf9ffddd4317aeb3968dec22ff639dccd9c8b5d89
0
podman volume inspect jrecloud_pgdata || podman volume create jrecloud_pgdata
Traceback (most recent call last):
  File "/usr/local/bin/podman-compose", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/podman_compose.py", line 1093, in main
    podman_compose.run()
  File "/usr/local/lib/python3.9/site-packages/podman_compose.py", line 625, in run
    cmd(self, args)
  File "/usr/local/lib/python3.9/site-packages/podman_compose.py", line 782, in wrapped
    return func(*args, **kw)
  File "/usr/local/lib/python3.9/site-packages/podman_compose.py", line 897, in compose_up
    podman_args = container_to_args(compose, cnt,
  File "/usr/local/lib/python3.9/site-packages/podman_compose.py", line 457, in container_to_args
    mount_args = mount_desc_to_args(compose, volume, cnt['_service'], cnt['name'])
  File "/usr/local/lib/python3.9/site-packages/podman_compose.py", line 386, in mount_desc_to_args
    mount_desc = mount_dict_vol_to_bind(compose, fix_mount_dict(mount_desc, proj_name, srv_name))
  File "/usr/local/lib/python3.9/site-packages/podman_compose.py", line 366, in mount_dict_vol_to_bind
    src = json.loads(out)[0]["mountPoint"]
KeyError: 'mountPoint'
โžœ  

@uniquejava please use the devel branch as indicated in the readme. we have fixed this but we did not release it to pip.

Seems to work from pypi now. Brew formula for 3.4.4 still contains the unfixed version. Would be great to get this version included.