10 Commits

Author SHA1 Message Date
Sheng Yang
dd721a832a CLOUDSTACK-1522: Add timestamp to lock
Use higher precision timestamp rather than file timestamp to find out the order
of lock requester
2013-03-05 15:58:57 -08:00
Wei Zhou
1e24892dfe 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.
2013-02-12 09:22:04 -08:00
Gavin Lee
39a676c496 Correct license header mainly for patches folder
Signed-off-by: Chip Childers <chip.childers@gmail.com>
I've assumed that Gavin's commit is appropriate, based
on an assumption that we will keep these files in the source
tree.  If https://issues.apache.org/jira/browse/LEGAL-146
results in a different opionion from the members, then we
will end up having to do something more drastic anyway.
2012-08-31 10:50:46 -04:00
frank
2f634c0913 Switch to Apache license 2012-04-03 04:50:05 -07:00
frank
52610ffcb3 add copyright header to shell scripts 2012-01-11 18:41:53 -08:00
Sheng Yang
f98191be5c Fix domr's file lock
And add more information for domr's file lock
2012-01-10 14:25:43 -08:00
Sheng Yang
7e6bbf9b16 Discard rrouter lock
Then we can make all the actions in sequence
2011-12-30 15:00:59 -08:00
Sheng Yang
c44db2557d bug 11772: Add improved version of locking for the scripts in the systemvm
Because currently the lock in the script is retried every 1 second, and it's a
quite a long time that it's possible for some other active script can be
executed and retain the lock again. So it's possible that the first one request
the lock is always being preemptted by others, then finally got timeout.

To fix this issue, the retry interval is reduced to 0.1 seconds, which would
provide more retry times. And each process want to get the lock would create a
file named lockname-PID.lock, and only the first one(judged by timestamp) would
get the lock. The remaining ones would retry every 0.1 seconds to see if it can
get the lock.

Also timeout time is extended to 30 seconds.

And add testcase for it.

status 11772: resolved fixed
2011-11-01 19:06:14 -07:00
Sheng Yang
abc44ac283 bug 11266: Add lock file for every script in the systemVM
To prevent them from racy.

status 11266: resolved fixed
2011-09-09 18:27:33 -07:00
Sheng Yang
c7a887a51c bug 11266: Add lockfile for scripts in system vm
Otherwise it's easy to trigger the racy issue.

This one just contained fix for reconfigLB.sh
2011-08-25 19:37:14 -07:00