containers / ansible-podman-collections

Repository for Ansible content that can include playbooks, roles, modules, and plugins for use with the Podman tool
GNU General Public License v3.0
252 stars 137 forks source link

Support shm-size when specifying a pod #742

Closed thibaultamartin closed 1 month ago

thibaultamartin commented 1 month ago

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

/kind bug

Description

Steps to reproduce the issue:

Create a pod with the shm_size attribute

Describe the results you received:

fatal: [REDACTED]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (containers.podman.podman_pod) module: shm_size. Supported parameters include: add_host, blkio_weight, blkio_weight_device, cgroup_parent, cpu_shares, cpus, cpuset_cpus, cpuset_mems, debug, device, device_read_bps, device_write_bps, dns, dns_opt, dns_search, executable, generate_systemd, gidmap, hostname, infra, infra_command, infra_conmon_pidfile, infra_image, infra_name, ip, label, label_file, mac_address, memory, memory_swap, name, network, network_alias, no_hosts, pid, pod_id_file, publish, quadlet_dir, quadlet_filename, quadlet_options, recreate, share, state, subgidname, subuidname, uidmap, userns, volume (network_aliases, ports, volumes)."}

Describe the results you expected:

I expected the pod to be created with the shm size I need, as podman supports: https://docs.podman.io/en/v4.4/markdown/podman-pod-create.1.html#shm-size-number-unit

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

Version of the containers.podman collection: Either git commit if installed from git: git show --summary Or version from ansible-galaxy if installed from galaxy: ansible-galaxy collection list | grep containers.podman

containers.podman     1.13.0 

Output of ansible --version:

ansible [core 2.16.2]
  config file = None
  configured module search path = ['/Users/thib/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/lib/python3.11/site-packages/ansible
  ansible collection location = /Users/thib/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.11.8 (main, Feb  6 2024, 21:21:21) [Clang 15.0.0 (clang-1500.1.0.2.5)] (/opt/homebrew/opt/python@3.11/bin/python3.11)
  jinja version = 3.1.3
  libyaml = True

Output of podman version:

podman version 5.0.0

Output of podman info --debug:

OS: darwin/arm64
provider: applehv
version: 5.0.0

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

(paste your output here)

Playbok you run with ansible (e.g. content of playbook.yaml):

- name: Create synapse pod
  containers.podman.podman_pod:
    name: pod-synapse
    shm_size: "1g"
    publish:
      - "10.8.0.2:9000:9000"
    state: created