ceph_hooks.py 文件源码

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

项目:charm-ceph-mon 作者: openstack 项目源码 文件源码
def admin_relation_joined(relid=None):
    if ceph.is_quorum():
        name = relation_get('keyring-name')
        if name is None:
            name = 'admin'
        log('mon cluster in quorum - providing client with keys')
        mon_hosts = config('monitor-hosts') or ' '.join(get_mon_hosts())
        data = {'key': ceph.get_named_key(name=name, caps=ceph.admin_caps),
                'fsid': leader_get('fsid'),
                'auth': config('auth-supported'),
                'mon_hosts': mon_hosts,
                }
        relation_set(relation_id=relid,
                     relation_settings=data)
    else:
        log('mon cluster not in quorum - deferring key provision')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号