LGTM, thanks
On Tue, May 20, 2014 at 5:35 PM, 'Klaus Aehlig' via ganeti-devel < [email protected]> wrote: > > > commit 1d21963cb45d632c05f98e7607e94ec0c9447ca5 > Merge: 5fdd0f8 22b6496 > Author: Klaus Aehlig <[email protected]> > Date: Tue May 20 17:23:33 2014 +0200 > > Merge branch 'stable-2.11' into stable-2.12 > > * stable-2.11 > Add missing import > Fix INicParams to include inicNetwork > Improve KVM userspace access documentation > > * stable-2.10 > Add --no-locks option to gnt-debug dela > Include design-performance-tests.rst in index > Document the --force-failover option > Support group evacuation by failover > Add an option --force-failover > Extend OpGroupEvacuate by a ForceFailover paramter > Mark performance tests design as implemented > openvswitch fix > Document the --sequential option > Support sequential evacuation > Add an option --sequential > Extend OpGroupEvacuate by a sequential paramter > > * stable-2.9 > Improve haskell style > check-man-warnings: use C.UTF-8 and set LC_ALL > Fix passing of ispecs in cluster init during QA > > Conflicts: > doc/design-draft.rst > lib/client/gnt_debug.py > lib/cmdlib/test.py > src/Ganeti/HTools/Program/Harep.hs > src/Ganeti/HTools/Program/Hspace.hs > src/Ganeti/JQueue.hs > src/Ganeti/OpCodes.hs > src/Ganeti/OpParams.hs > test/hs/Test/Ganeti/HTools/Instance.hs > Resolution: > lib/cmdlib/test.py: modify/remove resolved > in favor of the remove on stable-2.12 > */HTools/* and src/Ganeti/Op*: add both new > parameters to the delay opcode > rest: trivial union > > Signed-off-by: Klaus Aehlig <[email protected]> > > diff --cc doc/design-draft.rst > index e3531ee,deeb924..55bed7c > --- a/doc/design-draft.rst > +++ b/doc/design-draft.rst > @@@ -19,11 -19,7 +19,10 @@@ Design document draft > design-daemons.rst > design-hsqueeze.rst > design-os.rst > + design-move-instance-improvements.rst > design-node-security.rst > + design-systemd.rst > + design-cpu-speed.rst > - design-performance-tests.rst > > .. vim: set textwidth=72 : > .. Local Variables: > diff --cc lib/client/gnt_debug.py > index 5a18099,a3c96f3..478bbe1 > --- a/lib/client/gnt_debug.py > +++ b/lib/client/gnt_debug.py > @@@ -66,7 -65,7 +66,8 @@@ def Delay(opts, args) > on_master=opts.on_master, > on_nodes=opts.on_nodes, > repeat=opts.repeat, > - interruptible=opts.interruptible) > ++ interruptible=opts.interruptible, > + no_locks=opts.no_locks) > SubmitOrSend(op, opts) > > return 0 > @@@ -680,10 -630,9 +681,13 @@@ commands = > action="append", help="Select nodes to sleep on"), > cli_option("-r", "--repeat", type="int", default="0", dest="repeat", > help="Number of times to repeat the sleep"), > + cli_option("-i", "--interruptible", default=False, > dest="interruptible", > + action="store_true", > + help="Allows the opcode to be interrupted by using a > domain " > + "socket"), > + cli_option("-l", "--no-locks", default=False, dest="no_locks", > + action="store_true", > + help="Don't take locks while performing the delay"), > DRY_RUN_OPT, PRIORITY_OPT] + SUBMIT_OPTS, > "[opts...] <duration>", "Executes a TestDelay OpCode"), > "submit-job": ( > diff --cc lib/cmdlib/test.py > index a2c404b,98bbe3e..f7f43b6 > --- a/lib/cmdlib/test.py > +++ b/lib/cmdlib/test.py > @@@ -109,11 -52,11 +109,14 @@@ class LUTestDelay(NoHooksLU) > This expands the node list, if any. > > """ > - self.needed_locks = {} > + > + if self.op.duration <= 0: > + raise errors.OpPrereqError("Duration must be greater than zero") > > + if not self.op.no_locks and (self.op.on_nodes or self.op.on_master): > + self.needed_locks[locking.LEVEL_NODE] = [] > + > + self.op.on_node_uuids = [] > if self.op.on_nodes: > # _GetWantedNodes can be used here, but is not always appropriate > to use > # this way in ExpandNames. Check LogicalUnit.ExpandNames docstring > for > diff --cc src/Ganeti/HTools/Program/Harep.hs > index d257ed2,d3519fa..6599116 > --- a/src/Ganeti/HTools/Program/Harep.hs > +++ b/src/Ganeti/HTools/Program/Harep.hs > @@@ -427,7 -423,7 +427,8 @@@ doRepair client delay instData (rtype, > , opDelayOnNodes = [] > , opDelayOnNodeUuids = Nothing > , opDelayRepeat = fromJust $ mkNonNegative 0 > + , opDelayInterruptible = False > + , opDelayNoLocks = False > } : opcodes > else > opcodes > diff --cc src/Ganeti/JQueue.hs > index 303ac41,aa48ec8..dea4541 > --- a/src/Ganeti/JQueue.hs > +++ b/src/Ganeti/JQueue.hs > @@@ -64,23 -66,15 +64,23 @@@ module Ganeti.JQueu > , cancelJob > , queueDirPermissions > , archiveJobs > + -- re-export > + , Timestamp > + , InputOpCode(..) > + , QueuedOpCode(..) > + , QueuedJob(..) > ) where > > - import Control.Applicative (liftA2, (<|>)) > + import Control.Applicative (liftA2, (<|>), (<$>)) > import Control.Arrow (first, second) > -import Control.Concurrent (forkIO) > -import Control.Concurrent.MVar > +import Control.Concurrent (forkIO, threadDelay) > import Control.Exception > +import Control.Lens (over) > import Control.Monad > +import Control.Monad.IO.Class > +import Control.Monad.Trans (lift) > +import Control.Monad.Trans.Maybe > - import Data.Functor ((<$), (<$>)) > + import Data.Functor ((<$)) > import Data.List > import Data.Maybe > import Data.Ord (comparing) > diff --cc src/Ganeti/OpCodes.hs > index 5609030,eb24b0a..d5b3e01 > --- a/src/Ganeti/OpCodes.hs > +++ b/src/Ganeti/OpCodes.hs > @@@ -831,7 -814,7 +833,8 @@@ $(genOpCode "OpCode > , pDelayOnNodes > , pDelayOnNodeUuids > , pDelayRepeat > + , pDelayInterruptible > + , pDelayNoLocks > ], > "duration") > , ("OpTestAllocator", > diff --cc src/Ganeti/OpParams.hs > index 6eaff4c,c330c83..7aaec81 > --- a/src/Ganeti/OpParams.hs > +++ b/src/Ganeti/OpParams.hs > @@@ -236,7 -221,7 +237,8 @@@ module Ganeti.OpParam > , pDelayOnNodes > , pDelayOnNodeUuids > , pDelayRepeat > + , pDelayInterruptible > + , pDelayNoLocks > , pIAllocatorDirection > , pIAllocatorMode > , pIAllocatorReqName > @@@ -1585,13 -1489,12 +1599,19 @@@ pDelayRepeat > defaultField [| forceNonNeg (0::Int) |] $ > simpleField "repeat" [t| NonNegative Int |] > > +pDelayInterruptible :: Field > +pDelayInterruptible = > + withDoc "Allows socket-based interruption of a running OpTestDelay" . > + renameField "DelayInterruptible" . > + defaultField [| False |] $ > + simpleField "interruptible" [t| Bool |] > + > + pDelayNoLocks :: Field > + pDelayNoLocks = > + withDoc "Don't take locks during the delay" . > + renameField "DelayNoLocks" $ > + defaultTrue "no_locks" > + > pIAllocatorDirection :: Field > pIAllocatorDirection = > withDoc "IAllocator test direction" . > diff --cc test/hs/Test/Ganeti/HTools/Instance.hs > index 9212548,60c6ba1..60099a0 > --- a/test/hs/Test/Ganeti/HTools/Instance.hs > +++ b/test/hs/Test/Ganeti/HTools/Instance.hs > @@@ -35,9 -35,8 +35,9 @@@ module Test.Ganeti.HTools.Instanc > , Instance.Instance(..) > ) where > > +import Control.Arrow ((&&&)) > + import Control.Applicative ((<$>)) > import Control.Monad (liftM) > - import Data.Functor ((<$>)) > import Test.QuickCheck hiding (Result) > > import Test.Ganeti.TestHelper > > -- > Klaus Aehlig > Google Germany GmbH, Dienerstr. 12, 80331 Muenchen > Registergericht und -nummer: Hamburg, HRB 86891 > Sitz der Gesellschaft: Hamburg > Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores >
