Commit graph

38 commits

Author SHA1 Message Date
Olof hagsand
bdc09851f0 * Command field of clixon-lib:process-control RPC reply used CDATA encoding but now uses regular XML encoding 2022-01-27 09:56:09 +01:00
Olof hagsand
77b4468eb3 Updated copyright statements to 2022 2022-01-18 16:36:00 +01:00
Olof hagsand
f8f34e3571 * Replaced separate autocli trees with a single @basemodel tree by using filter labels
* Added lastkey argument to yang_key_match()
* Fixed segv in process-sigchld
* Added ietf-yang-library to CLICON_CLI_AUTOCLI_EXCLUDE default value
* Added yang_spec_print() function
2021-12-16 20:23:09 +01:00
Olof hagsand
8352e25860 * Restconf internal start: fail early if clixon_restconf binary is not found
* If CLICON_BACKEND_RESTCONF_PROCESS is true
2021-08-17 10:08:04 +02:00
Olof hagsand
3539a80d5e restconf fcgi mem leak in indata
test pkill needs sleep before name settles
2021-06-27 16:40:27 +02:00
Olof hagsand
ba45d6d2a1 Fixed memory leak in new candidate_validate function
Added error returns for clixon-lib process rpc empty returns
2021-06-23 10:50:47 +02:00
Olof hagsand
164aa1cb4c * Restconf: added inline configuration using -R <xml> command line as an alternative to making advanced restconf configuration 2021-05-26 11:24:39 +02:00
Olof hagsand
c20c672d83 * Changed config and install options for Restconf
* clixon_restconf daemon is installed in /usr/local/sbin (as clixon_backend), instead of /www-data
    * `configure --with-wwwdir=<dir>` remains but only applies to fcgi socket and log
    * New option `CLICON_RESTCONF_INSTALL_DIR` is set to where clixon_restconf is installed, with default `/usr/local/sbin/`
  * Restconf drop privileges user is defined by `CLICON_RESTCONF_USER`
    * `configure --with-wwwuser=<user>` is removed
  * clixon_restconf drop of privileges is defined by `CLICON_RESTCONF_PRIVILEGES` option
* New clixon-restconf@2020-05-20.yang revision
  * Added: restconf `log-destination`
