Bug 786381

Summary: confusing port names in rhc-port-forward
Product: OKD Reporter: Linqing Lu <lilu>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED UPSTREAM QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 1.xCC: gshipley, jhonce, max.andersen, rmillner
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-13 22:12:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Linqing Lu 2012-02-01 09:32:51 UTC
Description of problem:
when port-forwarding an app with several different services running, it would give confusing names among different ports.

Version-Release number of selected component (if applicable):
devenv_1575
rhc-0.85.10-1.el6_2.noarch

How reproducible:


Steps to Reproduce:
1. create a jbossas app, and enable jpda
2. embed mongodb/mysql and related admin tool cartridges
3. rhc-port-forward this app
  
Actual results:
identical name for different services

Expected results:
individual name for each service

Additional info:
[root@intel-q8200novt-8-6 java]# rhc-port-forward -a java
Password: 
Submitting form:
debug: true
rhlogin: lilu+8
Contacting https://ec2-107-22-47-30.compute-1.amazonaws.com
Checking available ports...
ssh -t 73b0115682e246d6b8b0a82a87fd29b2.rhcloud.com 'rhc-list-ports'

Binding httpd -> 127.0.251.2:8080...
Binding httpd -> 127.0.251.3:8080...
Binding java -> 127.0.251.1:8080...
Binding java -> 127.0.251.1:8787...
Binding mongod -> 127.0.251.1:27017...
Binding mysqld -> 127.0.251.1:3306...
ssh -N -L 127.0.251.1:27017:127.0.251.1:27017 -L 127.0.251.1:3306:127.0.251.1:3306 -L 127.0.251.1:8080:127.0.251.1:8080 -L 127.0.251.1:8787:127.0.251.1:8787 -L 127.0.251.2:8080:127.0.251.2:8080 -L 127.0.251.3:8080:127.0.251.3:8080 73b0115682e246d6b8b0a82a87fd29b2.rhcloud.com

Use ctl + c to stop

Comment 1 Mike McGrath 2012-02-01 16:33:24 UTC
What output would you expect to see there?  We can't auto detect the protocol, and the app name (in the case of java) has the same process id for each port.

Comment 2 Linqing Lu 2012-02-02 02:38:18 UTC
(In reply to comment #1)
> What output would you expect to see there?  We can't auto detect the protocol,
> and the app name (in the case of java) has the same process id for each port.

Since each port here comes from a service we provided when user enabling (like embed) it, I think at least we can maintain a mapping list between services and ports.
This list could be updated during services enabling/disabling. And 'rhc-list-ports' can find detailed service info according to corresponding entry in the list then. Does this make sense?

Just a thought.

Comment 4 Max Rydahl Andersen 2012-06-18 17:09:34 UTC
I would expect something like:

Binding httpd/http -> 127.0.251.2:8080...
Binding httpd/http -> 127.0.251.3:8080...
Binding java/http -> 127.0.251.1:8080...
Binding java/jpda -> 127.0.251.1:8787...
Binding mongod/db -> 127.0.251.1:27017...
Binding mysqld/db -> 127.0.251.1:3306...

Basically: process name/type of connection

note, I deliberately put it in a non-spaced string to make it easy to parse ;)

To put in context this is the list i'm getting on int, right now:

Binding java -> 127.6.29.129:3528...
Binding java -> 127.6.29.129:4447...
Binding java -> 127.6.29.129:5445...
Binding java -> 127.6.29.129:5455...
Binding java -> 127.6.29.129:8080...
Binding java -> 127.6.29.129:9990...
Binding java -> 127.6.29.129:9999...

...how should user know which is which ? or a tool that would like to choose the right port to connect to?