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

KeyError: 'mountPoint' #235

Closed
shyim opened this issue Sep 16, 2020 · 8 comments
Closed

KeyError: 'mountPoint' #235

shyim opened this issue Sep 16, 2020 · 8 comments

Comments

@shyim
Copy link

shyim commented Sep 16, 2020

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

@muayyad-alsadi
Copy link
Collaborator

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

@shyim
Copy link
Author

shyim commented Sep 17, 2020

I did used pip3. So stable

@muayyad-alsadi
Copy link
Collaborator

please use

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

@WhyNotHugo
Copy link

Any hints on when this fix will be released?

@stweil
Copy link
Contributor

stweil commented Jun 16, 2021

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

@uniquejava
Copy link

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'
➜  

@muayyad-alsadi
Copy link
Collaborator

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

@jorhett
Copy link

jorhett commented Jan 30, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants