Bug 860972 - Should provide meaningful error message when adding existing alias to another app
Should provide meaningful error message when adding existing alias to anothe...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Lili Nader
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-27 04:44 EDT by Wei Sun
Modified: 2015-05-14 22:05 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-06 13:49:07 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wei Sun 2012-09-27 04:44:28 EDT
Description of problem:
Try to add an existing alias to another application,can not add succssfully,but have not meaningful error message, should have meaningful prompt for user.

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

How reproducible:
always

Steps to Reproduce:
1.add alias to an application
rhc app alias add r8 hello
2.add the same alias to another application
rhc app alias add php1 hello
  
Actual results:
Show meaningless prompt
[sunwei@dhcp-8-229 dev]$ rhc alias add php1 hello
Password: 

Node execution failure (invalid exit code from node).  If the problem persists please contact Red
Hat support.

Expected results:

Show meaningful prompt:
 The alias is already in use. Please choose another.
Additional info:
Comment 1 chris alfonso 2012-09-27 09:18:39 EDT
Note: This messages is coming from:
crankcase/gearchanger/mcollective/plugin/lib/gearchanger-mcollective-plugin/gearchanger/mcollective_application_container_proxy.rb
Comment 2 Rony Gong 2012-10-26 06:13:01 EDT
When do move of same alis app in multi node, alos show Node execution failure(this need update to meaningful error message).

[root@ip-10-123-89-87 openshift]# oo-admin-move --gear_uuid 92a2aea9f58f410d8902ec95ad60a230 -i ip-10-123-89-87
URL: http://q2php-qgong11.dev.rhcloud.com
Login: qgong@redhat.com
App UUID: 92a2aea9f58f410d8902ec95ad60a230
Gear UUID: 92a2aea9f58f410d8902ec95ad60a230
DEBUG: Source district uuid: bb7ee5f30ce04ce4a3e6b6b0f9e100ba
DEBUG: Destination district uuid: bb7ee5f30ce04ce4a3e6b6b0f9e100ba
DEBUG: District unchanged keeping uid
DEBUG: Getting existing app 'q2php' status before moving
DEBUG: Gear component 'php-5.3' was running
DEBUG: Stopping existing app cartridge 'php-5.3' before moving
DEBUG: Force stopping existing app cartridge 'php-5.3' before moving
DEBUG: Creating new account for gear 'q2php' on ip-10-123-89-87
DEBUG: Moving content for app 'q2php', gear 'q2php' to ip-10-123-89-87
Identity added: /var/www/openshift/broker/config/keys/rsync_id_rsa (/var/www/openshift/broker/config/keys/rsync_id_rsa)
Agent pid 28412
unset SSH_AUTH_SOCK;
unset SSH_AGENT_PID;
echo Agent pid 28412 killed;
DEBUG: Performing cartridge level move for 'php-5.3' on ip-10-123-89-87
DEBUG: Starting cartridge 'php-5.3' in 'q2php' after move on ip-10-123-89-87
DEBUG: Fixing DNS and mongo for gear 'q2php' after move
DEBUG: Changing server identity of 'q2php' from 'ip-10-122-49-237' to 'ip-10-123-89-87'
DEBUG: Moving failed.  Rolling back gear 'q2php' 'q2php' with remove-httpd-proxy on 'ip-10-123-89-87'
DEBUG: Moving failed.  Rolling back gear 'q2php' in 'q2php' with destroy on 'ip-10-123-89-87'
/usr/lib/ruby/gems/1.8/gems/openshift-origin-msg-broker-mcollective-0.4.8/lib/openshift-origin-msg-broker-mcollective/lib/openshift/mcollective_application_container_proxy.rb:1265:in `run_cartridge_command_old': Node execution failure (invalid exit code from node).  If the problem persists please contact Red Hat support. (OpenShift::NodeException)
	from /var/www/openshift/broker/lib/express/broker/mcollective_ext.rb:12:in `run_cartridge_command'
	from /usr/lib/ruby/gems/1.8/gems/openshift-origin-msg-broker-mcollective-0.4.8/lib/openshift-origin-msg-broker-mcollective/lib/openshift/mcollective_application_container_proxy.rb:695:in `send'
	from /usr/lib/ruby/gems/1.8/gems/openshift-origin-msg-broker-mcollective-0.4.8/lib/openshift-origin-msg-broker-mcollective/lib/openshift/mcollective_application_container_proxy.rb:695:in `move_gear_post'
	from /usr/lib/ruby/gems/1.8/gems/openshift-origin-msg-broker-mcollective-0.4.8/lib/openshift-origin-msg-broker-mcollective/lib/openshift/mcollective_application_container_proxy.rb:694:in `each'
	from /usr/lib/ruby/gems/1.8/gems/openshift-origin-msg-broker-mcollective-0.4.8/lib/openshift-origin-msg-broker-mcollective/lib/openshift/mcollective_application_container_proxy.rb:694:in `move_gear_post'
	from /usr/lib/ruby/gems/1.8/gems/openshift-origin-msg-broker-mcollective-0.4.8/lib/openshift-origin-msg-broker-mcollective/lib/openshift/mcollective_application_container_proxy.rb:814:in `move_gear'
	from /usr/bin/oo-admin-move:111
Comment 3 Lili Nader 2012-10-29 21:18:08 EDT
https://github.com/openshift/li/pull/537
Comment 4 Wei Sun 2012-10-29 23:42:33 EDT
verified on devenv_2403

Step:
1.add alias for an application
2.add the same alias for another application

Result:
[sunwei@dhcp-8-229 dev]$ rhc alias add phptest php.com
Password: 


RESULT:
Application event 'add-alias' successful

[sunwei@dhcp-8-229 dev]$ rhc alias add perltest php.com
Password: 

Alias already in use.

Note You need to log in before you can comment on or make changes to this bug.