diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a1853a3..6232e3c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,7 +39,7 @@ Expected: June 2021 * Do not extend default values if when statements evaluate to false * Do not allow edit-config of nodes if when statements evaluate to false (Sec 8.3.2) * If a key leaf is defined in a grouping that is used in a list, the "uses" statement MUST NOT have a "when" statement. (See 7.21.5) - * See [yang uses's substatement when has no effect #218](https://github.com/clicon/clixon/issues/2$ + * See [yang uses's substatement when has no effect #218](https://github.com/clicon/clixon/issues/218) * YANG deviation [deviation statement not yet support #211](https://github.com/clicon/clixon/issues/211) * See RFC7950 Sec 5.6.3 diff --git a/example/main/README.md b/example/main/README.md index 0d469884..4430c2cb 100644 --- a/example/main/README.md +++ b/example/main/README.md @@ -56,11 +56,11 @@ Send netconf command: ``` Start clixon restconf daemon ``` - sudo su -c "/www-data/clixon_restconf -f /usr/local/etc/example.xml " -s /bin/sh www-data + sudo /usr/local/bin/clixon_restconf -f /usr/local/etc/example.xml ``` Send restconf command ``` - curl -G http://127.0.0.1/restconf/data + curl -X GET http://127.0.0.1/restconf/data ``` ## Using the CLI @@ -148,7 +148,7 @@ Start nginx daemon ``` Start the clixon restconf daemon ``` - sudo su -c "/www-data/clixon_restconf -f /usr/local/etc/example.xml " -s /bin/sh www-data + sudo /usr/local/sbin/clixon_restconf -f /usr/local/etc/example.xml ``` then access using curl or wget: ``` @@ -206,7 +206,7 @@ clixon_netconf -qf /usr/local/etc/example.xml ``` Restconf (assuming nginx started): ``` -sudo su -c "/www-data/clixon_restconf -f /usr/local/etc/example.xml " -s /bin/sh www-data& +sudo /usr/local/sbin/clixon_restconf -f /usr/local/etc/example.xml curl -X POST http://localhost/restconf/operations/clixon-example:example -H "Content-Type: application/yang-data+json" -d '{"clixon-example:input":{"x":"ipv4"}}' { "clixon-example:output": { diff --git a/test/test_restconf_internal_usecases.sh b/test/test_restconf_internal_usecases.sh index 0c2fa594..f89863b8 100755 --- a/test/test_restconf_internal_usecases.sh +++ b/test/test_restconf_internal_usecases.sh @@ -20,6 +20,7 @@ # 1. Start two servers, where one fails # 2. Reach one not the other # (Wanted to bind an invalid port, but then such a port must be bound and later killed) +# Note there are debug printfs marked as XXX for a race condition in travis # Magic line must be first in script (see README.md) s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi @@ -117,7 +118,7 @@ EOF if [ -z "$pid" ]; then err "No pid return value" "$retx" fi -echo "retx:$retx" +echo "retx:$retx" # XXX if $active; then expect="^$activeClixon RESTCONF process/.*/clixon_restconf -f $cfg -D [0-9] -l ${LOGDST_CMD}$status20[0-9][0-9]\-[0-9][0-9]\-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9]*Z$pid]]>]]>$" else @@ -169,16 +170,16 @@ expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO]]>]]>" "^]]>]]>$" -echo "pid:$pid" -ps aux|grep clixon_ +echo "pid:$pid" # XXX +ps aux|grep clixon_ # XXX new "2. get status, get pid1" rpcstatus true running pid1=$pid if [ $pid1 -eq 0 ]; then err "Pid" 0; fi -echo "pid1:$pid1" -ps aux|grep clixon_ +echo "pid1:$pid1" # XXX +ps aux|grep clixon_ # XXX new "Check $pid1 exists" while sudo kill -0 $pid1 2> /dev/null; do @@ -187,8 +188,8 @@ while sudo kill -0 $pid1 2> /dev/null; do sleep $DEMSLEEP done -echo "pid1:$pid1" -ps aux|grep clixon_ +echo "pid1:$pid1" # XXX +ps aux|grep clixon_ # XXX new "3. get status: Check killed" rpcstatus false stopped diff --git a/test/vagrant/README.md b/test/vagrant/README.md index 66d5fdcd..c356913b 100644 --- a/test/vagrant/README.md +++ b/test/vagrant/README.md @@ -29,3 +29,11 @@ The current vagrant boxes are verified continuously: For other vagrant boxes, see [search vagrant boxes](https://vagrantcloud.com/search) +Inaccessible +------------ +Sometimes Vagrant says: ”Your VM has become inaccessible” + +``` +VBoxManage list vms +VBoxManage unregistervm xxx +``` diff --git a/test/vagrant/clixon.sh b/test/vagrant/clixon.sh index 8118a7d0..9b3ecbea 100755 --- a/test/vagrant/clixon.sh +++ b/test/vagrant/clixon.sh @@ -26,6 +26,13 @@ if [ ! $(id -u clicon) ]; then fi fi +# Fcgi restconf requires /www-data directory for fcgi socket +if [ ${with_restconf} = fcgi ]; then + sudo mkdir /www-data + sudo chown $wwwuser /www-data + sudo chgrp $wwwuser /www-data +fi + # cligen test -d src || mkdir src test -d src/cligen || (cd src;git clone https://github.com/clicon/cligen.git)