-
Notifications
You must be signed in to change notification settings - Fork 106
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
Improved maintenance page handling of 503 errors [release_2.0] #2202
Conversation
<%- @maintenance_ip_whitelist.each do |ip| -%> | ||
RewriteCond %{REMOTE_ADDR} !^<%= escape_ip(ip) %> | ||
<%- end -%> | ||
RewriteRule ^.*$ <%= @public_uri %>/maintenance/index.html [R=503,L] | ||
ErrorDocument 503 <%= @public_uri %>/maintenance/index.html | ||
Header Set Cache-Control "max-age=0, no-store" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to see how this behaves in 2.0. 2.1 already had this removed - but 2.0 didn't.
I keep deferring this test, but basically we want to be sure that the maintenance page isn't being cached forever in 2.1. By removing the Header Set Cache-Control
are we running into a similar situation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested on webdev02. I removed the whitelist for VPN so I didn't have to disconnect. But I loaded OnDemand, touched maintenance.enable, reloaded (not full reload, just click refresh button) and got maintenance page then removed the enable and reloaded again and got dashboard.
So one thing I think this change might break is the URL for maintenance page goes from staying like /pun/sys/dashboard
to being forced to /public/maintenance
. So if a user refreshes, they won't go back to dashboard, they must modify URL. I think one way we could ease that issue is update maintenance page with very clear link to get back to OnDemand. We'd also need to update OSC's specific page as we override OOD default page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might have a solution in mind to fix the URL issue. I am building new nightlies for dev and will test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So tested on dev with nightly I just built for Gitlab, enable maintenance and get this:
https://ondemand-dev.osc.edu/public/maintenance/index.html
Added a few lines to maintenance directory
RewriteCond /etc/ood/maintenance.enable !-f
ReWriteRule ^.*$ /
Removed maintenance file and reloaded, back to OnDemand. I'll open 2.1 pull request and update this pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for testing manually.
Fixes #2196