Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

rhc-list-ports: Fix output of scaled gears #5988

Conversation

Miciah
Copy link
Contributor

@Miciah Miciah commented Nov 28, 2014

Read the list of scaled gears from the correct location.

Commit 487e6e2 replaced haproxy/conf/gear-registry.db with gear-registry/gear-registry.json.

Read the list of scaled gears from the correct location.

Commit 487e6e2 replaced
haproxy/conf/gear-registry.db with gear-registry/gear-registry.json.
@Miciah
Copy link
Contributor Author

Miciah commented Nov 28, 2014

@jwhonce, I noticed this odd bit of code, and I don't know what it's actually used for, but I did noticed that it was wrong, so I fixed it. Could you explain what its purpose is, and what it impacts, if anything? If I can understand what it's for, I can open a defect report. If it's not used for anything, maybe we should simply delete it rather than fixing it.

@jwhonce
Copy link
Contributor

jwhonce commented Dec 1, 2014

@Miciah The purpose of the code is to list the ports and IP addresses of the secondary gears of a scaled application. The use case is running rhc-list-ports against the application/head gear and then getting the information to allow IP forwarding to the secondary nodes.

@ncdc Please review.

@ncdc
Copy link
Contributor

ncdc commented Dec 1, 2014

Looks like this should work, or you could get an ApplicationContainer and then call #gear_registry on it to get the registry, although that presumably would take more cycles than just parsing the json file itself.

@Miciah
Copy link
Contributor Author

Miciah commented Dec 1, 2014

Thanks for the review! It doesn't seem like anything depends on this functionality, and the information is handily available using the oo-gear-registry web command, so perhaps we should simply delete it from rhc-list-ports. Any strong feelings?

@ncdc
Copy link
Contributor

ncdc commented Dec 1, 2014

@ncdc
Copy link
Contributor

ncdc commented Dec 1, 2014

@Miciah with this fix, you get output such as:

haproxy -> 127.12.213.2:8080
haproxy -> 127.12.213.3:8080
httpd -> 127.12.213.1:8080
SCALE547ca0fdecb8d4766200000b
SCALE547ca1974382ec7a94000147

Does nothing in origin-server or rhc use these SCALE lines?

@Miciah
Copy link
Contributor Author

Miciah commented Dec 1, 2014

As far as I can see, rhc does not use the SCALE lines. It does not print them out. I didn't find anything in origin-server that used rhc-list-ports.

@danmcp
Copy link
Contributor

danmcp commented Jan 14, 2015

@Miciah @jwhonce @ncdc Ready for merge?

@ncdc
Copy link
Contributor

ncdc commented Jan 15, 2015

@smarterclayton @fabianofranz does anything use these SCALE lines?

@fabianofranz
Copy link
Member

@ncdc not on rhc.

@smarterclayton
Copy link
Contributor

Don't we use the rhc-list-ports output to determine what to port forward to? Whether something is scalable affects that decision.

On Jan 15, 2015, at 9:42 AM, Fabiano Franz [email protected] wrote:

@ncdc not on rhc.


Reply to this email directly or view it on GitHub.

@ncdc
Copy link
Contributor

ncdc commented Jan 15, 2015

@smarterclayton we haven't found anyplace where SCALE is used so far

@Miciah
Copy link
Contributor Author

Miciah commented Jan 15, 2015

I'll make a new PR today to delete the code.

@Miciah
Copy link
Contributor Author

Miciah commented Jan 16, 2015

Closing in favour of PR #6049.

@Miciah Miciah closed this Jan 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants