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

Installation infinitely stuck if not enough memory #38

Open
jimboolio opened this issue Jan 2, 2023 · 1 comment
Open

Installation infinitely stuck if not enough memory #38

jimboolio opened this issue Jan 2, 2023 · 1 comment

Comments

@jimboolio
Copy link

jimboolio commented Jan 2, 2023

Playbook main.yml calls generate_config.sh which checks the amount of available ram, if there is less than 2097152 (of some unit) the script will get infinitely stuck at row 105 and 125 on generate_config.sh

The play is currently like this:

- name: Generate mailcow.conf file
  shell: ./generate_config.sh
  environment:
    MAILCOW_HOSTNAME: "{{ mailcow__hostname }}"
    MAILCOW_TZ: "{{ mailcow__timezone }}"
    MAILCOW_BRANCH: "{{ mailcow__git_version }}"
  args:
    executable: /bin/bash
    chdir: "{{ mailcow__install_path }}"
    creates: mailcow.conf
  tags:
    - skip_ansible_lint

On Ansible role side I'd suggest for fixing it for example by adding a timeout, like below (didn't yet test) and additionally mentioning somewhere that the role does not support (yet) these cases where installed memory is less than x amount:

- name: Generate mailcow.conf file
  shell: ./generate_config.sh
  environment:
    MAILCOW_HOSTNAME: "{{ mailcow__hostname }}"
    MAILCOW_TZ: "{{ mailcow__timezone }}"
    MAILCOW_BRANCH: "{{ mailcow__git_version }}"
  args:
    executable: /bin/bash
    chdir: "{{ mailcow__install_path }}"
    creates: mailcow.conf
  tags:
    - skip_ansible_lint
  async: 60
  poll: 5

A proper fix would be to modify generate_config.sh to handle these situations without interactions.

@Ayowel
Copy link

Ayowel commented Mar 31, 2024

Does the proposed change in mailcow/mailcow-dockerized#5804 look good to you ? Note that the ansiblerole would need a note in the README as both CLAMD and SOLR are enabled by default, which would give a hard time to the hosting server.

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

2 participants