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 2019/01/24 14:48:35 UTC

[GitHub] dubee opened a new pull request #3991: Provide Artifact with File Storage Activation Store

dubee opened a new pull request #3991: Provide Artifact with File Storage Activation Store
URL: https://github.com/apache/incubator-openwhisk/pull/3991
 
 
   <!--- Provide a concise summary of your changes in the Title -->
   
   ## Description
   <!--- Provide a detailed description of your changes. -->
   <!--- Include details of what problem you are solving and how your changes are tested. -->
   Extends the ArtifactActivationStore by writing activation metadata and user logs to file. With the use of a forwarder, the entities written to file can be stored in external logging services such as ElasticSearch, etc. External services that specialize in logging provide better search capabilities than OpenWhisk offers for activations and user logs. In addition, forwarding activations and user log to an external service will reduce pressure on the artifact store, helping scalability.
   
   These changes are similar to `DockerToActivationFileLogStore`, but also allow the controller to write activations and user logs to file (needed for triggers, sequences, conductors).
   
   Here is an example what gets written to file for an action that writes two log lines. Note that activation result is not written as the result may contain sensitive information that should not be stored.
   ```
   cat invoker0/userlogs-1535483579922.log | grep 033b3f0b04af4ba8bb3f0b04af1ba8c8 | jq
   {
     "message": "2018-08-28T19:13:21.468643245Z stdout: First log line",
     "activaitonId": "033b3f0b04af4ba8bb3f0b04af1ba8c8",
     "namespaceId": "ca55b4aa-36bb-4c13-8f49-e0269c944256",
     "type": "user_log"
   }
   {
     "message": "2018-08-28T19:13:21.468877412Z stdout: Second log line",
     "activaitonId": "033b3f0b04af4ba8bb3f0b04af1ba8c8",
     "namespaceId": "ca55b4aa-36bb-4c13-8f49-e0269c944256",
     "type": "user_log"
   }
   {
     "duration": 52,
     "name": "logs",
     "namespaceId": "ca55b4aa-36bb-4c13-8f49-e0269c944256",
     "subject": "user@openwhisk",
     "path": "user@openwhisk/logs",
     "waitTime": 212,
     "activationId": "033b3f0b04af4ba8bb3f0b04af1ba8c8",
     "publish": false,
     "version": "0.0.1",
     "response": {
       "success": true,
       "status": "success"
     },
     "end": 1535483601470,
     "message": "Activation record '033b3f0b04af4ba8bb3f0b04af1ba8c8' for entity 'logs'",
     "kind": "nodejs:6",
     "start": 1535483601418,
     "limits": {
       "timeout": 60000,
       "memory": 256,
       "logs": 10
     },
     "initTime": 43,
     "namespace": "user@openwhisk",
     "type": "activation_record"
   }
   ```
   
   Note: with this SPI activation results are stored in the backing database, but not writing to the user log file.
   
   ## Related issue and scope
   <!--- Please include a link to a related issue if there is one. -->
   - [ ] I opened an issue to propose and discuss this change (#????)
   
   ## My changes affect the following components
   <!--- Select below all system components are affected by your change. -->
   <!--- Enter an `x` in all applicable boxes. -->
   - [ ] API
   - [x] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [x] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [x] Data stores (e.g., CouchDB)
   - [ ] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Use `x` in all the boxes that apply: -->
   - [ ] Bug fix (generally a non-breaking change which closes an issue).
   - [x] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing behavior).
   
   ## Checklist:
   <!--- Please review the points below which help you make sure you've covered all aspects of the change you're making. -->
   
   - [x] I signed an [Apache CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).
   - [x] I reviewed the [style guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness) and followed the recommendations (Travis CI will check :).
   - [ ] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services