Bug 1033288

Summary: can not rename a domain using oo commands
Product: OpenShift Container Platform Reporter: saurabh sharma <saurap>
Component: NodeAssignee: Luke Meyer <lmeyer>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.0.0CC: bleanhar, jhou, jialiu, libra-onpremise-devel
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-11-23 14:02:09 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:

Description saurabh sharma 2013-11-21 20:09:41 UTC
Description of problem:
Can not rename a domain from oo command on broker.
"oo-admin-ctl-domain -l <user> -n <oldNS> -c update -n <newNS>" works for OSE1.2 but does not for 2.0
 
Version-Release number of selected component (if applicable):
RHEL 6.5 beta
OSE 2.0 beta drop2

How reproducible:
everytime

Steps to Reproduce:
1.create a namespace
2.login to broker host and run oo-admin-ctl-domain -l <user> -n <oldNS> -c update -n <newNS>"
3.It fails

Actual results:
Please provide login, namespace, and either a new namespace (rename), or a set of allowed gear sizes, to update the domain

Expected results:
The command should have renamed the namespace

Additional info:
Even if the product has moved to a model where one can not modify a namespace with applications in it, info shown to the user still reflect that it is possible to rename a namespace with apps in it. 

E.g
$ rhc domain rename ee hh
   Renaming domain 'ee' to 'hh' ... done
   Applications in this domain will use the new name in their URL.

Comment 2 Jianwei Hou 2013-11-22 02:42:45 UTC
In OSO environment, this command works well to update the domain name.
oo-admin-ctl-domain -l jhou+1 -n jhou -c update --new_namespace jhou1

"oo-admin-ctl-domain -l <user> -n <oldNS> -c update -n <newNS>" fails because it has 2 '-n'?

Comment 3 saurabh sharma 2013-11-22 06:51:22 UTC
Yes, but the same command works for OSE 1.2 with 2 '-n' whereas does not for 2.0. 
I will use the latter command you recommended for 2.0.

Comment 4 Johnny Liu 2013-11-22 08:38:17 UTC
Actually oo-admin-ctl-domain have some bugs in ose-1.2, more details refer to BZ#991398 and BZ#1006223, and it is refactored in upstream. 

And even in ose-1.2, seem from help message, user does not need input <oldNS> in command line, the -n option is used to input new domain_name. In ose-2.0, -n is used to input old domain_name, because in ose-2.0, user is allowed to create multiple domain.

OSE-1.2:
-n|--namespace <Namespace>
    Namespace for application(s) (alphanumeric - max 16 chars) (required)

OSE-2.0:
-n|--namespace <Namespace>
    Namespace for application(s) (alphanumeric - max 16 chars) (required)
   --new_namespace <Namespace>
    New namespace for application(s) (alphanumeric - max 16 chars) (required
      for --comand update)

Comment 5 Brenton Leanhardt 2013-11-23 14:02:09 UTC
From the comments I believe oo-admin-ctl-domain is working as expected.  If the man page isn't clear or you have and other problems let us know.