Comment 6 for bug 1949360

Revision history for this message
YU CHENGDE (chant) wrote :

hello

https://opendev.org/starlingx/config/commit/a33342728ae86c1ce529656c5c944a275a5e6f64

this patch modify may cause different output

    def _format_ceph_mon_address(self, ip_address):
- return utils.format_ceph_mon_address(
- ip_address, self.SERVICE_PORT_MON)
+ return utils.format_url_address(ip_address)

=========
def format_ceph_mon_address(ip_address, service_port_mon):
    return '%s:%d' % (format_url_address(ip_address), service_port_mon)

expected output
127.0.0.1:6789
=========

=========
def format_url_address(address):
    """Format the URL address according to RFC 2732"""
    try:
        addr = netaddr.IPAddress(address)
        if addr.version == constants.IPV6_FAMILY:
            return "[%s]" % address
        else:
            return str(address)
    except netaddr.AddrFormatError:
        return address

expected output
127.0.0.1
=========

Maybe it will cause Ceph monitor unreachable?