private static boolean useSSL = false;
private static ICertificateManager certManagerSrv = null;
+ private static int jsonRpcDecoderMaxFrameLength = 100000;
+
private static final StalePassiveConnectionService STALE_PASSIVE_CONNECTION_SERVICE =
new StalePassiveConnectionService(executorService);
}
channel.pipeline().addLast(
//new LoggingHandler(LogLevel.INFO),
- new JsonRpcDecoder(100000),
+ new JsonRpcDecoder(jsonRpcDecoderMaxFrameLength),
new StringEncoder(CharsetUtil.UTF_8),
new IdleStateHandler(IDLE_READER_TIMEOUT, 0, 0),
new ReadTimeoutHandler(READ_TIMEOUT),
}
channel.pipeline().addLast(
- new JsonRpcDecoder(100000),
+ new JsonRpcDecoder(jsonRpcDecoderMaxFrameLength),
new StringEncoder(CharsetUtil.UTF_8),
new IdleStateHandler(IDLE_READER_TIMEOUT, 0, 0),
new ReadTimeoutHandler(READ_TIMEOUT),
certManagerSrv = certificateManagerSrv;
}
+ /**
+ * Blueprint property setter method. Blueprint call this method and set the value of json rpc decoder
+ * max frame length to the value configured for config option (json-rpc-decoder-max-frame-length) in
+ * the configuration file. This option is only configured at the boot time of the controller. Any
+ * change at the run time will have no impact.
+ * @param maxFrameLength Max frame length (default : 100000)
+ */
+ public void setJsonRpcDecoderMaxFrameLength(int maxFrameLength) {
+ jsonRpcDecoderMaxFrameLength = maxFrameLength;
+ LOG.info("Json Rpc Decoder Max Frame Length set to : {}", jsonRpcDecoderMaxFrameLength);
+ }
+
public void updateConfigParameter(Map<String, Object> configParameters) {
LOG.debug("Config parameters received : {}", configParameters.entrySet());
if (configParameters != null && !configParameters.isEmpty()) {
-#Timeout value (in millisecond) after which OVSDB rpc task will be cancelled.
-#Default value is set to 1000ms, please uncomment and override the value if requires
-#Changing the value don't require controller restart.
-# ovsdb-rpc-task-timeout = 1000
+#********************************************************************************************
+# Boot Time Configuration *
+# Config knob changes will require controller restart *
+#********************************************************************************************
+
#This flag will be enforced across all the connection's (passive and active) if set to true
-# use-ssl = false
+use-ssl = false
+
+#Set Json Rpc decoder max frame length value. If the OVSDB node contains large configurations
+#that can cause connection related issue while reading the configuration from the OVSDB node
+#database. Increasing the max frame lenge helps resolve the issue. Please see following bug
+#report for more details ( https://bugs.opendaylight.org/show_bug.cgi?id=2732 &
+#https://bugs.opendaylight.org/show_bug.cgi?id=2487). Default value set to 100000.
+json-rpc-decoder-max-frame-length = 100000
+
+
+#********************************************************************************************
+# Run Time Configuration *
+# Config knob changes doesn't require controller resart *
+#********************************************************************************************
+#Timeout value (in millisecond) after which OVSDB rpc task will be cancelled.Default value is
+#set to 1000ms, please uncomment and override the value if requires.Changing the value don't
+#require controller restart.
+ovsdb-rpc-task-timeout = 1000
+
<cm:default-properties>
<cm:property name="ovsdb-rpc-task-timeout" value="1000"/>
<cm:property name="use-ssl" value="false"/>
+ <cm:property name="json-rpc-decoder-max-frame-length" value="100000"/>
</cm:default-properties>
</cm:property-placeholder>
<property name="ovsdbRpcTaskTimeout" value="${ovsdb-rpc-task-timeout}"/>
<property name="useSsl" value="${use-ssl}"/>
<property name="certificatManager" ref="aaaCertificateManager"/>
+ <property name="jsonRpcDecoderMaxFrameLength" value="${json-rpc-decoder-max-frame-length}"/>
</bean>
<!-- Notify OvsdbConnectionService with any change in the config properties value-->