Commit Graph

69 Commits

Author SHA1 Message Date
OpenDev Sysadmins 0d3307a9c4 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:49:19 +00:00
Jenkins ed7550abc9 Merge "Improve doc" into stable/pike 2017-09-05 12:16:32 +00:00
Lingxian Kong 5e0cc13458 Fix logs query for executions
After function autoscaling support, it's impossible for qinling-engine
to get execution log because it doesn't know which pod it is talking
to.

So, it's neccessary for the runtime to return execution logs to
qinling engine.

The qinling client is not affected.

Change-Id: I96dfd00cc83d8b8a5e8c601ee3800b1ef1a45b1b
(cherry picked from commit f2189a0468)
2017-08-29 23:57:37 +00:00
Lingxian Kong f7ffeb3925 Add scale up ability for function execution
Provide an API to do scale up operation, leave the container
monitoring to orchestrator underlay, although k8s already supports
HPA, but we should not rely on specific container orchestrator
capability for general purpose.

Partially implements: blueprint qingling-autoscaling
Change-Id: Iff1ff646a6df263b2770b8cebc74e80ab18c7613
(cherry picked from commit c74ac2faac)
2017-08-29 22:36:06 +00:00
Jenkins 0e01eb97b4 Merge "Fix delete function with running job associated" into stable/pike 2017-08-29 22:31:51 +00:00
Jenkins 15102c2d95 Merge "Documentation improvement" into stable/pike 2017-08-29 22:31:45 +00:00
Lingxian Kong 5639d22851 Concurrency support for python runtime
For testing purpose, just use multithreading support of Flask itself.

It's not recommended for production use.

Change-Id: I062c6f093e1c167a2ef9c8ad6747fc770e0139e8
(cherry picked from commit c17a4b44da)
2017-08-29 22:02:59 +00:00
Lingxian Kong 3b22d8a2b9 Documentation improvement
Partially implements: blueprint qinling-doc
Change-Id: Ia7224f2bf5d4f64b07265ea5d453b7af6974ce91
(cherry picked from commit 5580cb21b7)
2017-08-29 22:02:36 +00:00
Jenkins 2f10e80019 Fix delete function with running job associated
User should not delete a function with running jobs associated.

Change-Id: I627ac7ef057768e7c2d99f56e17da9eacbf4ad76
(cherry picked from commit 55a06cfb77)
2017-08-29 22:02:05 +00:00
Jenkins 4c305ea1ed Merge "Improve doc" into stable/pike 2017-08-29 12:50:21 +00:00
Jenkins ba4e4516f7 Merge "Add unit test for function operations" into stable/pike 2017-08-29 12:50:16 +00:00
Jenkins 93f6f71a8b Merge "Add unit test for execution operations" into stable/pike 2017-08-29 12:49:33 +00:00
Lingxian Kong 166127ffa8 Improve doc
Partially implements: blueprint qinling-doc
Change-Id: I715414735bdf88b33052c14c3ed241193f213dee
(cherry picked from commit f122eceb71)
2017-08-29 12:31:51 +00:00
Lingxian Kong f25982ad10 Add unit test for execution operations
Partially implements: blueprint add-unit-tests

