These are chat archives for spring-cloud/spring-cloud

11th
May 2015
checketts
@checketts
May 11 2015 17:13
Any Spring Cloud Devs attending Cloud Foundry Summit?
I didn't see any Spring BOFs or Netflix OSS ones, but I'd love to chat it up if anyone is there
Spencer Gibb
@spencergibb
May 11 2015 17:15
I know matt stine and some others are there, dave and I are not. I’d ping @mstine on twitter
checketts
@checketts
May 11 2015 19:36
Thanks @spencergibb
Ryan Baxter
@ryanjbaxter
May 11 2015 19:41
been trying to find a solution to spring-cloud/spring-cloud-netflix#315
wondering if anyone has any pointers to where to get the host name of the service instance from so I can accurately extract the domain name
Spencer Gibb
@spencergibb
May 11 2015 19:45
hey @ryanjbaxter
Ryan Baxter
@ryanjbaxter
May 11 2015 19:45
hey @spencergibb :)
Spencer Gibb
@spencergibb
May 11 2015 19:47
are you using hostnames or ip addresses in eureka?
Ryan Baxter
@ryanjbaxter
May 11 2015 19:48
hostnames
eureka seemed like the right place to get the hostname from
but i wasnt sure how to determine the specific instance
Spencer Gibb
@spencergibb
May 11 2015 19:49
you’re just wanting to connect to the next server from ribbon or the like?
Ryan Baxter
@ryanjbaxter
May 11 2015 19:50
no
Spencer Gibb
@spencergibb
May 11 2015 19:50
of the currently running service?
I guess I’m missing the context of what you’re trying to do
Ryan Baxter
@ryanjbaxter
May 11 2015 19:52
trying to use the Zones concept in Eureka so that my services are using other services in the same zone
and only going to other zones if a service in the same zone is unavaialble
so ZonePreferenceServerListFilter should return the list of servers in that zone
so services using Ribbon can talk to services in the same zone
but the problem is that this.zone in ZonePreferenceServerListFilter is always set to defaultZone when it should be the domain name of the current service (when approximateZoneFromHostname is set to true)
so I think I have traced this back to EurekaRibbonClientConfiguration.preprocess where ContextKey.zone is set
Spencer Gibb
@spencergibb
May 11 2015 19:56
we need code to set the zone differently in preprocess if approximateZoneFromHostname is true?
Ryan Baxter
@ryanjbaxter
May 11 2015 19:57
i believe so
at least that is my theory :)
Spencer Gibb
@spencergibb
May 11 2015 19:57
and you’re wondering where to get the local hostname from? so you can submit a pull request? ;-)
Ryan Baxter
@ryanjbaxter
May 11 2015 19:57
right :)
as long as the lawyers at IBM let me that is ;)
Spencer Gibb
@spencergibb
May 11 2015 19:59
EurekaInstanceConfig.hostname is where I would start
Ryan Baxter
@ryanjbaxter
May 11 2015 19:59
ok i will take a look there
Spencer Gibb
@spencergibb
May 11 2015 19:59
it comes from InetAddress.getLocalHost().getHostName()
Ryan Baxter
@ryanjbaxter
May 11 2015 19:59
awesome
i will take a look at that tonight, thanks for the pointer
Spencer Gibb
@spencergibb
May 11 2015 20:00
should be able to auto wire one into that class