Bug 1377492
| Summary: | Serving static files hosted on the master redirects to the projects page | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Eric Jones <erjones> | |
| Component: | Management Console | Assignee: | Samuel Padgett <spadgett> | |
| Status: | CLOSED ERRATA | QA Contact: | Yadan Pei <yapei> | |
| Severity: | high | Docs Contact: | ||
| Priority: | high | |||
| Version: | 3.2.1 | CC: | aos-bugs, erjones, jforrest, jokerman, mmccomas, pweil, spadgett, yapei | |
| Target Milestone: | --- | |||
| Target Release: | 3.3.1 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: |
Cause:
The download CLI link from the web console would not work if the CLI download was hosted as a web console extension.
Consequence:
You could not host the download as a web console extension.
Fix:
Fix the download link so that it will always download from the server.
Result:
You can host the CLI as a static file using web console extensions.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1381575 (view as bug list) | Environment: |
> openshift version
openshift v3.2.1.13-1-gc2a90e1
kubernetes v1.2.0-36-g4a3f9c5
etcd 2.2.5
|
|
| Last Closed: | 2016-10-27 15:42:01 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1381575 | |||
|
Description
Eric Jones
2016-09-19 21:27:33 UTC
The extensions are working. The problem is the Angular router is trying to handle the link as an internal app link rather than loading the page from the server. @Samuel, is there a way to workaround that for now? I currently have a customer using 3.2.X that is running into this issue Eric, unfortunately I don't think there's a workaround other than to put the download on a different host rather than using an extension. To make the download work as an extension requires this fix. (In reply to Samuel Padgett from comment #2) > The extensions are working. The problem is the Angular router is trying to > handle the link as an internal app link rather than loading the page from > the server. So essentially, I can setup the extension (which works properly), I cannot host any file for download. This fix you added will only work for the CLI downloads, from what I was able to see. How does this fix get added for the generic extension that any admin can setup? What information does a user (and therefore the docs) need to setup a functional download after this fix? > So essentially, I can setup the extension (which works properly), I cannot host any file for download. No, the download itself works fine. It's a problem with the CLI download _link_ in the web console specifically. Since the host and "/console" context match the web console's, AngularJS is handling it as an internal application link and not making a request to the server for the content. If you right click and open the CLI download link in a new window, or just paste the link into a blank browser window, the download should work. > What information does a user (and therefore the docs) need to setup a functional download after this fix? There's no change to how you would set up the download. The instructions in the bug description will work with this fix. yapei, can we add a test case for this problem? Sure, planned to add, will attach later Sorry, Eric Please ignore my needinfo request Hi Samuel, Test Case 501623 is updated, step 1- step5 is added to check this issue. Could you please take a look? Test case looks good to me, thanks Checked against
openshift v3.3.1.1
kubernetes v1.3.0+52492b4
etcd 2.3.0+git
with steps:
1. Prepare the static files and CLI download link files
# mkdir /root/testfiles
# echo 1 > /root/testfiles/1.txt
# cat /root/cli-links.js
window.OPENSHIFT_CONSTANTS.CLI = {
"Mac OS X": "https://<master>:8443/console/extensions/downloads/1.txt"
};
2. Modify your master-config.yaml
assetConfig:
extensionScripts:
- /root/cli-links.js
extensions:
- name: downloads
sourceDirectory: /root/testfiles
3. Restart atomic-openshift-master
# systemctl restart atomic-openshift-master
4. Logout -> Login web console again
5. click "?" dropdown
click "Command Line Tools"
click "Mac OS X"
6. Number 1 is returned on page
Now it returns the correct content of static files, move to VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:2084 |