Change-Id: Ib418364ec7164d0bad0402501f14d8340be99c89
(cherry picked from commit b7562a4bd3)
2017-08-29 12:31:26 +00:00
Lingxian Kong 3ecc93852f Add unit test for function operations
Partially implements: blueprint add-unit-tests
Change-Id: I00c3c7beca8cda7057f63850026c0f3f0526f5dd
(cherry picked from commit eb91b6d6f3)
2017-08-29 12:30:52 +00:00
Lingxian Kong 2662199b88 Improve doc
Change-Id: I22ac7943a9871bf6cfafb033b0523c6cf5a6b7cf
(cherry picked from commit a6043729cb)
2017-08-29 12:30:26 +00:00
Lingxian Kong ac5ffcd7b2 Doc improvement
Partially implements: blueprint qinling-doc
Change-Id: I3ef2b452302d886e1a86ccde6c07be5d4ac8d383
(cherry picked from commit 343bc93d76)
2017-08-29 12:29:39 +00:00
Lingxian Kong 463a3ee86e Re-orginze documentation
Change-Id: Ic0903cb9288e01682df01c3e69f934ed40c53a4f
(cherry picked from commit 12fe9211f3)
2017-08-29 12:15:52 +00:00
Lingxian Kong 8c9bd91c0d Update tox.ini and .gitreview for stable/pike
Change-Id: I43a640d236b0c6abcf7eb27a85f7d813465beb94
2017-08-14 13:55:12 +12:00
Lingxian Kong 23c49cba10 Support function execution log query
After execution is finished, Qinling provides API to query execution
log for audit, debug or other purposes.

Implements: blueprint qinling-logs
Change-Id: Ie92619bf238c8e72e15c350c65bfbbb88a065f97
(cherry picked from commit 089f41de2b)
2017-08-13 22:44:18 +00:00
Lingxian Kong 35e652f43a Fix job creation with pattern
Change-Id: I0222b853464f6bf3589f11477a0624d72c64a22b
2017-08-06 16:20:11 +12:00
Lingxian Kong 55c7e5f496 Do not get openstack session in container
If the function is triggered by job, it's very hard to get openstack
serssion based on trust id, unless the qinling service credentials are
passed which will lead to security issue.

So, this patch will remove 'context' param for user function.

Change-Id: Ib0e185ad9729cf59e308b7ded683911a92624ad0
2017-08-06 15:02:49 +12:00
Lingxian Kong 1763f29ce6 Fix log message
Change-Id: If30b192539981003149311c25d776f9a73819beb
2017-08-06 00:30:30 +12:00
Lingxian Kong b3c7f90777 Fix a command in README
Change-Id: If1cb3db4f81da7312c2f7276091915df716ccc3c
2017-08-05 23:46:00 +12:00
Lingxian Kong 13e2d13195 Fix getting update params
Change-Id: I0724417cfe974c23813117cf3733de89f8f5f1c5
2017-08-02 10:15:17 +12:00
Jenkins d768711939 Merge "Add job update api" 2017-08-01 05:01:46 +00:00
Lingxian Kong 16876649e5 Add job update api
By using update api, users could pause/cancel/resume jobs, or change
job execution pattern.

Change-Id: I05103316a91ad79c4d0593c4a02a400aac45a762
2017-08-01 16:50:19 +12:00
Lingxian Kong ff873c3f95 Fix authentication failure when token expires
OpenStack service session is generated when downloading code from
inside the container, but when the function is invoked at a deferred
time, the token may already be expiried.

Need to create the session when executing the function instead of
when downloading.

Change-Id: I8170bfb1c5f8b6cf88a744547db12cc12248aaca
2017-07-30 23:34:47 +12:00
Lingxian Kong a2213f3f6d Fix relationship of function service mapping
When deleting function, the service mapping record should be
deleted automatically.

Provide a helper script for resource clean up.

Change-Id: Ie3db454b5bcfb74a0826f01c4626fb45fca58478
2017-07-27 23:14:27 +12:00
Lingxian Kong 30c8e7dd60 Log improvement
Change-Id: Ia7e0dee3820179c22fb8281c62d0a8241b72b718
2017-07-27 16:22:53 +12:00
Lingxian Kong d23551c465 Fully support sync/async execution
Change-Id: I008025f710f8d61eb6f8a4998fe6990abdbc7203
2017-07-27 14:26:47 +12:00
Lingxian Kong 49c4c10adb Fix a bug in job periodic task
Change-Id: I4c26e08e3738023b1a7e7e8f0f2c1f59d7e80d79
2017-07-26 17:01:36 +12:00
Lingxian Kong 997c78131e Implement periodic task for jobs
Change-Id: I9093333cc9b1a64b5e386af87db80df5aa4dfb4b
2017-07-26 09:58:46 +12:00
Lingxian Kong 5baa3f1e45 Add jobs api
This is part-1 of jobs support in Qinling.

