[cloud] Fix logical flaw in route53_health_check, use string ports everywhere (#25706)

* Fix logical flaw (update when diff), use string ports everywhere

* Change port comparison to integer vs. string

The comparison works either way as long as it's consistent. Boto docs
state that it takes in an integer, but if given a string apparently
keeps it as such. This change just ensures that when we compare, we
specifically deal with integers.
pull/26160/head
Josh Souza 7 years ago committed by Ryan Brown
parent fceb71128e
commit e49f15d6e4

@ -169,7 +169,7 @@ def find_health_check(conn, wanted):
def to_health_check(config):
return HealthCheck(
config.get('IPAddress'),
config.get('Port'),
int(config.get('Port')),
config.get('Type'),
config.get('ResourcePath'),
fqdn=config.get('FullyQualifiedDomainName'),
@ -352,7 +352,7 @@ def main():
changed = True
else:
diff = health_check_diff(existing_config, wanted_config)
if not diff:
if diff:
action = "update"
update_health_check(conn, existing_check.Id, int(existing_check.HealthCheckVersion), wanted_config)
changed = True

Loading…
Cancel
Save