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

podlet blows up with -1 ulimit specs (invalid type: integer -1, expected u64) #124

Closed
draeath opened this issue Oct 18, 2024 · 2 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@draeath
Copy link

draeath commented Oct 18, 2024

Consider the following compose example:

version: '3'
services:
  opensearch:
    image: "docker.io/opensearchproject/opensearch:2.15.0"
    environment:
      - "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g"
      - "bootstrap.memory_lock=true"
      - "discovery.type=single-node"
      - "action.auto_create_index=false"
      - "plugins.security.ssl.http.enabled=false"
      - "plugins.security.disabled=true"
    ulimits:
      memlock:
        hard: -1
        soft: -1
      nofile:
        soft: 65536
        hard: 65536
    ports:
      - "9203:9200"
      - "9303:9300"
    restart: "on-failure"
    networks:
      - graylog
    volumes:
      - "/z01/opensearch:/usr/share/opensearch/data"

networks:
  graylog:
    driver: "bridge"

The following is received when used with podlet compose:

Error: 
   0: error converting compose file
   1: error reading compose file
   2: File `docker-compose.yml` is not a valid compose file
   3: services.opensearch.ulimits.memlock.hard: invalid type: integer `-1`, expected u64 at line 27 column 15

Location:
   /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/podlet-0.3.0/src/cli/compose.rs:203

This is invalid behavior, -1 is a valid specification for these. The compose spec only states that it be an integer, not that it be unsigned.

@draeath
Copy link
Author

draeath commented Oct 18, 2024

If it's useful, when the value of -1 is provided, the output ulimit in the systemd unit should be infinity

@k9withabone
Copy link
Member

Duplicate of #117. Fixed with k9withabone/compose_spec_rs#32 and #122 / 2cb00b7. Will be a part of the next release.

@k9withabone k9withabone added the duplicate This issue or pull request already exists label Oct 18, 2024
@k9withabone k9withabone closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants