Bug 866413
| Summary: | Get error when visit the wordpress app url. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | OKD | Reporter: | Mengjiao Gao <mgao> | ||||||
| Component: | Templates | Assignee: | Abhishek Gupta <abhgupta> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 2.x | CC: | abhgupta, pruan, rpenta, szhou, wsun, yujzhang | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2013-04-20 03:34:03 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: | |||||||||
| Attachments: |
|
||||||||
|
Description
Mengjiao Gao
2012-10-15 10:11:57 UTC
Created attachment 627284 [details]
The wordpress page after jenkins build and domain name change.
Are you running step 2 before step 1 is finished? Tested this issue on devenv_2340 without step 2. And the same issue exists on devenv_2340. The steps as below: 1.Go to the website, and create a wordpress application. 2.Wait for a while until the app's status to be "STARTED", then Visit the app url. 3.Enable Jenkins to the app, and then build it with jenkins. 4.Visit the app url again. 5.Change the domain name. 6.Visit the app url again. and result as below: After step 2, The wordpress app status is "STARTED" ,But the app url redirected an error page with messages:"Error establishing a database connection". After step 4, I got the right wordpress page. After step 6, the page cannot be shown correctly as attachment #2 [details] shown. (In reply to comment #2) > Are you running step 2 before step 1 is finished? Tested on INT(devenv_2572), this issue still exists, the reproduce steps as below: 1.Go to openshift website and login 2.Create a wordpress application 3.Change the domain name After step3, the page of wordpress is not correct as above screenshot. This happens because we have absolute URLs for links hardcoded in the mysql database. We populate the database during the deploy action hook. Created a pull request on the wordpress-example repository. Also, another much older pull request that avoids populating the database would probably resolve this issue as well. *** Bug 914845 has been marked as a duplicate of this bug. *** *** Bug 892119 has been marked as a duplicate of this bug. *** Wordpress stores absolute URLs for all links in its database. When we change the domain name, those links need to be updated. Probably a update_namespace user hook where the database dump is taken as a sql file, and all references to the application dns changed and then the database imported again. This, however, is too disruptive and we need to look for better alternatives. This is no longer an issue since we do not allow namespace updates on doamins with applications. Verified in devenv_3101 Step: 1.Log in website 2.Create a wordpress application 3.Access the url 4.Jenkins build the app Result: 3.Can access the url successfully. 4.Jenkins build successfully,and the app's url can be accessed. |