Init script incorrectly handles stop and/or multiple starts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openerp-server (Ubuntu) |
Fix Released
|
Medium
|
Daniel Hahler | ||
Hardy |
Won't Fix
|
Undecided
|
Unassigned | ||
Lucid |
Won't Fix
|
Undecided
|
Unassigned | ||
Maverick |
Won't Fix
|
Undecided
|
Unassigned | ||
Natty |
Won't Fix
|
Undecided
|
Unassigned | ||
Oneiric |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: openerp-server
1. Ubuntu version
Ubuntu version
Description: Ubuntu 8.04.3 LTS
Release: 8.04
2. Package version
openerp-
3. What you expected to happen
The init script should be able to launch only a openerp-server process and to stop it
4. What happened instead
The init script failed to stop the openerp-server if you previously call it with the start option more than once
The init script for openerp-server uses a combination of --pidfile and --exec options. Once started the openerp-server process no longer is called /usr/bin/
openerp 31572 1 55 16:59 ? 00:00:01 /usr/bin/python ./openerp-server.py --config=
If you run again the init script with the start option, start-stop-daemon is unable to find the openerp process (the combination of pid and process name doesn't exist) and tries to launch it again. This causes the pid file to be overwritten, and a new openerp process to be launched that eventually fails and stop due to address already in use.
If you then try to stop the openerp-server the init script is unable to do it, because the original pid file no longer exists.
This can be easily avoided changing the --exec parameter for --startas, so start-stop-daemon only checks for pid, and not process name.
Related branches
Changed in openerp-server (Ubuntu): | |
assignee: | nobody → Daniel Hahler (blueyed) |
status: | Triaged → In Progress |
This appears to be fixed, given version 5.0.15-2 (Ubuntu Oneiric):
% ps aux|grep openerp /etc/openerp- server. conf /etc/openerp- server. conf
openerp 16045 3.8 0.2 54572 17460 ? Sl 20:34 0:00 /usr/bin/python ./openerp-server.py --config=
% sudo invoke-rc.d openerp-server start
Starting openerp-server: openerp-server.
% ps aux|grep openerp
openerp 16045 2.3 0.2 54572 17460 ? Sl 20:34 0:00 /usr/bin/python ./openerp-server.py --config=