ceph_hooks.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:charm-ceph-mon 作者: openstack 项目源码 文件源码
def get_mon_hosts():
    hosts = []
    addr = get_public_addr()
    hosts.append('{}:6789'.format(format_ipv6_addr(addr) or addr))

    rel_ids = relation_ids('mon')
    if config('no-bootstrap'):
        rel_ids += relation_ids('bootstrap-source')

    for relid in rel_ids:
        for unit in related_units(relid):
            addr = relation_get('ceph-public-address', unit, relid)
            if addr is not None:
                hosts.append('{}:6789'.format(
                    format_ipv6_addr(addr) or addr))

    return sorted(hosts)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号