[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.
This commit is contained in:
parent
fceb71128e
commit
e49f15d6e4
1 changed files with 2 additions and 2 deletions
|
@ -169,7 +169,7 @@ def find_health_check(conn, wanted):
|
||||||
def to_health_check(config):
|
def to_health_check(config):
|
||||||
return HealthCheck(
|
return HealthCheck(
|
||||||
config.get('IPAddress'),
|
config.get('IPAddress'),
|
||||||
config.get('Port'),
|
int(config.get('Port')),
|
||||||
config.get('Type'),
|
config.get('Type'),
|
||||||
config.get('ResourcePath'),
|
config.get('ResourcePath'),
|
||||||
fqdn=config.get('FullyQualifiedDomainName'),
|
fqdn=config.get('FullyQualifiedDomainName'),
|
||||||
|
@ -352,7 +352,7 @@ def main():
|
||||||
changed = True
|
changed = True
|
||||||
else:
|
else:
|
||||||
diff = health_check_diff(existing_config, wanted_config)
|
diff = health_check_diff(existing_config, wanted_config)
|
||||||
if not diff:
|
if diff:
|
||||||
action = "update"
|
action = "update"
|
||||||
update_health_check(conn, existing_check.Id, int(existing_check.HealthCheckVersion), wanted_config)
|
update_health_check(conn, existing_check.Id, int(existing_check.HealthCheckVersion), wanted_config)
|
||||||
changed = True
|
changed = True
|
||||||
|
|
Loading…
Reference in a new issue