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

Appliance-wide custom HTTP error pages #14244

Open
skateman opened this issue Mar 9, 2017 · 28 comments
Open

Appliance-wide custom HTTP error pages #14244

skateman opened this issue Mar 9, 2017 · 28 comments

Comments

@skateman
Copy link
Member

skateman commented Mar 9, 2017

There is an open BZ for having the ManageIQ logo on the HTTP error (404, 422, 500) pages. The SUI team already implemented this feature in their project and I'm thinking about making it appliance-wide.

As we can not rely on the asset pipeline when using static error, I would like to move some minimal set of files from the SUI into the public folder of the main repo. When these files are in place, we can tell Apache to take over the error handling by using ProxyErrorOverride and ErrorDocument. However, this solves the errors for the classic UI only, for the SUI we might need some extra mod_rewrite configuration or some modifications in the Angular app.

The solution for the classic UI is super simple, the question is how much changes do we need for the SUI and if this is a good idea or not?

PS: we can always fall back and use the HTTP Status Cats API 🤣

@AllenBW
Copy link
Member

AllenBW commented Mar 9, 2017

Shared 404 sounds great! SUI and OPSUI shouldn't each have their own... Lemme know what you need me to do @skateman !! 🙇‍♀️

@Fryguy
Copy link
Member

Fryguy commented Mar 10, 2017

I mentioned it in #14263, but I'll repeat here. How would we make this productizable?

@skateman
Copy link
Member Author

@Fryguy we can't override but is there any problem with overwriting?

@Fryguy
Copy link
Member

Fryguy commented Mar 13, 2017

We don't overwrite in our build process for productization. Partially because the goal is to separate "productized assets" into a separate RPM, and then one can't overwrite the other, but also because we want to leave the original source as pure as possible.

@skateman
Copy link
Member Author

Hm, then we have to modify the HTML files. In this public folder we don't have access to the asset pipeline at all. Until now it was fine as we weren't using icons here. Actually SUI displays the MiQ icon in production 😕

@skateman
Copy link
Member Author

skateman commented May 4, 2017

What about having a conditional rewrite in Apache? If there is a file called logo-product.svg under DOCUMENT_ROOT, we swap logo.svg with it. @Fryguy ?

@AllenBW
Copy link
Member

AllenBW commented May 4, 2017

