discourse_ynh icon indicating copy to clipboard operation
discourse_ynh copied to clipboard

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

Open uda opened this issue 3 years ago • 6 comments

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

uda avatar Feb 21 '22 01:02 uda

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.

aschrijver avatar Mar 07 '22 06:03 aschrijver

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

artybdrlt avatar May 20 '22 13:05 artybdrlt

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

uda avatar May 23 '22 14:05 uda

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)

RaggedStaff avatar Jun 20 '22 21:06 RaggedStaff

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

yalh76 avatar Sep 26 '22 01:09 yalh76

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?

olberger avatar Jun 05 '23 13:06 olberger