You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2020/04/16 13:28:50 UTC

[cloudstack] 01/01: Merge branch '4.13'

This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 8e4be6dc60ad2bed1d393384d00887b858ee7cf4
Merge: b406e1d 2637a86
Author: Daan Hoogland <da...@shapeblue.com>
AuthorDate: Thu Apr 16 15:27:52 2020 +0200

    Merge branch '4.13'

 .../framework/jobs/impl/AsyncJobManagerImpl.java    | 21 +++++++++++++++++++--
 .../LibvirtDeleteVMSnapshotCommandWrapper.java      |  8 ++++++++
 .../router/VirtualNetworkApplianceManager.java      |  2 ++
 .../router/VirtualNetworkApplianceManagerImpl.java  |  7 ++++++-
 systemvm/debian/opt/cloud/bin/baremetal-vr.py       |  8 ++++++++
 systemvm/debian/opt/cloud/bin/cs/CsAddress.py       |  5 ++++-
 systemvm/debian/opt/cloud/bin/cs/CsConfig.py        |  3 +++
 7 files changed, 50 insertions(+), 4 deletions(-)

diff --cc server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManager.java
index eba23f3,c767e56..6edbb44
--- a/server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManager.java
+++ b/server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManager.java
@@@ -71,44 -67,9 +71,46 @@@ public interface VirtualNetworkApplianc
              "If true, router minimum required version is checked before sending command", false);
      static final ConfigKey<Boolean> UseExternalDnsServers = new ConfigKey<Boolean>(Boolean.class, "use.external.dns", "Advanced", "false",
              "Bypass internal dns, use external dns1 and dns2", true, ConfigKey.Scope.Zone, null);
