control-center/serviced — pull request #1004 by wplu (2014-09-10 19:44:55+00:00)
Title: fixes ZEN-14215: use proper ContainerPort for services with multiple ins...

...tances

DEMO:
```
# plu@plu-9: docker logs $(serviced service status | awk '/Zenoss.core/{print $NF}') 2>&1 | grep zope
I0910 19:35:26.620550 00001 endpoint.go:305] cached imported endpoint[2fxqwchwbhgcdgzdqi9pwkvvg_zope]: {endpointID:zope instanceID:0 virtualAddress: purpose:import port:9080}
I0910 19:35:26.633944 00001 controller.go:635] Setting up health check: curl http://localhost:8080/zport/dmd | grep zope > /dev/null
I0910 19:35:47.127110 00001 endpoint.go:471] starting setProxyAddresses(tenantEndpointID: 2fxqwchwbhgcdgzdqi9pwkvvg_zope, purpose: import, endpoints: [])
I0910 19:35:47.127138 00001 endpoint.go:474] starting setProxyAddresses(tenantEndpointID: 2fxqwchwbhgcdgzdqi9pwkvvg_zope) locked
E0910 19:35:47.127149 00001 endpoint.go:482] No proxy for 2fxqwchwbhgcdgzdqi9pwkvvg_zope - no need to set empty address list
I0910 19:35:47.129612 00001 endpoint.go:459] overriding ContainerPort with imported port:9080 for endpoint: &{ApplicationEndpoint:{ServiceID:ewp07ip5kg484z2i7x4u9emid Application:zope ContainerPort:9080 HostPort:49771 HostIP:172.17.42.1 ContainerIP:172.17.5.54 Protocol:tcp VirtualAddress: InstanceID:0} TenantID:2fxqwchwbhgcdgzdqi9pwkvvg EndpointID:zope HostID:570a276e ContainerID:2e04f45298b5ae6346b73b343f227728f4fee71d6a5ee534b8337be145e9c95e version:0xc2080f94b8}
I0910 19:35:47.129686 00001 endpoint.go:471] starting setProxyAddresses(tenantEndpointID: 2fxqwchwbhgcdgzdqi9pwkvvg_zope, purpose: import, endpoints: [{ServiceID:ewp07ip5kg484z2i7x4u9emid Application:zope ContainerPort:9080 HostPort:49771 HostIP:172.17.42.1 ContainerIP:172.17.5.54 Protocol:tcp VirtualAddress: InstanceID:0}])
I0910 19:35:47.129716 00001 endpoint.go:474] starting setProxyAddresses(tenantEndpointID: 2fxqwchwbhgcdgzdqi9pwkvvg_zope) locked
I0910 19:35:47.129732 00001 endpoint.go:501] addresses[0]: [172.17.42.1:49771] endpoint: {ServiceID:ewp07ip5kg484z2i7x4u9emid Application:zope ContainerPort:9080 HostPort:49771 HostIP:172.17.42.1 ContainerIP:172.17.5.54 Protocol:tcp VirtualAddress: InstanceID:0}
I0910 19:35:47.129773 00001 endpoint.go:583] Attempting port map for: 2fxqwchwbhgcdgzdqi9pwkvvg_zope -> {ServiceID:ewp07ip5kg484z2i7x4u9emid Application:zope ContainerPort:9080 HostPort:49771 HostIP:172.17.42.1 ContainerIP:172.17.5.54 Protocol:tcp VirtualAddress: InstanceID:0}
I0910 19:35:47.129870 00001 endpoint.go:601] Success binding port: 2fxqwchwbhgcdgzdqi9pwkvvg_zope -> proxy[{ewp07ip5kg484z2i7x4u9emid zope 9080 49771 172.17.42.1 172.17.5.54 tcp 0}; &{%!s(*net.netFD=&{{0 0 0} 23 2 1 false tcp4 0xc208e5b230 ?reflect.Value? {140442227705192}})}]=>[]
I0910 19:35:47.143664 00001 endpoint.go:459] overriding ContainerPort with imported port:9080 for endpoint: &{ApplicationEndpoint:{ServiceID:ewp07ip5kg484z2i7x4u9emid Application:zope ContainerPort:9080 HostPort:49771 HostIP:172.17.42.1 ContainerIP:172.17.5.54 Protocol:tcp VirtualAddress: InstanceID:0} TenantID:2fxqwchwbhgcdgzdqi9pwkvvg EndpointID:zope HostID:570a276e ContainerID:2e04f45298b5ae6346b73b343f227728f4fee71d6a5ee534b8337be145e9c95e version:0xc2080f9998}
I0910 19:35:47.144292 00001 endpoint.go:459] overriding ContainerPort with imported port:9080 for endpoint: &{ApplicationEndpoint:{ServiceID:ewp07ip5kg484z2i7x4u9emid Application:zope ContainerPort:9080 HostPort:49778 HostIP:172.17.42.1 ContainerIP:172.17.5.65 Protocol:tcp VirtualAddress: InstanceID:1} TenantID:2fxqwchwbhgcdgzdqi9pwkvvg EndpointID:zope HostID:570a276e ContainerID:a80670b0ae004de40bb0a94407ec9e21ca3e47eb7aa3bab77f094a16bac1f179 version:0xc2080f9b18}
I0910 19:35:47.144341 00001 endpoint.go:471] starting setProxyAddresses(tenantEndpointID: 2fxqwchwbhgcdgzdqi9pwkvvg_zope, purpose: import, endpoints: [{ServiceID:ewp07ip5kg484z2i7x4u9emid Application:zope ContainerPort:9080 HostPort:49771 HostIP:172.17.42.1 ContainerIP:172.17.5.54 Protocol:tcp VirtualAddress: InstanceID:0} {ServiceID:ewp07ip5kg484z2i7x4u9emid Application:zope ContainerPort:9080 HostPort:49778 HostIP:172.17.42.1 ContainerIP:172.17.5.65 Protocol:tcp VirtualAddress: InstanceID:1}])
I0910 19:35:47.144389 00001 endpoint.go:474] starting setProxyAddresses(tenantEndpointID: 2fxqwchwbhgcdgzdqi9pwkvvg_zope) locked
I0910 19:35:47.144407 00001 endpoint.go:501] addresses[0]: [172.17.42.1:49771] endpoint: {ServiceID:ewp07ip5kg484z2i7x4u9emid Application:zope ContainerPort:9080 HostPort:49771 HostIP:172.17.42.1 ContainerIP:172.17.5.54 Protocol:tcp VirtualAddress: InstanceID:0}
I0910 19:35:47.144446 00001 endpoint.go:501] addresses[1]: [] endpoint: {ServiceID:ewp07ip5kg484z2i7x4u9emid Application:zope ContainerPort:9080 HostPort:49778 HostIP:172.17.42.1 ContainerIP:172.17.5.65 Protocol:tcp VirtualAddress: InstanceID:1}

```