You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2020/09/03 20:43:47 UTC

[GitHub] [openwhisk] ajanikowski opened a new issue #4960: [Invoker] Cannot retrieve logs of "user-action" container with pod-template feature

ajanikowski opened a new issue #4960:
URL: https://github.com/apache/openwhisk/issues/4960


   ## Description
   Invoker cannot retrieve "user-action" container logs in presence of one or more sidecar container in the pod function. 
   Returned logs are always empty even if the function write on stdout/stderr.
   
   ## Environment details:
   
   * on-cloud deployment on AKS
   
   ## Steps to reproduce the issue:
   
   1.   Deploy openwhisk using the pod-template feature to inject a sidecar container:
   1.a Create a ConfigMap like this:
   ```
   apiVersion: v1
   kind: ConfigMap
   metadata:
     name: {{ .Release.Name }}-invoker-template
     labels:
   {{ include "openwhisk.label_boilerplate" .| indent 4 }}
   data:
     podTemplate.yaml: |
       apiVersion: v1
       kind: Pod
       spec:
         - name: "sidecar"
           imagePullPolicy: "IfNotPresent"
           image: "busybox:latest"
           command: [ "/bin/sh", "-c", "--" ]
           args: [ "while true; do echo 'running...'; sleep 30; done;" ]
   ```
   1.b Include the _CONFIG_whisk_kubernetes_podTemplate_ variable into invoker chart _helm/openwhisk/templates/invoker-pod.yaml_
   ```
         ...
         volumes:
         - name: pod-template-dir
           configMap:
             name: {{ .Release.Name }}-invoker-template
         ...      
         containers:
         - name: invoker
         ...      
           env:
             - name: "CONFIG_whisk_kubernetes_podTemplate"
               value: "file:/invoker-template/podTemplate.yaml"
         ...      
   ```
   2.   Run an every function that writes on stdout
   
   
   ## Provide the expected results and outputs:
   
   Logs are not empty using wsk or other trigger method.
   ```
   user@ubuntu:~$ wsk -i action invoke greeting
   ok: invoked /_/greeting with id fc5a778ce1aa43579a778ce1aa7357fd
   user@ubuntu:~$ wsk -i activation get fc5a778ce1aa43579a778ce1aa7357fd
   ok: got activation fc5a778ce1aa43579a778ce1aa7357fd
   {
       "namespace": "guest",
       "name": "greeting",
       "version": "0.0.1",
       "subject": "guest",
       "activationId": "fc5a778ce1aa43579a778ce1aa7357fd",
       "start": 1599165480554,
       "end": 1599165480558,
       "duration": 4,
       "statusCode": 0,
       "response": {
           "status": "success",
           "statusCode": 0,
           "success": true,
           "result": {
               "greeting": "Hello stranger!"
           }
       },
       "logs": [
           "2020-09-03T20:38:00.556443838Z stdout: Hello stranger!"
       ],
       "annotations": [
           {
               "key": "path",
               "value": "guest/greeting"
           },
           {
               "key": "waitTime",
               "value": 12
           },
           {
               "key": "kind",
               "value": "python:3"
           },
           {
               "key": "timeout",
               "value": false
           },
           {
               "key": "limits",
               "value": {
                   "concurrency": 100,
                   "logs": 10,
                   "memory": 128,
                   "timeout": 3600000
               }
           }
       ],
       "publish": false
   }
   ```
   
   ## Provide the actual results and outputs:
   
   Logs are always empty.
   ```
   user@ubuntu:~$ wsk -i action invoke greeting
   ok: invoked /_/greeting with id 7542b42b84e349b482b42b84e389b4bf
   user@ubuntu:~$ wsk -i activation get 7542b42b84e349b482b42b84e389b4bf
   ok: got activation 7542b42b84e349b482b42b84e389b4bf
   {
       "namespace": "guest",
       "name": "greeting",
       "version": "0.0.1",
       "subject": "guest",
       "activationId": "7542b42b84e349b482b42b84e389b4bf",
       "start": 1599165671500,
       "end": 1599165671507,
       "duration": 7,
       "statusCode": 0,
       "response": {
           "status": "success",
           "statusCode": 0,
           "success": true,
           "result": {
               "greeting": "Hello stranger!"
           }
       },
       "logs": [],
       "annotations": [
           {
               "key": "path",
               "value": "guest/greeting"
           },
           {
               "key": "waitTime",
               "value": 22
           },
           {
               "key": "kind",
               "value": "python:3"
           },
           {
               "key": "timeout",
               "value": false
           },
           {
               "key": "limits",
               "value": {
                   "concurrency": 100,
                   "logs": 10,
                   "memory": 128,
                   "timeout": 3600000
               }
           }
       ],
       "publish": false
   }
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk] style95 closed issue #4960: [Invoker] Cannot retrieve logs of "user-action" container with pod-template feature

Posted by GitBox <gi...@apache.org>.
style95 closed issue #4960:
URL: https://github.com/apache/openwhisk/issues/4960


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org