+     static final ConfigKey<Boolean> ExposeDnsAndBootpServer = new ConfigKey<Boolean>(Boolean.class, "expose.dns.externally", "Advanced", "true",
+             "open dns, dhcp and bootp on the public interface", true, ConfigKey.Scope.Zone, null);
  
 +    // Health checks
 +    static final ConfigKey<Boolean> RouterHealthChecksEnabled = new ConfigKey<Boolean>(Boolean.class, "router.health.checks.enabled", "Advanced", "true",
 +            "If true, router health checks are allowed to be executed and read. If false, all scheduled checks and API calls for on demand checks are disabled.",
 +            true, ConfigKey.Scope.Global, null);
 +    static final ConfigKey<Integer> RouterHealthChecksBasicInterval = new ConfigKey<Integer>(Integer.class, "router.health.checks.basic.interval", "Advanced", "3",
 +            "Interval in minutes at which basic router health checks are performed. If set to 0, no tests are scheduled.",
 +            true, ConfigKey.Scope.Global, null);
 +    static final ConfigKey<Integer> RouterHealthChecksAdvancedInterval = new ConfigKey<Integer>(Integer.class, "router.health.checks.advanced.interval", "Advanced", "10",
 +            "Interval in minutes at which advanced router health checks are performed. If set to 0, no tests are scheduled.",
 +            true, ConfigKey.Scope.Global, null);
 +    static final ConfigKey<Integer> RouterHealthChecksConfigRefreshInterval = new ConfigKey<Integer>(Integer.class, RouterHealthChecksConfigRefreshIntervalCK, "Advanced", "10",
 +            "Interval in minutes at which router health checks config - such as scheduling intervals, excluded checks, etc is updated on virtual routers by the management server. This value should" +
 +                    " be sufficiently high (like 2x) from the router.health.checks.basic.interval and router.health.checks.advanced.interval so that there is time between new results generation and results generation for passed data.",
 +            false, ConfigKey.Scope.Global, null);
 +    static final ConfigKey<Integer> RouterHealthChecksResultFetchInterval = new ConfigKey<Integer>(Integer.class, RouterHealthChecksResultFetchIntervalCK, "Advanced", "10",
 +            "Interval in minutes at which router health checks results are fetched by management server. On each result fetch, management server evaluates need to recreate VR as per configuration of " + RouterHealthChecksFailuresToRecreateVrCK +
 +                    "This value should be sufficiently high (like 2x) from the router.health.checks.basic.interval and router.health.checks.advanced.interval so that there is time between new results generation and fetch.",
 +            false, ConfigKey.Scope.Global, null);
 +    static final ConfigKey<String> RouterHealthChecksFailuresToRecreateVr = new ConfigKey<String>(String.class, RouterHealthChecksFailuresToRecreateVrCK, "Advanced", "",
 +            "Health checks failures defined by this config are the checks that should cause router recreation. If empty the recreate is not attempted for any health check failure. Possible values are comma separated script names " +
 +                    "from systemvm’s /root/health_scripts/ (namely - cpu_usage_check.py, dhcp_check.py, disk_space_check.py, dns_check.py, gateways_check.py, haproxy_check.py, iptables_check.py, memory_usage_check.py, router_version_check.py), connectivity.test " +
 +                    " or services (namely - loadbalancing.service, webserver.service, dhcp.service) ",
 +            true, ConfigKey.Scope.Zone, null);
 +    static final ConfigKey<String> RouterHealthChecksToExclude = new ConfigKey<String>(String.class, "router.health.checks.to.exclude", "Advanced", "",
 +            "Health checks that should be excluded when executing scheduled checks on the router. This can be a comma separated list of script names placed in the '/root/health_checks/' folder. Currently the following scripts are " +
 +                    "placed in default systemvm template -  cpu_usage_check.py, disk_space_check.py, gateways_check.py, iptables_check.py, router_version_check.py, dhcp_check.py, dns_check.py, haproxy_check.py, memory_usage_check.py.",
 +            true, ConfigKey.Scope.Zone, null);
 +    static final ConfigKey<Double> RouterHealthChecksFreeDiskSpaceThreshold = new ConfigKey<Double>(Double.class, "router.health.checks.free.disk.space.threshold",
 +            "Advanced", "100", "Free disk space threshold (in MB) on VR below which the check is considered a failure.",
 +            true, ConfigKey.Scope.Zone, null);
 +    static final ConfigKey<Double> RouterHealthChecksMaxCpuUsageThreshold = new ConfigKey<Double>(Double.class, "router.health.checks.max.cpu.usage.threshold",
 +            "Advanced", "100", " Max CPU Usage threshold as % above which check is considered a failure.",
 +            true, ConfigKey.Scope.Zone, null);
 +    static final ConfigKey<Double> RouterHealthChecksMaxMemoryUsageThreshold = new ConfigKey<Double>(Double.class, "router.health.checks.max.memory.usage.threshold",
 +            "Advanced", "100", "Max Memory Usage threshold as % above which check is considered a failure.",
 +            true, ConfigKey.Scope.Zone, null);
 +
      public static final int DEFAULT_ROUTER_VM_RAMSIZE = 256;            // 256M
      public static final int DEFAULT_ROUTER_CPU_MHZ = 500;                // 500 MHz
      public static final boolean USE_POD_VLAN = false;
diff --cc server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index 8f1f70b,22a208e..c895307
--- a/server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@@ -3237,22 -2601,7 +3241,23 @@@ Configurable, StateListener<VirtualMach
  
      @Override
      public ConfigKey<?>[] getConfigKeys() {
 -        return new ConfigKey<?>[] { UseExternalDnsServers, routerVersionCheckEnabled, SetServiceMonitor, RouterAlertsCheckInterval, ExposeDnsAndBootpServer };
 +        return new ConfigKey<?>[] {
 +                UseExternalDnsServers,
 +                RouterVersionCheckEnabled,
 +                SetServiceMonitor,
 +                RouterAlertsCheckInterval,
 +                RouterHealthChecksEnabled,
 +                RouterHealthChecksBasicInterval,
 +                RouterHealthChecksAdvancedInterval,
 +                RouterHealthChecksConfigRefreshInterval,
 +                RouterHealthChecksResultFetchInterval,
 +                RouterHealthChecksFailuresToRecreateVr,
 +                RouterHealthChecksToExclude,
 +                RouterHealthChecksFreeDiskSpaceThreshold,
 +                RouterHealthChecksMaxCpuUsageThreshold,
-                 RouterHealthChecksMaxMemoryUsageThreshold
++                RouterHealthChecksMaxMemoryUsageThreshold,
++                ExposeDnsAndBootpServer
 +        };
      }
  
      @Override