2021-05-23 17:14:18 +02:00
Olof hagsand
40f4df1390 Add timeout 100ms before every kill restconf iteration 2021-05-11 15:55:33 +02:00
Olof hagsand
aaaeec92eb Internal RESTCONF changes:
- Kill running process directly, not schedul a kill
- fcgi: when kill, make exit more ordered, ensure fcgi-accept returns properly
2021-04-30 14:49:01 +02:00
jxm
45f3d48179 add clixon proc get pid api 2021-04-23 10:44:06 +08:00
Olof hagsand
7ebb538ebf - Changed master to 5.2.0.PRE
- Modified Makefiles for static linkage and coverage
- test namespace abstractions
2021-04-17 15:23:10 +02:00
Olof hagsand
172cfd69b3 - Fixed [clixon_proc can't start new process with PATH env #202](https://github.com/clicon/clixon/issues/202)
- Memory errors in tests
2021-04-14 17:02:24 +02:00
Olof hagsand
d542cd5530 Add cli debug commands for cli/backend/restconf 2021-04-12 12:38:16 +02:00
Olof hagsand
953326d39f - Rewrote process control to simpler state model: stopped/running/exiting
- Stricter CLICON_BACKEND_RESTCONF_PROCESS :
 - if set, restconf daemon queries backend for its config
 - if not set, restconf daemon reads its config from main config file
2021-04-12 10:31:17 +02:00
Olof hagsand
15d01c58d8 - Better restconf debug: when restconf debug flag set in datastore, ensure the process is started with -D set
- Fixed native http support for base container
- Changed test certs and restconf scripts to functions
2021-04-09 09:34:05 +02:00
Olof hagsand
07d196dfd0 Added several fields to process-control status operation: active, description, command, status, starttime, pid 2021-03-12 17:22:22 +01:00
Olof hagsand
7e9a207ab2 * New clixon-lib@2020-03-08.yang revision
* Changed: RPC process-control output to choice dependent on operation
2021-03-12 12:10:25 +01:00
Olof hagsand
7762b10cbb * Changed signal handling
* Moved clixon-proc sigchild handling	from handler to clixon_events
2021-03-11 18:12:43 +01:00
Olof hagsand
c2f07fd29c test fixes: mod timer for arm and install libevhtp lin in /us/lib 2021-03-06 17:04:31 +01:00
Olof hagsand
2ab90d847b Restart restconf daemon only if restconf config is edited (not all) 2021-03-05 13:11:04 +01:00
Olof hagsand
b2f9c59a34 * Reverted blocked signal behavior introduced in 5.0.
* Introduced a delay before making process start/stop/restart processes for race conditions when configuring eg restconf
* For restconf `CLICON_BACKEND_RESTCONF_PROCESS`, restart restconf if restconf is edited.
2021-03-02 12:24:07 +01:00
Olof hagsand
1f0147f996 removed unnecessary strerror() in clixon_err() calls; added 'function' keyword in all function declarations in the test scripts 2021-02-04 12:04:48 +01:00
Olof hagsand
40008f182e Fix restart of restconf processes 2021-02-01 10:44:50 +01:00
Olof hagsand
f5f013c739 * Corrected client session handling to make internal IPC socket persistent
* Applies to cli/netconf/restconf/client-api code
  * Previous behaviour:
    * Close socket after each rpc, but now keeps the socket open until the client terminates
    * Kept locks over socket life-cycle, but according to RFC 6241 7.5 a lock should be relaeased when session ends
2021-01-27 15:07:27 +01:00
Olof hagsand
94c6bd9c49 Added proc socket and text proto rpc 2021-01-22 14:41:47 +01:00
Olof hagsand
f1449a2542 test error 2021-01-15 14:21:06 +01:00
Olof hagsand
96b50b88e8 Copyright 2021 2021-01-13 14:40:34 +01:00
Olof hagsand
cf63d0f761 * New clixon-config@2020-12-30.yang revision
* New clixon-lib@2020-12-30.yang revision
* Added callback to process-control RPC feature in clixon-lib.yang to manage processes
* Changed behavior of starting restconf internally using `CLICON_BACKEND_RESTCONF_PROCESS` monitoring changes in enable flag, not only the RPC.
* Changed: RPC process-control output parameter status to pid
2021-01-02 17:27:44 +01:00
Olof hagsand
7f49c13eba test restconf bugfix, added xml_nsctx_cbuf 2020-12-29 15:57:21 +01:00
Olof hagsand
ff8650c748 restconf-rpc tests 2020-12-15 17:22:07 +01:00
Olof hagsand
22adc58187 * New process-control RPC feature in clixon-lib.yang to manage processes
* This is an alternative to manage a clixon daemon via sudtemd, containerd or other
  * One important special case is starting the clixon-restconf daemon internally
  * This is how it works:
    * Register a process via `clixon_process_register(h, name, namespace, argv, argc)`
    * Use process-control RPC defined in clixon-lib.yang to start/stop/restart or query status on that process
  * Example code in the main example
2020-12-15 15:48:42 +01:00
Olof hagsand
85af4342dc common plugin code, removed clixon_proc.c 2017-04-12 22:39:01 +02:00
Olof hagsand
f6b3e95100 Created xmldb plugin api 2017-04-09 22:53:48 +02:00
Olof hagsand
236b661e43 cleaned up string functions 2017-04-04 17:11:21 +02:00
Olof hagsand
bc2b606167 dual license 2016-12-30 16:14:48 +01:00
Olof hagsand
c1c1670a74 getting legacy grideye application to work on clixon 2016-03-20 22:25:42 +01:00
Olof Hagsand
79b77943f9 renamed .h and libs clicon->clixon 2016-02-28 15:27:36 +01:00
Renamed from lib/src/clicon_proc.c (Browse further)