Example #1
0
def config_changed():
    utils.update_nrpe_config()
    # Charm doesn't support changing of some parameters.
    if config.changed("dpdk"):
        raise Exception("Configuration parameter dpdk couldn't be changed")
    if config.changed("l3mh-cidr"):
        raise Exception(
            "Configuration parameter l3mh-cidr couldn't be changed")
    # Charm doesn't support changing container runtime (check for empty value after upgrade).
    if config.changed("container_runtime") and config.previous(
            "container_runtime"):
        raise Exception(
            "Configuration parameter container_runtime couldn't be changed")

    if not config["dpdk"] and (config.changed("kernel-hugepages-1g")
                               or config.changed("kernel-hugepages-2m")):
        utils.prepare_hugepages_kernel_mode()
    common_utils.container_engine().config_changed()
    utils.pull_images()
    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()
def config_changed():
    utils.update_nrpe_config()
    # Charm doesn't support changing of some parameters.
    if config.changed("dpdk"):
        raise Exception("Configuration parameter dpdk couldn't be changed")

    config[
        "config_analytics_ssl_available"] = common_utils.is_config_analytics_ssl_available(
        )
    config.save()

    docker_utils.config_changed()
    utils.update_charm_status()
Example #3
0
def config_changed():
    utils.update_nrpe_config()
    # Charm doesn't support changing of some parameters.
    if config.changed("dpdk"):
        raise Exception("Configuration parameter dpdk couldn't be changed")

    if not config["dpdk"]:
        utils.prepare_hugepages_kernel_mode()
    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()
Example #4
0
def nrpe_external_master_relation_changed():
    utils.update_nrpe_config()