Is that what we do for other skinnable assets? Saul it is, the change is one png, logo_transpsrent.png (pretty sure that's the name)

@skateman
Copy link
Member Author

skateman commented May 4, 2017

The problem is that apache can't see behind our asset pipeline, so we can't handle this single image as any other asset 😞

@AllenBW
Copy link
Member

AllenBW commented May 4, 2017

So there's a whole slew of assets that get skinned, here faveicon.ico also being one... or are these items not being skinned rather superseded?

brand_transparent.png is the offending image, but others including login-screen-logo.png appear to be replaced?

@skateman
Copy link
Member Author

skateman commented May 4, 2017

Everything that is in the app/assets folder goes through the asset pipeline...

@AllenBW
Copy link
Member

AllenBW commented May 4, 2017

right on! so we can affect brand_transparent.png, and it'll at least fix the miq logo showing up where it shouldn't... where would that change have to be made?

@skateman
Copy link
Member Author

skateman commented May 4, 2017

You are searching for productization 😉 ask @simaishi

@Fryguy
Copy link
Member

Fryguy commented Jun 14, 2017

What about having a conditional rewrite in Apache? If there is a file called logo-product.svg under DOCUMENT_ROOT, we swap logo.svg with it. @Fryguy ?

Hmmm...I mean that's possible, but then we have to maintain a list in Apache. Additionally this binds us tighter with Apache, so I'm not sure. @carbonin @bdunne Can you give your perspective with respect to the kubernetes changes?

@bdunne
Copy link
Member

bdunne commented Jun 15, 2017

What about having a conditional rewrite in Apache? If there is a file called logo-product.svg under DOCUMENT_ROOT, we swap logo.svg with it. @Fryguy ?

Hmmm...I mean that's possible, but then we have to maintain a list in Apache. Additionally this binds us tighter with Apache, so I'm not sure. @carbonin @bdunne Can you give your perspective with respect to the kubernetes changes?

Several thoughts based on the discussions around podification...

  1. We're close to having an independent httpd container as a front-end just for auth, SSL and directing to the correct openshift service (UI / API / SUI / etc.)
  2. I would like to completely split off the Service UI into its own container that has no references to the existing ManageIQ application container. This container would then run a web server (I don't know if it's httpd / nginx / some node server) only serving this application. It would not have any of the ManageIQ Rails app or its dependencies on the filesystem.
  3. For the rearch, a few of us have discussed removing httpd from the "classic UI" container, leaving a container that only runs rails s and also allowing rails s to serve the static assets. We still need to research whether or not this will cause any issues with excess database connections or any other problems.

@skateman
Copy link
Member Author

@bdunne is there a problem in putting the error pages & logo into the httpd container?

@carbonin
Copy link
Member

@skateman I'm not sure of the state of this discussion, but I don't think we have a productization strategy for containers (other than the miq app one). So while I think the apache container is where the static assets probably belong, I'm not sure productizing them is something we can do yet.

@Fryguy + @bdunne keep me honest if I'm missing some detail here.

@bdunne
Copy link
Member

bdunne commented Jul 28, 2017

I've been trying to remove as much as possible from the httpd container. Soon I hope its only purpose is to handle authentication. Is there an issue with the rails server serving the error pages, or at least the images for them?

Another thing to keep in mind is not only productization, but customer skinning of the app as well. It may look foreign to users to see a ManageIQ logo on an error page if the rest of the application is skinned with their company logos.

@skateman
Copy link
Member Author

I already came up with a conditional rewrite that can be used for the skinning too.

@bdunne
Copy link
Member

bdunne commented Aug 2, 2017

Will the rails server do the rewrite?

@skateman
Copy link
Member Author

skateman commented Aug 3, 2017

@bdunne it's kinda strange to serve the assets with rails in general, but it's possible with a conditional in the config/routes.rb.

@martinpovolny
Copy link
Member

@bdunne, @Fryguy, @carbonin : we really don't want to have Rails serve the assets. That's a step in the wrong direction for the UI.

This is a decision that has a significant impact on the UI and we need to be part of the discussion on this.

If you guys decide to have a separate httpd to do the auth, keep it slim etc. and move the assets out of that container, we would have to reintroduce Apache or some other http server in the UI container or in a seperate container just for the purpose of serving the assets.

Please, make sure that if you dig into things that have a potential of impacting the UI, you invide someone from the UI team to participate.

@Fryguy
Copy link
Member

Fryguy commented Sep 6, 2017

@bdunne @carbonin @martinpovolny @skateman In light of the rearchitecture, would this be possible now, since the assets will be in one place? I think we found some oddities with the 404, and 500 pages specifically, because they're not treated like usual assets, but I'm not sure that would come into play here.

@skateman
Copy link
Member Author

skateman commented Sep 7, 2017

@Fryguy I think yes, we just need some extra lines in the Apache configuration to catch 404 and 500 errors and forward them to the specific URL.

@miq-bot
Copy link
Member

miq-bot commented Apr 2, 2018

This issue has been automatically marked as stale because it has not been updated for at least 6 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions!

@miq-bot miq-bot added the stale label Apr 2, 2018
@JPrause
Copy link
Member

JPrause commented Jan 23, 2019

@skateman is this still a valid issue. If not can you close.
If there's no update by next week, I'll be closing this issue.

@skateman
Copy link
Member Author

Well, yes it is

@JPrause
Copy link
Member

JPrause commented Jan 24, 2019

Thanks @skateman and I'll remove the stale label to give this another lease on life.
@miq-bot remove_label stale

@chessbyte
Copy link
Member

@skateman @martinpovolny @Fryguy @bdunne @AllenBW where did we end up with this discussion?

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

No branches or pull requests