Skip to content

Commit

Permalink
Merge pull request #3 from ocadotechnology/fix-google-etcd-updates
Browse files Browse the repository at this point in the history
fix: Use unique ID for google peers
  • Loading branch information
mikebryant authored Feb 28, 2018
2 parents f77c6f5 + 0cc4173 commit c7a46ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manage-cluster-state
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class GoogleCloudProvider(CloudProvider):
super(GoogleCloudProvider, self).__init__(*args, **kwargs)

def get_instance_id(self):
response = requests.get('http://169.254.169.254/computeMetadata/v1/instance/name', headers={'Metadata-Flavor': 'Google'})
response = requests.get('http://169.254.169.254/computeMetadata/v1/instance/id', headers={'Metadata-Flavor': 'Google'})
response.raise_for_status()
return response.text

Expand All @@ -231,7 +231,7 @@ class GoogleCloudProvider(CloudProvider):
for instance in instances:
if self.required_tag in instance['tags']['items']:
for network_interface in instance['networkInterfaces']:
peer_name_and_ips.append((instance['name'], network_interface['networkIP']))
peer_name_and_ips.append((instance['id'], network_interface['networkIP']))
return peer_name_and_ips


Expand Down

0 comments on commit c7a46ac

Please sign in to comment.