[Bug 869317] [NEW] Mailman startup script missing --force option.

Public bug reported:
I rebooted the VM that mailman was running on, when I tried to start mailman up after the reboot, i got this output:
$ mailman -C /etc/mailman.cfg start usage: mailman [-h] [-v] [-C CONFIG] {info,status,help,withlist,start,unshunt,create,stop,remove,lists,reopen,version,import21,inject,members,qfile,restart,aliases} ... mailman: error: A previous run of GNU Mailman did not exit cleanly. Try using --force.
Running with the --force option didn't work:
$ mailman --force -C /etc/mailman.cfg start usage: mailman [-h] [-v] [-C CONFIG]
{info,status,help,withlist,start,unshunt,create,stop,remove,lists,reopen,version,import21,inject,members,qfile,restart,aliases} ... mailman: error: unrecognized arguments: --force
** Affects: mailman Importance: Undecided Status: New
** Tags: mailman3

OK, the option is not missing, I was using it wrong. However, it still doesn't do anything!
$ mailman -C /etc/mailman.cfg start --force usage: mailman [-h] [-v] [-C CONFIG] {info,status,help,withlist,start,unshunt,create,stop,remove,lists,reopen,version,import21,inject,members,qfile,restart,aliases} ... mailman: error: A previous run of GNU Mailman did not exit cleanly. Try using --force.

I found the acquire_lock method and it seems to honor the force option, so the attached patch has allowed me to get past this stale lock situation.
** Patch added: "869317.patch" https://bugs.launchpad.net/mailman/+bug/869317/+attachment/2535454/+files/86...

** Changed in: mailman Milestone: None => 3.0.0b1
** Changed in: mailman Importance: Undecided => Medium
** Changed in: mailman Assignee: (unassigned) => Barry Warsaw (barry)
** Changed in: mailman Status: New => In Progress

The patch I uploaded doesn't really fix the problem. With that patch, if there is a stale lock file, it raises an AttributeError, then if you run with --force, you get a different error, and then if you try again without the --force option it starts up normally :/

On Oct 14, 2011, at 06:21 PM, Stephen A. Goss wrote:
The patch I uploaded doesn't really fix the problem. With that patch, if there is a stale lock file, it raises an AttributeError, then if you run with --force, you get a different error, and then if you try again without the --force option it starts up normally :/
I think I have a fix in my local copy, but I'm currently hung up on one particularly nasty test failure.

** Changed in: mailman Status: In Progress => Fix Committed

** Changed in: mailman Status: Fix Committed => Fix Released
participants (3)
-
Barry Warsaw
-
Barry Warsaw
-
Stephen A. Goss