YunoHost-Apps / discourse_ynh

Discourse package for YunoHost
https://www.discourse.org/
GNU General Public License v2.0
24 stars 12 forks source link

Please handle the swap requirement as part of the installation / removal #106

Open uda opened 2 years ago

uda commented 2 years ago

Describe the feature

The installation has a requirement that swap with a minimal size be present, but the same requirement exists for GitLab and they handle it by creating / removing the needed swap as part of the app life-cycle.

Existing references in the GitLab app: https://github.com/YunoHost-Apps/gitlab_ynh/search?q=swap

aschrijver commented 2 years ago

I can confirm that the swap gave me trouble on install. Yunohost installer errors out with "You must have a swap partition in order to install and use this application", and I am now searching how best to create it and how large it should be.

Update: Swap instructions mentioned in https://github.com/YunoHost-Apps/discourse_ynh/issues/20#issuecomment-537192389 and documented on Discourse forum in this topic.

Note that the Discourse instruction recommend a swappiness of 10 ("Set the swappiness to 10 so its only uses as an emergency buffer"), but the Yunohost install script errors with "Your swappiness must be higher than 50; please see https://en.wikipedia.org/wiki/Swappiness". Setting a value of 60 worked, but AFAIU this can make Discourse slower.

artybdrlt commented 2 years ago

I second that. I've had trouble installing Discourse Ynh without swap and had to provision it after I came across this issue. It would be great to reference that in the docs.

thanks

uda commented 2 years ago

My issue isn't about documenting the need of swap, which has been fixed, but rather about having the install / remove process handle it, just like the GitLab app does

RaggedStaff commented 2 years ago

I also encountered these issues.

Thirding @uda's request - it would be much simpler if this was handled by the install script (and cleaned up afterwards)

yalh76 commented 1 year ago

Feel free to do a PR to implement the swap stuff ...

There is an experimental helper https://github.com/YunoHost-Apps/Experimental_helpers/blob/master/ynh_add_swap/ynh_add_swap used in gitlab

olberger commented 1 year ago

Note that the Discourse instruction recommend a swappiness of 10 ("Set the swappiness to 10 so its only uses as an emergency buffer"), but the Yunohost install script errors with "Your swappiness must be higher than 50; please see https://en.wikipedia.org/wiki/Swappiness".

Wouldn't this deserve an issue in its own right?