Upgrade to Netty 4.1.9

This commit upgrades the Netty dependencies from version 4.1.8 to
version 4.1.9. This commit picks up a few bug fixes that impacted us:
 - Netty was incorrectly ignoring interfaces with self-assigned MAC
   addresses (e.g., instances running in Docker containers or on EC2)
 - incorrect handling of the Expect: 100-continue header

Relates #23540
This commit is contained in:
Jason Tedor 2017-03-11 18:28:31 -08:00 committed by GitHub
parent 6f7cd71e1f
commit 8dfb68cf1c
17 changed files with 26 additions and 47 deletions

View File

@ -34,13 +34,13 @@ compileTestJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-rawtypes,-tr
dependencies {
// network stack
compile "io.netty:netty-buffer:4.1.8.Final"
compile "io.netty:netty-codec:4.1.8.Final"
compile "io.netty:netty-codec-http:4.1.8.Final"
compile "io.netty:netty-common:4.1.8.Final"
compile "io.netty:netty-handler:4.1.8.Final"
compile "io.netty:netty-resolver:4.1.8.Final"
compile "io.netty:netty-transport:4.1.8.Final"
compile "io.netty:netty-buffer:4.1.9.Final"
compile "io.netty:netty-codec:4.1.9.Final"
compile "io.netty:netty-codec-http:4.1.9.Final"
compile "io.netty:netty-common:4.1.9.Final"
compile "io.netty:netty-handler:4.1.9.Final"
compile "io.netty:netty-resolver:4.1.9.Final"
compile "io.netty:netty-transport:4.1.9.Final"
}
dependencyLicenses {
@ -61,11 +61,10 @@ thirdPartyAudit.excludes = [
'org.apache.commons.logging.LogFactory',
// from io.netty.handler.ssl.OpenSslEngine (netty)
'org.apache.tomcat.jni.Buffer',
'org.apache.tomcat.jni.Library',
'org.apache.tomcat.jni.Pool',
'org.apache.tomcat.jni.SSL',
'org.apache.tomcat.jni.SSLContext',
'io.netty.internal.tcnative.Buffer',
'io.netty.internal.tcnative.Library',
'io.netty.internal.tcnative.SSL',
'io.netty.internal.tcnative.SSLContext',
// from io.netty.handler.ssl.util.BouncyCastleSelfSignedCertGenerator (netty)
'org.bouncycastle.asn1.x500.X500Name',
@ -112,45 +111,28 @@ thirdPartyAudit.excludes = [
'com.ning.compress.lzf.LZFEncoder',
'com.ning.compress.lzf.util.ChunkDecoderFactory',
'com.ning.compress.lzf.util.ChunkEncoderFactory',
'javassist.ClassClassPath',
'javassist.ClassPath',
'javassist.ClassPool',
'javassist.CtClass',
'javassist.CtMethod',
'lzma.sdk.lzma.Encoder',
'net.jpountz.lz4.LZ4Compressor',
'net.jpountz.lz4.LZ4Factory',
'net.jpountz.lz4.LZ4FastDecompressor',
'net.jpountz.xxhash.StreamingXXHash32',
'net.jpountz.xxhash.XXHashFactory',
'org.apache.tomcat.Apr',
'org.apache.tomcat.jni.CertificateRequestedCallback',
'org.apache.tomcat.jni.CertificateRequestedCallback$KeyMaterial',
'org.apache.tomcat.jni.CertificateVerifier',
'org.apache.tomcat.jni.SessionTicketKey',
'io.netty.internal.tcnative.CertificateRequestedCallback',
'io.netty.internal.tcnative.CertificateRequestedCallback$KeyMaterial',
'io.netty.internal.tcnative.CertificateVerifier',
'io.netty.internal.tcnative.SessionTicketKey',
'org.eclipse.jetty.alpn.ALPN$ClientProvider',
'org.eclipse.jetty.alpn.ALPN$ServerProvider',
'org.eclipse.jetty.alpn.ALPN',
'io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator',
'io.netty.util.internal.PlatformDependent0',
'io.netty.util.internal.PlatformDependent0$1',
'io.netty.util.internal.PlatformDependent0$2',
'io.netty.util.internal.PlatformDependent0$3',
'io.netty.util.internal.chmv8.ConcurrentHashMapV8',
'io.netty.util.internal.chmv8.ConcurrentHashMapV8$1',
'io.netty.util.internal.chmv8.ConcurrentHashMapV8$TreeBin',
'io.netty.util.internal.chmv8.CountedCompleter',
'io.netty.util.internal.chmv8.CountedCompleter$1',
'io.netty.util.internal.chmv8.ForkJoinPool',
'io.netty.util.internal.chmv8.ForkJoinPool$2',
'io.netty.util.internal.chmv8.ForkJoinPool$WorkQueue',
'io.netty.util.internal.chmv8.ForkJoinTask',
'io.netty.util.internal.chmv8.ForkJoinTask$1',
'io.netty.util.internal.chmv8.Striped64',
'io.netty.util.internal.chmv8.Striped64$1',
'io.netty.util.internal.chmv8.Striped64$Cell',
'io.netty.util.internal.shaded.org.jctools.queues.BaseLinkedQueueConsumerNodeRef',
'io.netty.util.internal.shaded.org.jctools.queues.BaseLinkedQueueProducerNodeRef',
'io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueue',
'io.netty.util.internal.shaded.org.jctools.queues.ConcurrentSequencedCircularArrayQueue',
'io.netty.util.internal.shaded.org.jctools.queues.LinkedQueueNode',
'io.netty.util.internal.shaded.org.jctools.queues.MpmcArrayQueueConsumerField',
@ -158,7 +140,6 @@ thirdPartyAudit.excludes = [
'io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueConsumerField',
'io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueHeadLimitField',
'io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueTailField',
'io.netty.util.internal.shaded.org.jctools.queues.MpscChunkedArrayQueue',
'io.netty.util.internal.shaded.org.jctools.util.JvmInfo',
'io.netty.util.internal.shaded.org.jctools.util.UnsafeAccess',
'io.netty.util.internal.shaded.org.jctools.util.UnsafeRefArrayAccess',

View File

@ -1 +0,0 @@
43292c2622e340a0d07178c341ca3bdf3d662034

View File

@ -0,0 +1 @@
6ec75e26374569ec0120c63c50fb930c48270e0d

View File

@ -1 +0,0 @@
1bd0a2d032e5c7fc3f42c1b483d0f4c57eb516a3

View File

@ -0,0 +1 @@
f41b5fdaaaf7b1e8de4e05be5f5b540f3b205959

View File

@ -1 +0,0 @@
1e88617c4a6c88da7e86fdbbd9494d22a250c879

View File

@ -0,0 +1 @@
efb68f8ce201d180fdbbec8ade5e25684cae12bc

View File

@ -1 +0,0 @@
ee62c80318413d2375d145e51e48d7d35c901324

View File

@ -0,0 +1 @@
7c6ba17f3b9e08fbbfc000fa3ce46208446a0019

View File

@ -1 +0,0 @@
db01139bfb11afd009a695eef55b43bbf22c4ef5

View File

@ -0,0 +1 @@
e8caa6945995ccd03b232d6b31ee698668b47a1f

View File

@ -1 +0,0 @@
2e116cdd5edc01b2305072b1dbbd17c0595dbfef

View File

@ -0,0 +1 @@
9e1f26ad1988fcbe0fc824940dfe6de9d2f438da

View File

@ -1 +0,0 @@
905b5dadce881c9824b3039c0df36dabbb7b6a07

View File

@ -0,0 +1 @@
aaeed88d6a5c0bfc8d7a78225f4f093544470f5a

View File

@ -17,7 +17,7 @@
* under the License.
*/
grant codeBase "${codebase.netty-common-4.1.8.Final.jar}" {
grant codeBase "${codebase.netty-common-4.1.9.Final.jar}" {
// for reading the system-wide configuration for the backlog of established sockets
permission java.io.FilePermission "/proc/sys/net/core/somaxconn", "read";
@ -25,7 +25,7 @@ grant codeBase "${codebase.netty-common-4.1.8.Final.jar}" {
permission java.net.SocketPermission "*", "accept,connect";
};
grant codeBase "${codebase.netty-transport-4.1.8.Final.jar}" {
grant codeBase "${codebase.netty-transport-4.1.9.Final.jar}" {
// Netty NioEventLoop wants to change this, because of https://bugs.openjdk.java.net/browse/JDK-6427854
// the bug says it only happened rarely, and that its fixed, but apparently it still happens rarely!
permission java.util.PropertyPermission "sun.nio.ch.bugLevel", "write";

View File

@ -153,7 +153,6 @@ public class Netty4HttpServerTransportTests extends ESTestCase {
* with a 413 status.
* @throws InterruptedException if the client communication with the server is interrupted
*/
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/23172")
public void testExpectContinueHeaderContentLengthTooLong() throws InterruptedException {
final String key = HttpTransportSettings.SETTING_HTTP_MAX_CONTENT_LENGTH.getKey();
final int maxContentLength = randomIntBetween(1, 104857600);
@ -167,7 +166,6 @@ public class Netty4HttpServerTransportTests extends ESTestCase {
* Test that {@link Netty4HttpServerTransport} responds to an unsupported expectation with a 417 status.
* @throws InterruptedException if the client communication with the server is interrupted
*/
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/23172")
public void testExpectUnsupportedExpectation() throws InterruptedException {
runExpectHeaderTest(Settings.EMPTY, "chocolate=yummy", 0, HttpResponseStatus.EXPECTATION_FAILED);
}