Bug 1022436

Summary: Can not change domains successfully when there are multipul domains.
Product: OpenShift Online Reporter: Yujie Zhang <yujzhang>
Component: Management ConsoleAssignee: Jordan Liggitt <jliggitt>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: cdaley, xtian
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: 2014-01-24 03:26:20 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:

Description Yujie Zhang 2013-10-23 09:41:09 UTC
Description of problem:

Created 3 domains, "devenv3933","aaaa33","aaaa", tried to change the domain name of "aaaa33" and "aaaa", after clicking the "change" link on app/console/domain/aaaa33 page, it redirected to app/console/domain/aaaa33/edit, after clicking the "save" button, it redirected to app/console/domain/devenv3933 page.
Checked the code of app/console/domain/aaaa33/edit page, found the following code :

<form id="edit_domain_dev3933" class="formtastic domain form-inline form-inline" method="post" action="/app/console/domain/dev3933" accept-charset="UTF-8">
<div style="margin:0;padding:0;display:inline">
<input type="hidden" name="then">
<input type="hidden" name="domain_param">
<div id="domain_name_group" class="control-group control-group-important">
<fieldset class="btn-toolbar">
<a class="btn" href="/app/console/domain/dev3933">Cancel</a>
<input class="btn btn-primary update" type="submit" value="Save" name="commit">
<img class="icon-loading" style="display: none" src="/app/assets/loader-5a2141569e438427bd7abbeb8ba2df86.gif" data-loading="true" alt="Working...">

The action of the form is "/app/console/domain/dev3933", so it post to wrong page.

Version-Release number of selected component (if applicable):
devenv_3933

How reproducible:
always

Steps to Reproduce:
1.Create more than 1 domains
2.Try to change the name of the secondly created domain
3.

Actual results:

The change domain page redirect to the page of other domain after submitting.

Expected results:

Should be able to change all the domains successfully.

Additional info:

Comment 1 Jordan Liggitt 2013-10-24 18:48:04 UTC
Will merge in https://github.com/openshift/origin-server/pull/3983

Comment 2 openshift-github-bot 2013-10-24 21:28:34 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/317d757d5c25a0769048d31a92aa6cc9d7034cdf
Fix bug 1022436 - domain edit and update methods always use user's first domain

Comment 3 Yujie Zhang 2013-10-25 08:34:57 UTC
Tested on devenv_3944, domain edit and update can work correctly when there are multipule domains, so verify this bug, thanks.

Comment 4 Jordan Liggitt 2013-11-04 19:10:17 UTC
*** Bug 1026486 has been marked as a duplicate of this bug. ***