Bug #63
bashism in "one" script
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | Ruben S. Montero | % Done: | 0% | |
Category: | Core & System | |||
Target version: | Release 1.2 | |||
Resolution: | duplicate | Pull request: | ||
Affected Versions: |
Description
The "one" script has a bashism that causes a race condition when /bin/sh isn't bash.
It does this:
kill cat $ONE_PID
&> /dev/null
kill cat $ONE_SCHEDPID
&> /dev/null
...and removes the PID files immediately afterwards.
"foo &> bar" in bash is equivalent to "foo > bar", but in dash, it's equivalent to "foo > bar &", so "kill" and "rm" race to get to the PID file first. Every once in a while, rm wins and you get something like:
kill: 147: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or
kill -l [exitstatus]
..and either the scheduler or oned is still running.
The attached patch fixes this problem.
History
#1 Updated by soren-ubuntu-com - over 12 years ago
Sorry about the double posting.
Please see http://trac.opennebula.org/ticket/64 instead.
#2 Updated by Ruben S. Montero over 12 years ago
- Status changed from New to Closed
- Resolution set to duplicate