{"action":"created","issue":{"url":"https://api.github.com/repos/polaris-gslb/polaris-gslb/issues/16","repository_url":"https://api.github.com/repos/polaris-gslb/polaris-gslb","labels_url":"https://api.github.com/repos/polaris-gslb/polaris-gslb/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/polaris-gslb/polaris-gslb/issues/16/comments","events_url":"https://api.github.com/repos/polaris-gslb/polaris-gslb/issues/16/events","html_url":"https://github.com/polaris-gslb/polaris-gslb/issues/16","id":144116402,"number":16,"title":"Client topology calculations are not functioning","user":{"login":"mattackerman808","id":290456,"avatar_url":"https://avatars.githubusercontent.com/u/290456?v=3","gravatar_id":"","url":"https://api.github.com/users/mattackerman808","html_url":"https://github.com/mattackerman808","followers_url":"https://api.github.com/users/mattackerman808/followers","following_url":"https://api.github.com/users/mattackerman808/following{/other_user}","gists_url":"https://api.github.com/users/mattackerman808/gists{/gist_id}","starred_url":"https://api.github.com/users/mattackerman808/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattackerman808/subscriptions","organizations_url":"https://api.github.com/users/mattackerman808/orgs","repos_url":"https://api.github.com/users/mattackerman808/repos","events_url":"https://api.github.com/users/mattackerman808/events{/privacy}","received_events_url":"https://api.github.com/users/mattackerman808/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-29T00:10:49Z","updated_at":"2016-03-29T19:53:44Z","closed_at":null,"body":"The mapping works when loading the initial config and mapping servers to regions, however I can not get the resolver to map clients to a topology record. I always get 'None' for the region regardless of how my config is setup.\r\n"},"comment":{"url":"https://api.github.com/repos/polaris-gslb/polaris-gslb/issues/comments/203071584","html_url":"https://github.com/polaris-gslb/polaris-gslb/issues/16#issuecomment-203071584","issue_url":"https://api.github.com/repos/polaris-gslb/polaris-gslb/issues/16","id":203071584,"user":{"login":"mattackerman808","id":290456,"avatar_url":"https://avatars.githubusercontent.com/u/290456?v=3","gravatar_id":"","url":"https://api.github.com/users/mattackerman808","html_url":"https://github.com/mattackerman808","followers_url":"https://api.github.com/users/mattackerman808/followers","following_url":"https://api.github.com/users/mattackerman808/following{/other_user}","gists_url":"https://api.github.com/users/mattackerman808/gists{/gist_id}","starred_url":"https://api.github.com/users/mattackerman808/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattackerman808/subscriptions","organizations_url":"https://api.github.com/users/mattackerman808/orgs","repos_url":"https://api.github.com/users/mattackerman808/repos","events_url":"https://api.github.com/users/mattackerman808/events{/privacy}","received_events_url":"https://api.github.com/users/mattackerman808/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T19:53:43Z","updated_at":"2016-03-29T19:53:43Z","body":"Here is the status output. Notice the servers are mapped to regions correctly so the YAML is getting processed and the function to do the mapping works:\r\n\r\n```\r\n/opt/polaris/bin # ./get-generic-state\r\n{\r\n    \"pools\": {\r\n        \"pool\": {\r\n            \"lb_method\": \"twrr\",\r\n            \"last_status\": true,\r\n            \"monitor\": {\r\n                \"retries\": 2,\r\n                \"port\": 443,\r\n                \"hostname\": \"buy.store.com\",\r\n                \"use_ssl\": true,\r\n                \"interval\": 10,\r\n                \"timeout\": 2,\r\n                \"url_path\": \"/\"\r\n            },\r\n            \"name\": \"pool\",\r\n            \"members\": {\r\n                \"17.173.66.180\": {\r\n                    \"weight\": 1,\r\n                    \"retries_left\": 2,\r\n                    \"name\": \"server5\",\r\n                    \"status\": true,\r\n                    \"last_probe_issued_time\": 1459280573.6131446,\r\n                    \"status_reason\": \"monitor passed\",\r\n                    \"ip\": \"17.173.66.180\",\r\n                    \"region\": \"dc3\"\r\n                },\r\n                \"17.173.66.179\": {\r\n                    \"weight\": 1,\r\n                    \"retries_left\": 2,\r\n                    \"name\": \"server4\",\r\n                    \"status\": true,\r\n                    \"last_probe_issued_time\": 1459280573.6147792,\r\n                    \"status_reason\": \"monitor passed\",\r\n                    \"ip\": \"17.173.66.179\",\r\n                    \"region\": \"dc3\"\r\n                },\r\n                \"17.154.66.155\": {\r\n                    \"weight\": 1,\r\n                    \"retries_left\": 2,\r\n                    \"name\": \"server2\",\r\n                    \"status\": true,\r\n                    \"last_probe_issued_time\": 1459280573.613099,\r\n                    \"status_reason\": \"monitor passed\",\r\n                    \"ip\": \"17.154.66.155\",\r\n                    \"region\": \"dc1\"\r\n                },\r\n                \"17.133.240.64\": {\r\n                    \"weight\": 1,\r\n                    \"retries_left\": 2,\r\n                    \"name\": \"server3\",\r\n                    \"status\": true,\r\n                    \"last_probe_issued_time\": 1459280573.614843,\r\n                    \"status_reason\": \"monitor passed\",\r\n                    \"ip\": \"17.133.240.64\",\r\n                    \"region\": \"dc2\"\r\n                },\r\n                \"17.154.66.154\": {\r\n                    \"weight\": 1,\r\n                    \"retries_left\": 2,\r\n                    \"name\": \"server1\",\r\n                    \"status\": true,\r\n                    \"last_probe_issued_time\": 1459280573.6143687,\r\n                    \"status_reason\": \"monitor passed\",\r\n                    \"ip\": \"17.154.66.154\",\r\n                    \"region\": \"dc1\"\r\n                }\r\n            },\r\n            \"max_addrs_returned\": 1,\r\n            \"fallback\": \"any\"\r\n        }\r\n    },\r\n    \"timestamp\": 1459280574.6333416,\r\n    \"globalnames\": {\r\n        \"buy.store.com\": {\r\n            \"pool_name\": \"pool\",\r\n            \"ttl\": 30,\r\n            \"name\": \"buy.store.com\"\r\n        }\r\n    }\r\n}\r\n\r\nTimestamp: Tue Mar 29 19:42:54 2016\r\n/opt/polaris/bin # ./get-ppdns-state\r\n{\r\n    \"timestamp\": 1459280574.6237378,\r\n    \"globalnames\": {\r\n        \"buy.store.com\": {\r\n            \"ttl\": 30,\r\n            \"pool_name\": \"pool\"\r\n        }\r\n    },\r\n    \"pools\": {\r\n        \"pool\": {\r\n            \"lb_method\": \"twrr\",\r\n            \"max_addrs_returned\": 1,\r\n            \"fallback\": \"any\",\r\n            \"dist_tables\": {\r\n                \"dc2\": {\r\n                    \"num_unique_addrs\": 1,\r\n                    \"rotation\": [\r\n                        \"17.133.240.64\"\r\n                    ],\r\n                    \"index\": 0\r\n                },\r\n                \"dc1\": {\r\n                    \"num_unique_addrs\": 2,\r\n                    \"rotation\": [\r\n                        \"17.154.66.155\",\r\n                        \"17.154.66.154\"\r\n                    ],\r\n                    \"index\": 1\r\n                },\r\n                \"_default\": {\r\n                    \"num_unique_addrs\": 5,\r\n                    \"rotation\": [\r\n                        \"17.154.66.154\",\r\n                        \"17.173.66.180\",\r\n                        \"17.154.66.155\",\r\n                        \"17.133.240.64\",\r\n                        \"17.173.66.179\"\r\n                    ],\r\n                    \"index\": 4\r\n                },\r\n                \"dc3\": {\r\n                    \"num_unique_addrs\": 2,\r\n                    \"rotation\": [\r\n                        \"17.173.66.179\",\r\n                        \"17.173.66.180\"\r\n                    ],\r\n                    \"index\": 1\r\n                }\r\n            },\r\n            \"status\": true\r\n        }\r\n    }\r\n}\r\n\r\nTimestamp: Tue Mar 29 19:42:54 2016\r\n```"}}