daemons: handle arguments correctly and uniformly
authorIustin Pop <iustin@google.com>
Tue, 29 Dec 2009 16:05:23 +0000 (17:05 +0100)
committerIustin Pop <iustin@google.com>
Mon, 4 Jan 2010 09:16:52 +0000 (10:16 +0100)
commitf93427cdde4b201478cff147b197bb12f8221362
treea2f4a5e3ea9f1ffc590eca1f908dbabf5b1a1a80
parent7ed85ffe3b7c52d47ceb299e0e6e457ae59fff4a
daemons: handle arguments correctly and uniformly

Of all daemons, only rapi did abort when given argument. None of our
daemons use any arguments, but they accepted them blindly. This is a
very bad experience for the user.

This patch adds checking and exiting in all daemons, in a uniform way.
One other option would have been to add a flag to GenericMain
(noargs=True).

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Olivier Tharan <olive@google.com>
daemons/ganeti-confd
daemons/ganeti-masterd
daemons/ganeti-noded
daemons/ganeti-rapi
daemons/ganeti-watcher