Bug 848284 - Can't add cartridge MySql and PostgreSQL when app name length is 32
Summary: Can't add cartridge MySql and PostgreSQL when app name length is 32
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Ram Ranganathan
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-15 07:07 UTC by joycezhang
Modified: 2015-05-14 22:57 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-17 21:29:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
development log from boker (22.93 KB, application/octet-stream)
2012-08-15 07:07 UTC, joycezhang
no flags Details

Description joycezhang 2012-08-15 07:07:41 UTC
Created attachment 604517 [details]
development log from boker

Description of problem:
It's failed to add cartridge postgresql and mysql to app if app name contains 32 characters. Mongodb can be embeded in this case, but failed to connect to  mongo shell.

Please refer to the message as below:
# rhc app cartridge add -a longnamespace12longnamespace12ab -c postgresql-8.4 -p redhat -d
Contacting https://ec2-107-22-102-248.compute-1.amazonaws.com
Problem reported from server. Response code was 500.

DEBUG:
psql: could not connect to server: Connection refused
	Is the server running on host "127.1.8.129" and accepting
	TCP/IP connections on port 5432?
Failed to create database user 7078b1c412bf43018b99d4edfb0d357b
Cartridge return code: 124

Exit Code: 143
broker_c: ["namespace", "rhlogin", "ssh", "app_uuid", "debug", "alter", "cartridge", "cart_type", "action", "app_name", "api"]
api_c: ["placeholder"]
API version:    1.1.3

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


Version-Release number of selected component (if applicable):
devenv_1990
rhc-0.97.6.gem

How reproducible:
always


Steps to Reproduce:
1. Create an app which name size is maximum 32.
#rhc app create -a longnamespace12longnamespace12ab -t jbossas-7 -p xxx
2. Add cartridges to this app, like mongodb, postgresql, mysql.
  
Actual results:
1. It's failed to add PostgreSQL and MySQL:

# rhc app cartridge add -a longnamespace12longnamespace12ab -c mysql-5.1 -p redhat -d
Contacting https://ec2-107-22-102-248.compute-1.amazonaws.com
Problem reported from server. Response code was 500.

DEBUG:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/stickshift/7078b1c412bf43018b99d4edfb0d357b//mysql-5.1/socket/mysql.sock' (2)
Failed to create longnamespace12longnamespace12ab
Cartridge return code: 188

Exit Code: 143
broker_c: ["namespace", "rhlogin", "ssh", "app_uuid", "debug", "alter", "cartridge", "cart_type", "action", "app_name", "api"]
api_c: ["placeholder"]
API version:    1.1.3

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

2. Mongodb and rockmongo can be added, but failed to connect
[longnamespace12longnamespace12ab-jinzhang2.dev.rhcloud.com ~]\> mongo
MongoDB shell version: 2.0.2
connecting to: 127.1.8.129:27017/admin
Wed Aug 15 02:20:51 Error: couldn't connect to server 127.1.8.129:27017 shell/mongo.js:86
exception: connect failed


Expected results:
All cartridges can be added and work well.

Additional info:
Other cartridges can be added, like cron-1.4, haproxy-1.4, 10gen-mms-agent-0.1, phpmyadmin-3.0.

Comment 1 Ram Ranganathan 2012-08-15 20:05:48 UTC
This works fine for me on the latest devenv. I can't reproduce this for either
mysql or postgres. Can you please retest. 

Thanks.

Comment 2 joycezhang 2012-08-16 10:25:17 UTC
This bug has been verified with devenv_1997 and rhc-0.97.7.gem. It's not reproduced. Mysql, postgresql and mongodb can be added to the app correctly.

# rhc app cartridge add  -a  longnamespace12longnamespace12ab -c mysql-5.1 -p a

RESULT:

MySQL 5.1 database added.  Please make note of these credentials:

   Root User: admin
   Root Password: UwQBcBSAvkqb
   Database Name: longnamespace12longnamespace12ab

So mark this bug as verified. Thanks.


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