- Moved backend start message to after the clixon socket ops: create/bind/listen
This commit is contained in:
parent
86ebe9f2fb
commit
cf2de375f7
3 changed files with 42 additions and 3 deletions
|
|
@ -62,6 +62,7 @@ Users may have to change how they access the system
|
||||||
|
|
||||||
### Minor features
|
### Minor features
|
||||||
|
|
||||||
|
* [Convert int64, uint64 and decimal64 to string in xml to json #310](https://github.com/clicon/clixon/pull/310)
|
||||||
* Backend ignore of SIGPIPE. This occurs if client quits unexpectedly over the UNIX socket.
|
* Backend ignore of SIGPIPE. This occurs if client quits unexpectedly over the UNIX socket.
|
||||||
* This is a timing issue but occurs more frequently in large RESTCONF messgaes.
|
* This is a timing issue but occurs more frequently in large RESTCONF messgaes.
|
||||||
* New `clixon-config@2022-02-11.yang` revision
|
* New `clixon-config@2022-02-11.yang` revision
|
||||||
|
|
|
||||||
|
|
@ -1007,7 +1007,6 @@ main(int argc,
|
||||||
if ((pid = pidfile_write(pidfile)) < 0)
|
if ((pid = pidfile_write(pidfile)) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
clicon_log(LOG_NOTICE, "%s: %u Started", __PROGRAM__, getpid());
|
|
||||||
if (set_signal(SIGTERM, backend_sig_term, NULL) < 0){
|
if (set_signal(SIGTERM, backend_sig_term, NULL) < 0){
|
||||||
clicon_err(OE_DAEMON, errno, "Setting signal");
|
clicon_err(OE_DAEMON, errno, "Setting signal");
|
||||||
goto done;
|
goto done;
|
||||||
|
|
@ -1048,6 +1047,8 @@ main(int argc,
|
||||||
#endif
|
#endif
|
||||||
if (stream_timer_setup(0, h) < 0)
|
if (stream_timer_setup(0, h) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
/* Just before event-loop, after socket bind/listen */
|
||||||
|
clicon_log(LOG_NOTICE, "%s: %u Started", __PROGRAM__, getpid());
|
||||||
if (clixon_event_loop(h) < 0)
|
if (clixon_event_loop(h) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
ok:
|
ok:
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ module test1 {
|
||||||
yang-version 1.1;
|
yang-version 1.1;
|
||||||
namespace "http://www.test1.com/test1";
|
namespace "http://www.test1.com/test1";
|
||||||
prefix t1;
|
prefix t1;
|
||||||
|
import test2 { prefix t2; }
|
||||||
import test3 { prefix t3; }
|
import test3 { prefix t3; }
|
||||||
|
|
||||||
grouping t1-group {
|
grouping t1-group {
|
||||||
|
|
@ -62,6 +63,31 @@ module test1 {
|
||||||
augment "/t3:t3-con" {
|
augment "/t3:t3-con" {
|
||||||
uses t1:t1-group;
|
uses t1:t1-group;
|
||||||
}
|
}
|
||||||
|
augment "/t3:t3-con" {
|
||||||
|
uses t2:t2-group;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF > $fyang2
|
||||||
|
module test2 {
|
||||||
|
yang-version 1.1;
|
||||||
|
namespace "http://www.test2.com/test2";
|
||||||
|
prefix t2;
|
||||||
|
|
||||||
|
grouping t2-group {
|
||||||
|
container t2-con {
|
||||||
|
leaf t2-a {
|
||||||
|
type string;
|
||||||
|
}
|
||||||
|
|
||||||
|
leaf t2-ref-a {
|
||||||
|
type leafref {
|
||||||
|
path "../t2-a";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
@ -87,10 +113,10 @@ if [ $BE -ne 0 ]; then
|
||||||
new "start backend -s init -f $cfg"
|
new "start backend -s init -f $cfg"
|
||||||
start_backend -s init -f $cfg
|
start_backend -s init -f $cfg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new "waiting"
|
new "waiting"
|
||||||
wait_backend
|
wait_backend
|
||||||
|
|
||||||
if true; then
|
|
||||||
new "cli set t1-con t1-con t1-a 123"
|
new "cli set t1-con t1-con t1-a 123"
|
||||||
expectpart "$($clixon_cli -1 -f $cfg set t1-con t1-con t1-a 123)" 0 ""
|
expectpart "$($clixon_cli -1 -f $cfg set t1-con t1-con t1-a 123)" 0 ""
|
||||||
|
|
||||||
|
|
@ -102,7 +128,6 @@ expectpart "$($clixon_cli -1 -f $cfg validate)" 0 ""
|
||||||
|
|
||||||
new "cli discard"
|
new "cli discard"
|
||||||
expectpart "$($clixon_cli -1 -f $cfg discard)" 0 ""
|
expectpart "$($clixon_cli -1 -f $cfg discard)" 0 ""
|
||||||
fi
|
|
||||||
|
|
||||||
new "cli set t3-con t1-con t1-a 123"
|
new "cli set t3-con t1-con t1-a 123"
|
||||||
expectpart "$($clixon_cli -1 -f $cfg set t3-con t1-con t1-a 123)" 0 ""
|
expectpart "$($clixon_cli -1 -f $cfg set t3-con t1-con t1-a 123)" 0 ""
|
||||||
|
|
@ -113,6 +138,18 @@ expectpart "$($clixon_cli -1 -f $cfg set t3-con t1-con t1-ref-a 123)" 0 ""
|
||||||
new "cli validate"
|
new "cli validate"
|
||||||
expectpart "$($clixon_cli -1 -f $cfg validate)" 0 ""
|
expectpart "$($clixon_cli -1 -f $cfg validate)" 0 ""
|
||||||
|
|
||||||
|
new "cli discard"
|
||||||
|
expectpart "$($clixon_cli -1 -f $cfg discard)" 0 ""
|
||||||
|
|
||||||
|
new "cli set t3-con t2-con t2-a 123"
|
||||||
|
expectpart "$($clixon_cli -1 -f $cfg set t3-con t2-con t2-a 123)" 0 ""
|
||||||
|
|
||||||
|
new "cli set t3-con t2-con t2-ref-a 123"
|
||||||
|
expectpart "$($clixon_cli -1 -f $cfg set t3-con t2-con t2-ref-a 123)" 0 ""
|
||||||
|
|
||||||
|
new "cli validate"
|
||||||
|
expectpart "$($clixon_cli -1 -f $cfg validate)" 0 ""
|
||||||
|
|
||||||
if [ $BE -ne 0 ]; then
|
if [ $BE -ne 0 ]; then
|
||||||
new "Kill backend"
|
new "Kill backend"
|
||||||
# Check if premature kill
|
# Check if premature kill
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue