If filesystem in virtual router is in read-only state, reports error to

commands send to virtual router, instead of keeping silence.

Test:

Before change:
(1) Acquire IP. always in "Allocating" state.
(2) EnableStaticNat, the result is success(it is incorrect).
(3) DisableStaticNat, will get error message.. This is correct.
(4) Add Firewalls. always in "Adding" state.
(5) The AgentManager report statistics every 60 minutes(normally it
should be router.stats.interval=5 minutes).

After change:
(1) Acquire IP, will get error message.
(2) EnableStaticNat, will get error message.
(3) DisableStaticNat, will get error message.
(4) Add Firewalls, will get error message. But the firewall rules are
saved in database.
(5) The AgentManager report statistics every 5 minutes, except the
network with read-only FS virtual router.
This commit is contained in:
Wei Zhou 2013-02-12 09:22:04 -08:00 committed by Joe Brockmeier
parent a61a2b18fa
commit a9042c3168
1 changed files with 5 additions and 1 deletions

View File

@ -42,7 +42,11 @@ getLockFile() {
psline=`ps u $$`
echo $psline > $__LOCKFILE
if [ ! -e $__LOCKFILE ]
then
return
fi
for i in `seq 1 $(($__TIMEOUT * 10))`
do
currlock=`ls -tr /tmp/$1-*.lock | head -n1`