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

nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/master by this push:
     new 38d00a6  fix(jvm): Bind all interfaces to restore remote debugging 
with newer JDK versions
38d00a6 is described below

commit 38d00a6dbebb93818185aef45106ae7b66fbc046
Author: Antonin Stefanutti <anto...@stefanutti.fr>
AuthorDate: Fri Jun 5 15:05:06 2020 +0200

    fix(jvm): Bind all interfaces to restore remote debugging with newer JDK 
versions
---
 deploy/traits.yaml                 | 3 ++-
 docs/modules/traits/pages/jvm.adoc | 2 +-
 pkg/trait/jvm.go                   | 7 +++----
 pkg/trait/jvm_test.go              | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/deploy/traits.yaml b/deploy/traits.yaml
index 19d78b6..847c167 100755
--- a/deploy/traits.yaml
+++ b/deploy/traits.yaml
@@ -415,7 +415,8 @@ traits:
     description: Suspends the target JVM immediately before the main class is 
loaded
   - name: debug-address
     type: string
-    description: Transport address at which to listen for the newly launched 
JVM
+    description: Transport address at which to listen for the newly launched 
JVM (default
+      `*:5005`)
   - name: options
     type: string
     description: A comma-separated list of JVM options
diff --git a/docs/modules/traits/pages/jvm.adoc 
b/docs/modules/traits/pages/jvm.adoc
index d395980..bd94aac 100755
--- a/docs/modules/traits/pages/jvm.adoc
+++ b/docs/modules/traits/pages/jvm.adoc
@@ -36,7 +36,7 @@ The following configuration options are available:
 
 | jvm.debug-address
 | string
-| Transport address at which to listen for the newly launched JVM
+| Transport address at which to listen for the newly launched JVM (default 
`*:5005`)
 
 | jvm.options
 | string
diff --git a/pkg/trait/jvm.go b/pkg/trait/jvm.go
index e09c2c5..f7b4acb 100644
--- a/pkg/trait/jvm.go
+++ b/pkg/trait/jvm.go
@@ -44,7 +44,7 @@ type jvmTrait struct {
        Debug bool `property:"debug"`
        // Suspends the target JVM immediately before the main class is loaded
        DebugSuspend bool `property:"debug-suspend"`
-       // Transport address at which to listen for the newly launched JVM
+       // Transport address at which to listen for the newly launched JVM 
(default `*:5005`)
        DebugAddress string `property:"debug-address"`
        // A comma-separated list of JVM options
        Options *string `property:"options"`
@@ -54,9 +54,8 @@ type jvmTrait struct {
 
 func newJvmTrait() Trait {
        return &jvmTrait{
-               BaseTrait: NewBaseTrait("jvm", 2000),
-               // To be defaulted to "*:5005" when upgrading the default base 
image to JDK9+
-               DebugAddress: "5005",
+               BaseTrait:    NewBaseTrait("jvm", 2000),
+               DebugAddress: "*:5005",
                PrintCommand: true,
        }
 }
diff --git a/pkg/trait/jvm_test.go b/pkg/trait/jvm_test.go
index 9309384..df97459 100644
--- a/pkg/trait/jvm_test.go
+++ b/pkg/trait/jvm_test.go
@@ -174,7 +174,7 @@ func TestApplyJvmTraitWithDebugEnabled(t *testing.T) {
        assert.Nil(t, err)
 
        assert.Contains(t, d.Spec.Template.Spec.Containers[0].Args,
-               
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005",
+               
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005",
        )
 }
 

Reply via email to