mailcow-ansiblerole icon indicating copy to clipboard operation
mailcow-ansiblerole copied to clipboard

hangs at "Generate mailcow.conf file" with < 2.5G of memory

Open ckoehler opened this issue 4 years ago • 5 comments

The ./generate_config.sh script blocks on the clamd check when memory is < 2.5G and prompts the user to decide whether to skip clamd. With Ansible, this makes the task hang.

Instead, it should probably respect my mailcow__config_skip_clamd setting.

ckoehler avatar Oct 09 '20 23:10 ckoehler

As to how that may be done, I'd propose skipping the generate_config.sh script altogether, making a Jinja template from the default string in the script (starting here) instead, and populating that with the settings from "Template settings for mailcow.conf". That'd simplify the Ansible code for that part, too, but would make it necessary to maintain two copies of the config generation.

ckoehler avatar Oct 09 '20 23:10 ckoehler

I can truly understand the problem. But I never wanted to have to create a jinja template for the mailcow conf, since this just adds more complexity for the maintenance of the role. I think we should adjust the generate_config.sh to be able to understand a kind of non interactive mode where there is no blocking manual input.

ntimo avatar Jan 08 '21 09:01 ntimo

I think you're right about that.

ckoehler avatar Jan 08 '21 16:01 ckoehler

@ntimo if you really want to keep the script: add a non-interactive mode or detect non-interactive terminals. its silly to debug since the task hangs a while and than you have to run it interactively yourself.

stefanux avatar Aug 28 '23 14:08 stefanux

Opened a PR on the base repository to try to fix this in the problematic script mailcow/mailcow-dockerized#5804 .

Ayowel avatar Mar 31 '24 19:03 Ayowel