def config_changed():
    utils.update_nrpe_config()
    if config.changed("control-network"):
        settings = {'private-address': common_utils.get_ip()}
        rnames = ("contrail-analytics", "contrail-analyticsdb",
                  "analytics-cluster", "http-services")
        for rname in rnames:
            for rid in relation_ids(rname):
                relation_set(relation_id=rid, relation_settings=settings)

    docker_utils.config_changed()
    utils.update_charm_status()

    # leave it as latest - in case of exception in previous steps
    # config.changed doesn't work sometimes...
    if config.get("saved-image-tag") != config["image-tag"]:
        utils.update_ziu("image-tag")
        config["saved-image-tag"] = config["image-tag"]
        config.save()
Exemplo n.º 2
0
def config_changed():
    utils.update_nrpe_config()
    if config.changed("control-network"):
        _update_cluster()
        if is_leader() and _address_changed(local_unit(),
                                            common_utils.get_ip()):
            _update_analytics()
            _update_analyticsdb()

    docker_utils.config_changed()
    utils.update_charm_status()

    _notify_proxy_services()

    # leave it as latest - in case of exception in previous steps
    # config.changed doesn't work sometimes (when we saved config in this hook before)
    if config.get("saved-image-tag") != config["image-tag"]:
        utils.update_ziu("image-tag")
        config["saved-image-tag"] = config["image-tag"]
        config.save()
def nrpe_external_master_relation_changed():
    utils.update_nrpe_config()
def tls_certificates_relation_departed():
    config['tls_present'] = False
    common_utils.tls_changed(utils.MODULE, None)
    _notify_proxy_services()
    utils.update_nrpe_config()
    utils.update_charm_status()
def tls_certificates_relation_changed():
    # it can be fired several times without server's cert
    if common_utils.tls_changed(utils.MODULE, relation_get()):
        _notify_proxy_services()
        utils.update_nrpe_config()
        utils.update_charm_status()
Exemplo n.º 6
0
def tls_certificates_relation_departed():
    if common_utils.tls_changed(utils.MODULE, None):
        _notify_proxy_services()
        utils.update_nrpe_config()
        utils.update_charm_status()
def tls_certificates_relation_changed():
    if common_utils.tls_changed(utils.MODULE, relation_get()):
        utils.update_nrpe_config()
        utils.update_charm_status()