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

Intercity shows "swap disabled" on servers where it's enabled at install #215

Open
michiels opened this issue Oct 6, 2016 · 6 comments
Open
Labels

Comments

@michiels
Copy link
Member

michiels commented Oct 6, 2016

By default, Ubuntu enables swap for you when you install a server, but our Intercity Swap Settings page shows the message "Swap is disabled on this server". We should probably intelligently check the server when showing that page or at install time, so we can hide this Swap Settings page or at least have the message reflect the server's swap state.

schermafbeelding 2016-10-06 om 12 30 14

root@emma-hairstyle:~# swapon --show=NAME,TYPE,SIZE
NAME      TYPE      SIZE
/dev/vda5 partition   4G
@jvanbaarsen
Copy link
Contributor

@michiels Hm weird, since on DO it is disabled by default. But we can probably add this the the HealthCheck. and see if we get output from this command, if we do swap is enabled, otherwise we disable it in the DB.

Good catch!

@jvanbaarsen jvanbaarsen added the bug label Oct 6, 2016
@michiels
Copy link
Member Author

michiels commented Oct 6, 2016

DO (and some other hosting providers) use custom server images that have been modified over the default installation process.

Implementing it in HealthCheck sounds right! Is that executed at install time? That would be good to refresh the swap status indeed. We don't want people to accidentally create "extra swap" from the swap settings page.

@jvanbaarsen
Copy link
Contributor

@michiels It is executed every 30 minutes. So if the user enables swap manually, we can also detect that!

@michiels
Copy link
Member Author

michiels commented Oct 6, 2016

Yep sounds good! As long as it's checked at least once during boostrap, because then the Swap Settings page will initially show the correct state.

@jvanbaarsen
Copy link
Contributor

@michiels Yeah I also add it to the installation step.

@michiels
Copy link
Member Author

michiels commented Oct 6, 2016

Perfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants