[
https://issues.jboss.org/browse/JBIDE-25611?page=com.atlassian.jira.plugi...
]
Andre Dietisheim edited comment on JBIDE-25611 at 1/26/18 6:11 AM:
-------------------------------------------------------------------
I get even more confused than I was before. What above failed all day long now seems to
magically work. I can deploy and debug an app that I created via a nodejs:builder image.
The case where I create an app via template "nodejs-mongo-persitent" now fails
with a different error:
!image-2018-01-26-00-49-39-691.png!
It now doesn't get the docker image labels that indicate where to deploy to within the
pod. The issue is caused by unexpectedly shaped resources:
The tooling tries to retrieve the deployment config where it would find the deployment
change triggers which holds the docker image uri. There are 2 strategies to get the dc
from the service, both fail.
* [Strategy
1)|https://github.com/jbosstools/jbosstools-openshift/blob/master/plugins...]
get dc name from selector "deploymentconfig" in service. Fails because
there's no such selector
{code}
"selector" : {"name" : "nodejs-mongo-persistent"},
{code}
* [Strategy
2)|https://github.com/jbosstools/jbosstools-openshift/blob/master/plugins...]
get dc by hopping svc -> rc -> pod -> dc. This fails because the rc is found but
the pods matching the rc are not. The reason for this is that pod#labels [dont
match|https://github.com/jbosstools/jbosstools-openshift/blob/master/plug...]
the rc#replicaSelectors
the rc:
{code}
{
"metadata" : {
"name" : "nodejs-3-vgqdt",
"generateName" : "nodejs-3-",
"namespace" : "adietish-stage",
"selfLink" :
"/api/v1/namespaces/adietish-stage/pods/nodejs-3-vgqdt",
"uid" : "38778443-0229-11e8-b468-02d7377a4b17",
"resourceVersion" : "840363887",
"creationTimestamp" : "2018-01-25T23:41:09Z",
"labels" : {
"deployment" : "nodejs-3",
"deploymentconfig" : "nodejs"
},
"annotations" : {
"kubernetes.io/created-by" :
"{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicationController\",\"namespace\":\"adietish-stage\",\"name\":\"nodejs-3\",\"uid\":\"c80559ee-0228-11e8-b468-02d7377a4b17\",\"apiVersion\":\"v1\",\"resourceVersion\":\"838522089\"}}\n",
"kubernetes.io/limit-ranger" : "LimitRanger plugin set: cpu,
memory request for container nodejs; cpu, memory limit for container nodejs",
"openshift.io/deployment-config.latest-version" : "3",
"openshift.io/deployment-config.name" : "nodejs",
"openshift.io/deployment.name" : "nodejs-3",
"openshift.io/scc" : "restricted"
}
},
"spec" : {
"volumes" : [{
"name" : "default-token-k92bn",
"secret" : {
"secretName" : "default-token-k92bn",
"defaultMode" : 420
}
}],
"containers" : [{
"name" : "nodejs",
"image" :
"172.30.98.11:5000/adietish-stage/nodejs@sha256:246763270f6d67ff3c31fab2e65be181822ff7f0811c376c73857622bbedafe8",
"ports" : [
{
"name" : "8080-tcp",
"containerPort" : 8080,
"protocol" : "TCP"
},
{
"name" : "debug",
"containerPort" : 5858,
"protocol" : "TCP"
}
],
"env" : [
{
"name" : "DEBUG_PORT",
"value" : "5858"
},
{
"name" : "DEV_MODE",
"value" : "true"
}
],
"resources" : {
"limits" : {
"cpu" : "1",
"memory" : "512Mi"
},
"requests" : {
"cpu" : "60m",
"memory" : "307Mi"
}
},
"volumeMounts" : [{
"name" : "default-token-k92bn",
"readOnly" : true,
"mountPath" :
"/var/run/secrets/kubernetes.io/serviceaccount"
}],
"terminationMessagePath" : "/dev/termination-log",
"terminationMessagePolicy" : "File",
"imagePullPolicy" : "Always",
"securityContext" : {
"capabilities" : {"drop" : [
"KILL",
"MKNOD",
"NET_RAW",
"SETGID",
"SETUID"
]},
"privileged" : false,
"seLinuxOptions" : {"level" :
"s0:c147,c129"},
"runAsUser" : 1021720000
}
}],
"restartPolicy" : "Always",
"terminationGracePeriodSeconds" : 30,
"dnsPolicy" : "ClusterFirst",
"nodeSelector" : {"type" : "compute"},
"serviceAccountName" : "default",
"serviceAccount" : "default",
"nodeName" : "ip-172-31-69-160.us-east-2.compute.internal",
"securityContext" : {
"seLinuxOptions" : {"level" : "s0:c147,c129"},
"fsGroup" : 1021720000
},
"imagePullSecrets" : [{"name" :
"default-dockercfg-nstt4"}],
"schedulerName" : "default-scheduler"
},
"status" : {
"phase" : "Pending",
"conditions" : [
{
"type" : "Initialized",
"status" : "True",
"lastTransitionTime" : "2018-01-25T23:41:09Z"
},
{
"type" : "Ready",
"status" : "False",
"lastTransitionTime" : "2018-01-25T23:41:09Z",
"reason" : "ContainersNotReady",
"message" : "containers with unready status:
[nodejs]"
},
{
"type" : "PodScheduled",
"status" : "True",
"lastTransitionTime" : "2018-01-25T23:41:09Z"
}
],
"hostIP" : "172.31.69.160",
"podIP" : "10.128.100.151",
"startTime" : "2018-01-25T23:41:09Z",
"containerStatuses" : [{
"name" : "nodejs",
"state" : {"waiting" : {
"reason" : "ImagePullBackOff",
"message" : "Back-off pulling image
\"172.30.98.11:5000/adietish-stage/nodejs@sha256:246763270f6d67ff3c31fab2e65be181822ff7f0811c376c73857622bbedafe8\""
}},
"lastState" : {},
"ready" : false,
"restartCount" : 0,
"image" :
"172.30.98.11:5000/adietish-stage/nodejs@sha256:246763270f6d67ff3c31fab2e65be181822ff7f0811c376c73857622bbedafe8",
"imageID" : ""
}],
"qosClass" : "Burstable"
},
"kind" : "Pod",
"apiVersion" : "v1"
}
{code}
the pod:
{code}
{
"metadata" : {
"name" : "nodejs-mongo-persistent-1",
"namespace" : "adietish-stage",
"selfLink" :
"/api/v1/namespaces/adietish-stage/replicationcontrollers/nodejs-mongo-persistent-1",
"uid" : "58827554-0229-11e8-b468-02d7377a4b17",
"resourceVersion" : "838552703",
"generation" : 3,
"creationTimestamp" : "2018-01-25T23:42:03Z",
"labels" : {
"openshift.io/deployment-config.name" :
"nodejs-mongo-persistent",
"template" : "nodejs-mongo-persistent"
},
"annotations" : {
"kubectl.kubernetes.io/desired-replicas" : "1",
"openshift.io/deployer-pod.completed-at" : "2018-01-25 23:52:06
+0000 UTC",
"openshift.io/deployer-pod.created-at" : "2018-01-25 23:42:04
+0000 UTC",
"openshift.io/deployer-pod.name" :
"nodejs-mongo-persistent-1-deploy",
"openshift.io/deployment-config.latest-version" : "1",
"openshift.io/deployment-config.name" :
"nodejs-mongo-persistent",
"openshift.io/deployment.phase" : "Failed",
"openshift.io/deployment.replicas" : "0",
"openshift.io/deployment.status-reason" : "config
change",
"openshift.io/encoded-deployment-config" :
"{\"kind\":\"DeploymentConfig\",\"apiVersion\":\"v1\",\"metadata\":{\"name\":\"nodejs-mongo-persistent\",\"namespace\":\"adietish-stage\",\"selfLink\":\"/apis/apps.openshift.io/v1/namespaces/adietish-stage/deploymentconfigs/nodejs-mongo-persistent\",\"uid\":\"49f1c655-0229-11e8-b468-02d7377a4b17\",\"resourceVersion\":\"838525030\",\"generation\":2,\"creationTimestamp\":\"2018-01-25T23:41:39Z\",\"labels\":{\"template\":\"nodejs-mongo-persistent\"},\"annotations\":{\"description\":\"Defines
how to deploy the application
server\",\"template.alpha.openshift.io/wait-for-ready\":\"true\"}},\"spec\":{\"strategy\":{\"type\":\"Recreate\",\"recreateParams\":{\"timeoutSeconds\":600},\"resources\":{},\"activeDeadlineSeconds\":21600},\"triggers\":[{\"type\":\"ImageChange\",\"imageChangeParams\":{\"automatic\":true,\"containerNames\":[\"nodejs-mongo-persistent\"],\"from\":{\"kind\":\"ImageStreamTag\",\"namespace\":\"adietish-stage\",\"name\":\"nodejs-mongo-persistent:latest\"},\"lastTriggeredImage\":\"172.30.98.11:5000/adietish-stage/nodejs-mongo-persistent@sha256:1f588995c3ed053bf5d548518094347c7fe4b41595cb7c452bb0f5469e69922d\"}},{\"type\":\"ConfigChange\"}],\"replicas\":1,\"test\":false,\"selector\":{\"name\":\"nodejs-mongo-persistent\"},\"template\":{\"metadata\":{\"name\":\"nodejs-mongo-persistent\",\"creationTimestamp\":null,\"labels\":{\"name\":\"nodejs-mongo-persistent\"}},\"spec\":{\"containers\":[{\"name\":\"nodejs-mongo-persistent\",\"image\":\"172.30.98.11:5000/adietish-stage/nodejs-mongo-persistent@sha256:1f588995c3ed053bf5d548518094347c7fe4b41595cb7c452bb0f5469e69922d\",\"ports\":[{\"containerPort\":8080,\"protocol\":\"TCP\"}],\"env\":[{\"name\":\"DATABASE_SERVICE_NAME\",\"value\":\"mongodb\"},{\"name\":\"MONGODB_USER\",\"valueFrom\":{\"secretKeyRef\":{\"name\":\"nodejs-mongo-persistent\",\"key\":\"database-user\"}}},{\"name\":\"MONGODB_PASSWORD\",\"valueFrom\":{\"secretKeyRef\":{\"name\":\"nodejs-mongo-persistent\",\"key\":\"database-password\"}}},{\"name\":\"MONGODB_DATABASE\",\"value\":\"sampledb\"},{\"name\":\"MONGODB_ADMIN_PASSWORD\",\"valueFrom\":{\"secretKeyRef\":{\"name\":\"nodejs-mongo-persistent\",\"key\":\"database-admin-password\"}}}],\"resources\":{\"limits\":{\"memory\":\"512Mi\"}},\"livenessProbe\":{\"httpGet\":{\"path\":\"/pagecount\",\"port\":8080,\"scheme\":\"HTTP\"},\"initialDelaySeconds\":30,\"timeoutSeconds\":3,\"periodSeconds\":10,\"successThreshold\":1,\"failureThreshold\":3},\"readinessProbe\":{\"httpGet\":{\"path\":\"/pagecount\",\"port\":8080,\"scheme\":\"HTTP\"},\"initialDelaySeconds\":3,\"timeoutSeconds\":3,\"periodSeconds\":10,\"successThreshold\":1,\"failureThreshold\":3},\"terminationMessagePath\":\"/dev/termination-log\",\"terminationMessagePolicy\":\"File\",\"imagePullPolicy\":\"IfNotPresent\"}],\"restartPolicy\":\"Always\",\"terminationGracePeriodSeconds\":30,\"dnsPolicy\":\"ClusterFirst\",\"securityContext\":{},\"schedulerName\":\"default-scheduler\"}}},\"status\":{\"latestVersion\":1,\"observedGeneration\":2,\"replicas\":0,\"updatedReplicas\":0,\"availableReplicas\":0,\"unavailableReplicas\":0,\"details\":{\"message\":\"config
change\",\"causes\":[{\"type\":\"ConfigChange\"}]},\"conditions\":[{\"type\":\"Available\",\"status\":\"False\",\"lastUpdateTime\":\"2018-01-25T23:41:39Z\",\"lastTransitionTime\":\"2018-01-25T23:41:39Z\",\"message\":\"Deployment
config does not have minimum availability.\"}]}}\n"
},
"ownerReferences" : [{
"apiVersion" : "apps.openshift.io/v1",
"kind" : "DeploymentConfig",
"name" : "nodejs-mongo-persistent",
"uid" : "49f1c655-0229-11e8-b468-02d7377a4b17",
"controller" : true,
"blockOwnerDeletion" : true
}]
},
"spec" : {
"replicas" : 0,
"selector" : {
"deployment" : "nodejs-mongo-persistent-1",
"deploymentconfig" : "nodejs-mongo-persistent",
"name" : "nodejs-mongo-persistent"
},
"template" : {
"metadata" : {
"labels" : {
"deployment" : "nodejs-mongo-persistent-1",
"deploymentconfig" : "nodejs-mongo-persistent",
"name" : "nodejs-mongo-persistent"
},
"annotations" : {
"openshift.io/deployment-config.latest-version" :
"1",
"openshift.io/deployment-config.name" :
"nodejs-mongo-persistent",
"openshift.io/deployment.name" :
"nodejs-mongo-persistent-1"
}
},
"spec" : {
"containers" : [{
"name" : "nodejs-mongo-persistent",
"image" :
"172.30.98.11:5000/adietish-stage/nodejs-mongo-persistent@sha256:1f588995c3ed053bf5d548518094347c7fe4b41595cb7c452bb0f5469e69922d",
"ports" : [{
"containerPort" : 8080,
"protocol" : "TCP"
}],
"env" : [
{
"name" : "DATABASE_SERVICE_NAME",
"value" : "mongodb"
},
{
"name" : "MONGODB_USER",
"valueFrom" : {"secretKeyRef" : {
"name" : "nodejs-mongo-persistent",
"key" : "database-user"
}}
},
{
"name" : "MONGODB_PASSWORD",
"valueFrom" : {"secretKeyRef" : {
"name" : "nodejs-mongo-persistent",
"key" : "database-password"
}}
},
{
"name" : "MONGODB_DATABASE",
"value" : "sampledb"
},
{
"name" : "MONGODB_ADMIN_PASSWORD",
"valueFrom" : {"secretKeyRef" : {
"name" : "nodejs-mongo-persistent",
"key" : "database-admin-password"
}}
}
],
"resources" : {"limits" : {"memory" :
"512Mi"}},
"livenessProbe" : {
"httpGet" : {
"path" : "/pagecount",
"port" : 8080,
"scheme" : "HTTP"
},
"initialDelaySeconds" : 30,
"timeoutSeconds" : 3,
"periodSeconds" : 10,
"successThreshold" : 1,
"failureThreshold" : 3
},
"readinessProbe" : {
"httpGet" : {
"path" : "/pagecount",
"port" : 8080,
"scheme" : "HTTP"
},
"initialDelaySeconds" : 3,
"timeoutSeconds" : 3,
"periodSeconds" : 10,
"successThreshold" : 1,
"failureThreshold" : 3
},
"terminationMessagePath" :
"/dev/termination-log",
"terminationMessagePolicy" : "File",
"imagePullPolicy" : "IfNotPresent"
}],
"restartPolicy" : "Always",
"terminationGracePeriodSeconds" : 30,
"dnsPolicy" : "ClusterFirst",
"securityContext" : {},
"schedulerName" : "default-scheduler"
}
}
},
"status" : {
"replicas" : 0,
"observedGeneration" : 3
},
"kind" : "ReplicationController",
"apiVersion" : "v1"
{code}
was (Author: adietish):
I get even more confused than I was before. What above failed all day long now seems to
magically work. I can deploy and debug an app that I created via a nodejs:builder image.
The case where I create an app via template "nodejs-mongo-persitent" now fails
with a different error:
!image-2018-01-26-00-49-39-691.png!
It now doesn't get the docker image labels that indicates where to deploy to within
the pod. As far as I remember the deployment path is only available once the image stream
is imported. Online seems very low on resources (far less than all other variants), so
this could be some timing issue.
Server adapter: timeouts when starting into "Debug" on
OpenShift Online
-----------------------------------------------------------------------
Key: JBIDE-25611
URL:
https://issues.jboss.org/browse/JBIDE-25611
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Affects Versions: 4.5.2.Final
Reporter: Andre Dietisheim
Assignee: Andre Dietisheim
Fix For: 4.5.3.AM1
Attachments: error-waiting-for-new-pod.png, image-2018-01-24-18-58-29-159.png,
image-2018-01-25-10-49-09-369.png, image-2018-01-26-00-49-39-691.png, pod-ports-cdk.png,
pod-ports-online.png, port-missing.png
# ASSERT: have an account on OpenShift Online
# EXEC: create a new application via template nodejs-mongo-persistent
# EXEC: have the project imported into the workspace and the server adapter for it
created
# ASSERT: you have a new server adapter for your app in state [stopped]
# EXEC: start the adapter into "Debug"
Result:
The adapter takes a lot of time to start but wont succeed eventually. You get the
following error dialog:
!error-waiting-for-new-pod.png!
In the Eclipse log you'll find the following:
{code}
org.eclipse.core.runtime.CoreException: Failed to detect new deployed Pod for
nodejs-mongo-persistent
at
org.jboss.tools.openshift.internal.core.server.debug.OpenShiftDebugMode.waitFor(OpenShiftDebugMode.java:403)
at
org.jboss.tools.openshift.internal.core.server.debug.OpenShiftDebugMode.waitForNewPod(OpenShiftDebugMode.java:395)
at
org.jboss.tools.openshift.internal.core.server.debug.OpenShiftDebugMode.getPod(OpenShiftDebugMode.java:226)
at
org.jboss.tools.openshift.internal.core.server.debug.OpenShiftDebugMode.execute(OpenShiftDebugMode.java:170)
at
org.jboss.tools.openshift.core.server.behavior.OpenShiftLaunchController.launch(OpenShiftLaunchController.java:100)
at
org.jboss.ide.eclipse.as.wtp.core.server.launch.ControllableServerLaunchConfiguration.launch(ControllableServerLaunchConfiguration.java:52)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:731)
at org.eclipse.wst.server.core.internal.Server.startImpl2(Server.java:3566)
at org.eclipse.wst.server.core.internal.Server.startImpl(Server.java:3502)
at org.eclipse.wst.server.core.internal.Server$StartJob.run(Server.java:377)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
{code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)