zhihai xu created YARN-3106: ------------------------------- Summary: The message in IllegalArgumentException gave wrong information in NMTokenSecretManagerInRM.java and RMContainerTokenSecretManager.java Key: YARN-3106 URL: https://issues.apache.org/jira/browse/YARN-3106 Project: Hadoop YARN Issue Type: Bug Components: resourcemanager Reporter: zhihai xu Assignee: zhihai xu Priority: Minor
The message in IllegalArgumentException gave wrong information in NMTokenSecretManagerInRM.java and RMContainerTokenSecretManager.java. We saw this error message: {code} Error starting ResourceManager java.lang.IllegalArgumentException: yarn.resourcemanager.nm-tokens.master-key-rolling-interval-secs should be more than 2 X yarn.nm.liveness-monitor.expiry-interval-ms {code} After I checked the source code, I find this error message misleading. The following is code from NMTokenSecretManagerInRM.java {code} rollingInterval = this.conf.getLong( YarnConfiguration.RM_NMTOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS, YarnConfiguration.DEFAULT_RM_NMTOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS) * 1000; this.activationDelay = (long) (conf.getLong(YarnConfiguration.RM_NM_EXPIRY_INTERVAL_MS, YarnConfiguration.DEFAULT_RM_NM_EXPIRY_INTERVAL_MS) * 1.5); LOG.info("NMTokenKeyRollingInterval: " + this.rollingInterval + "ms and NMTokenKeyActivationDelay: " + this.activationDelay + "ms"); if (rollingInterval <= activationDelay * 2) { throw new IllegalArgumentException( YarnConfiguration.RM_NMTOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS + " should be more than 2 X " + YarnConfiguration.RM_NM_EXPIRY_INTERVAL_MS); } {code} It should be 3 X not 2 X. Same error also happened in RMContainerTokenSecretManager.java. {code} this.rollingInterval = conf.getLong( YarnConfiguration.RM_CONTAINER_TOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS, YarnConfiguration.DEFAULT_RM_CONTAINER_TOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS) * 1000; this.activationDelay = (long) (conf.getLong(YarnConfiguration.RM_NM_EXPIRY_INTERVAL_MS, YarnConfiguration.DEFAULT_RM_NM_EXPIRY_INTERVAL_MS) * 1.5); LOG.info("ContainerTokenKeyRollingInterval: " + this.rollingInterval + "ms and ContainerTokenKeyActivationDelay: " + this.activationDelay + "ms"); if (rollingInterval <= activationDelay * 2) { throw new IllegalArgumentException( YarnConfiguration.RM_CONTAINER_TOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS + " should be more than 2 X " +YarnConfiguration.RM_CONTAINER_TOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)