From 8dfb68cf1c956d22d817d8414196919f697b51a4 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Sat, 11 Mar 2017 18:28:31 -0800 Subject: [PATCH] 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 --- modules/transport-netty4/build.gradle | 53 ++++++------------- .../netty-buffer-4.1.8.Final.jar.sha1 | 1 - .../netty-buffer-4.1.9.Final.jar.sha1 | 1 + .../licenses/netty-codec-4.1.8.Final.jar.sha1 | 1 - .../licenses/netty-codec-4.1.9.Final.jar.sha1 | 1 + .../netty-codec-http-4.1.8.Final.jar.sha1 | 1 - .../netty-codec-http-4.1.9.Final.jar.sha1 | 1 + .../netty-common-4.1.8.Final.jar.sha1 | 1 - .../netty-common-4.1.9.Final.jar.sha1 | 1 + .../netty-handler-4.1.8.Final.jar.sha1 | 1 - .../netty-handler-4.1.9.Final.jar.sha1 | 1 + .../netty-resolver-4.1.8.Final.jar.sha1 | 1 - .../netty-resolver-4.1.9.Final.jar.sha1 | 1 + .../netty-transport-4.1.8.Final.jar.sha1 | 1 - .../netty-transport-4.1.9.Final.jar.sha1 | 1 + .../plugin-metadata/plugin-security.policy | 4 +- .../Netty4HttpServerTransportTests.java | 2 - 17 files changed, 26 insertions(+), 47 deletions(-) delete mode 100644 modules/transport-netty4/licenses/netty-buffer-4.1.8.Final.jar.sha1 create mode 100644 modules/transport-netty4/licenses/netty-buffer-4.1.9.Final.jar.sha1 delete mode 100644 modules/transport-netty4/licenses/netty-codec-4.1.8.Final.jar.sha1 create mode 100644 modules/transport-netty4/licenses/netty-codec-4.1.9.Final.jar.sha1 delete mode 100644 modules/transport-netty4/licenses/netty-codec-http-4.1.8.Final.jar.sha1 create mode 100644 modules/transport-netty4/licenses/netty-codec-http-4.1.9.Final.jar.sha1 delete mode 100644 modules/transport-netty4/licenses/netty-common-4.1.8.Final.jar.sha1 create mode 100644 modules/transport-netty4/licenses/netty-common-4.1.9.Final.jar.sha1 delete mode 100644 modules/transport-netty4/licenses/netty-handler-4.1.8.Final.jar.sha1 create mode 100644 modules/transport-netty4/licenses/netty-handler-4.1.9.Final.jar.sha1 delete mode 100644 modules/transport-netty4/licenses/netty-resolver-4.1.8.Final.jar.sha1 create mode 100644 modules/transport-netty4/licenses/netty-resolver-4.1.9.Final.jar.sha1 delete mode 100644 modules/transport-netty4/licenses/netty-transport-4.1.8.Final.jar.sha1 create mode 100644 modules/transport-netty4/licenses/netty-transport-4.1.9.Final.jar.sha1 diff --git a/modules/transport-netty4/build.gradle b/modules/transport-netty4/build.gradle index 6afea402c6e..f671bc5ff66 100644 --- a/modules/transport-netty4/build.gradle +++ b/modules/transport-netty4/build.gradle @@ -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', diff --git a/modules/transport-netty4/licenses/netty-buffer-4.1.8.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-buffer-4.1.8.Final.jar.sha1 deleted file mode 100644 index b3a7428537f..00000000000 --- a/modules/transport-netty4/licenses/netty-buffer-4.1.8.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -43292c2622e340a0d07178c341ca3bdf3d662034 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-buffer-4.1.9.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-buffer-4.1.9.Final.jar.sha1 new file mode 100644 index 00000000000..854be4c3445 --- /dev/null +++ b/modules/transport-netty4/licenses/netty-buffer-4.1.9.Final.jar.sha1 @@ -0,0 +1 @@ +6ec75e26374569ec0120c63c50fb930c48270e0d \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-codec-4.1.8.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-codec-4.1.8.Final.jar.sha1 deleted file mode 100644 index 3d1bdc03775..00000000000 --- a/modules/transport-netty4/licenses/netty-codec-4.1.8.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1bd0a2d032e5c7fc3f42c1b483d0f4c57eb516a3 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-codec-4.1.9.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-codec-4.1.9.Final.jar.sha1 new file mode 100644 index 00000000000..8a8de39f55e --- /dev/null +++ b/modules/transport-netty4/licenses/netty-codec-4.1.9.Final.jar.sha1 @@ -0,0 +1 @@ +f41b5fdaaaf7b1e8de4e05be5f5b540f3b205959 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-codec-http-4.1.8.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-codec-http-4.1.8.Final.jar.sha1 deleted file mode 100644 index 246565fcd2f..00000000000 --- a/modules/transport-netty4/licenses/netty-codec-http-4.1.8.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1e88617c4a6c88da7e86fdbbd9494d22a250c879 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-codec-http-4.1.9.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-codec-http-4.1.9.Final.jar.sha1 new file mode 100644 index 00000000000..650fdc87fce --- /dev/null +++ b/modules/transport-netty4/licenses/netty-codec-http-4.1.9.Final.jar.sha1 @@ -0,0 +1 @@ +efb68f8ce201d180fdbbec8ade5e25684cae12bc \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-common-4.1.8.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-common-4.1.8.Final.jar.sha1 deleted file mode 100644 index 36b4992d4c7..00000000000 --- a/modules/transport-netty4/licenses/netty-common-4.1.8.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -ee62c80318413d2375d145e51e48d7d35c901324 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-common-4.1.9.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-common-4.1.9.Final.jar.sha1 new file mode 100644 index 00000000000..8caab14c0cf --- /dev/null +++ b/modules/transport-netty4/licenses/netty-common-4.1.9.Final.jar.sha1 @@ -0,0 +1 @@ +7c6ba17f3b9e08fbbfc000fa3ce46208446a0019 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-handler-4.1.8.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-handler-4.1.8.Final.jar.sha1 deleted file mode 100644 index 715ad349a30..00000000000 --- a/modules/transport-netty4/licenses/netty-handler-4.1.8.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -db01139bfb11afd009a695eef55b43bbf22c4ef5 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-handler-4.1.9.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-handler-4.1.9.Final.jar.sha1 new file mode 100644 index 00000000000..97609dafe6b --- /dev/null +++ b/modules/transport-netty4/licenses/netty-handler-4.1.9.Final.jar.sha1 @@ -0,0 +1 @@ +e8caa6945995ccd03b232d6b31ee698668b47a1f \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-resolver-4.1.8.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-resolver-4.1.8.Final.jar.sha1 deleted file mode 100644 index 25f58561b95..00000000000 --- a/modules/transport-netty4/licenses/netty-resolver-4.1.8.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -2e116cdd5edc01b2305072b1dbbd17c0595dbfef \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-resolver-4.1.9.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-resolver-4.1.9.Final.jar.sha1 new file mode 100644 index 00000000000..fd603aba4c6 --- /dev/null +++ b/modules/transport-netty4/licenses/netty-resolver-4.1.9.Final.jar.sha1 @@ -0,0 +1 @@ +9e1f26ad1988fcbe0fc824940dfe6de9d2f438da \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-transport-4.1.8.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-transport-4.1.8.Final.jar.sha1 deleted file mode 100644 index fa27b64d4b6..00000000000 --- a/modules/transport-netty4/licenses/netty-transport-4.1.8.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -905b5dadce881c9824b3039c0df36dabbb7b6a07 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-transport-4.1.9.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-transport-4.1.9.Final.jar.sha1 new file mode 100644 index 00000000000..38dca13ff99 --- /dev/null +++ b/modules/transport-netty4/licenses/netty-transport-4.1.9.Final.jar.sha1 @@ -0,0 +1 @@ +aaeed88d6a5c0bfc8d7a78225f4f093544470f5a \ No newline at end of file diff --git a/modules/transport-netty4/src/main/plugin-metadata/plugin-security.policy b/modules/transport-netty4/src/main/plugin-metadata/plugin-security.policy index f19dfdbf201..8853d2ac69d 100644 --- a/modules/transport-netty4/src/main/plugin-metadata/plugin-security.policy +++ b/modules/transport-netty4/src/main/plugin-metadata/plugin-security.policy @@ -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"; diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpServerTransportTests.java b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpServerTransportTests.java index 7a942f8853a..9fc7720c370 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpServerTransportTests.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpServerTransportTests.java @@ -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); }