mirror of
https://github.com/ceph/ceph
synced 2025-02-25 03:52:04 +00:00
Merge pull request #43737 from AndrewSharapov/master
mgr/cephadm: Fixed spawning ip addresses list for public network interface Reviewed-by: Sebastian Wagner <sewagner@redhat.com>
This commit is contained in:
commit
884f89ea6f
@ -361,8 +361,8 @@ class HostAssignment(object):
|
||||
def find_ip_on_host(self, hostname: str, subnets: List[str]) -> Optional[str]:
|
||||
for subnet in subnets:
|
||||
ips: List[str] = []
|
||||
for iface, ips in self.networks.get(hostname, {}).get(subnet, {}).items():
|
||||
ips.extend(ips)
|
||||
for iface, iface_ips in self.networks.get(hostname, {}).get(subnet, {}).items():
|
||||
ips.extend(iface_ips)
|
||||
if ips:
|
||||
return sorted(ips)[0]
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user