With job API, users can create a job with an existing function
that can be ran in cron job's fashion, but the job definition
has more capabilities than cron.

Change-Id: I0cb885dd6005ba024e3816bae9b79b0d3f35d335
2017-07-21 22:52:05 +12:00
Lingxian Kong ebe601b8f5 Disable python buffer for stdout/stderr
Change-Id: I6f4a0aaf192df76d21c72529c92b6419c9f4b08d
2017-07-17 23:47:23 +12:00
Lingxian Kong 0f7520b88c Python runtime improvement
Change-Id: I8a77324df07c2d98773c20aa04eb81cc54152be3
2017-07-17 15:02:14 +12:00
Lingxian Kong f870ac6871 Capture module load exception
Change-Id: I1f04351160fcdb0008a25f5898bfc6cc29a58055
2017-07-13 22:29:27 +12:00
Lingxian Kong c1e5ef378f Add additional information for README
Change-Id: I56747fbbddef120c3624fd11036b1317cc8c723e
2017-07-13 16:23:20 +12:00
wanghao 94b9d32ae6 Improve config options
Change-Id: I8f73a544333b02a4bc37736d850bf06cc09f8263
2017-07-12 10:53:12 +08:00
Lingxian Kong 00885b42ff Add UT for runtime API operation
Partially implements: blueprint add-unit-tests
Change-Id: I2bf92b36e4bee273171bd626638a61e313377a44
2017-07-11 13:08:58 +12:00
Lingxian Kong 81139c1c7c Add documentation to use qinling CLI
Change-Id: Iae4489b0c8b033773075aa6867e4ec65b7fe9af8
2017-07-07 15:49:57 +12:00
Lingxian Kong bf4ea1c02b Fix file pattern in git ignore
Change-Id: I81aa3ff848ef7bd200d9a7423f6fd4cbf8d18765
2017-07-05 00:10:09 +12:00
Lingxian Kong 928cb9ea9a Ignore .patch files
Change-Id: Ie2e9b24c17fb3d0d0ea7efe1af7a5cfd3076c3cc
2017-07-04 23:40:34 +12:00
liusheng b460a55df7 Fix minor typos
Change-Id: I7a42166e24e27083ab34c7dcea87c28a56bbf7f7
2017-07-04 15:42:20 +08:00
Lingxian Kong eae0caf17d Add basic test for engine
Partially implements: blueprint add-unit-tests

Change-Id: I7fff946e8c05cf50722afdc54be746bde9240d43
2017-07-04 15:42:17 +08:00
Jenkins 8d321927d3 Merge "Updated from global requirements" 2017-07-04 03:09:11 +00:00
Lingxian Kong 0f7362083f Updated from global requirements
Change-Id: Ib75da5b56ce71f33f433906df175e21f58cc947d
2017-07-04 15:00:21 +12:00
Lingxian Kong 1171944560 Add basic unit test structure
Partially implements: blueprint add-unit-tests

Change-Id: Ic96dcaf401f30bc098738818630777fc62040aca
2017-07-04 14:34:53 +12:00
Lingxian Kong 786f83d182 Support Keystone session in python runtime
Keystone session can be used directly in user function to access
OpenStack services.

Include openstack clients in python requirements as well.

Add a python function example.

Implements: blueprint qinling-openstack-clients
Change-Id: I4798c404cb57bafe14049f57ba8db7c7125106c7
2017-07-03 01:16:40 +12:00
Lingxian Kong 992c90e044 Support update runtime
If update image, will send asynchronous request to engine. If some
error happened during update, engine will rollback runtime
automatically.

Change-Id: I1598b1c04427dfdb7d573bbff8dc017f113c2fd2
2017-06-26 21:22:40 +12:00