Updates:
Status: Fixed
Comment #1 on issue 819 by [email protected]: Move temporary reservation
managers from config.py to WConfD
https://code.google.com/p/ganeti/issues/detail?id=819
Fixed in:
commit e8127e662ab617558494c8bb1f07a86c81babe75
Author: Petr Pudlak <[email protected]>
Date: Fri Jul 4 11:14:20 2014 +0200
Add basic serialization tests for TempRes's data types
In particular, test serialization of IPv4Reservation, which is used
on the Python part as well.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit eb84f8ae8e9f1b5e90d9312b87dc1a6d2003430f
Author: Petr Pudlak <[email protected]>
Date: Fri Jul 4 18:26:25 2014 +0200
Add equality and serialization tests for MultiMap
We verify that 'readJSON . showJSON == Ok' and that maps are equal iff
keys map to the same values.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 904edb90b8f4871886274cb5522766afb4c5afa6
Author: Petr Pudlak <[email protected]>
Date: Fri Jul 4 18:44:21 2014 +0200
Add an utility function for generating random maps
It generates random pairs of keys/values and constructs a map from them.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 7a371ab0e07fe1d0dd0aee24eb9ab1e5ca2d47da
Author: Petr Pudlak <[email protected]>
Date: Mon Jun 30 16:56:00 2014 +0200
Move old reservation code to Python tests
.. so that tests that require these calls still work.
Also use the mocked configuration for some tests that require
functions related to IP reservations.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit cacb3563a0ee72229d10e441c94ee31651f2cadb
Author: Petr Pudlak <[email protected]>
Date: Mon Jun 30 16:54:21 2014 +0200
Let config.py call WConfd for IP reservations
Also remove unnecessary constants.
Furthermore remove configuration synchronization locks that aren't
needed any more.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit a2774cc2d6f9e61d72caee42c7296904656ba291
Author: Petr Pudlak <[email protected]>
Date: Mon Jun 30 16:50:51 2014 +0200
Expose IP reservations through WConfd RPC
This corresponds to the currents IP reservation methods in ConfigWriter.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 89671c8b44ab83a146b83bb99c71dc3cd6bc3bfe
Author: Petr Pudlak <[email protected]>
Date: Mon Jun 30 16:41:20 2014 +0200
Enhance functions for modifying the configuration in WConfd
In particular, allow the modifying function to fail with an error, which
will then be reported in the WConfd monad, and use logging.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit c9fb3bf914933f5981874b3dedbc72fd4e607bed
Author: Petr Pudlak <[email protected]>
Date: Tue Jul 1 15:22:30 2014 +0200
Atomic updates of an IORef with logging and errors
For complex pure functions that update an IORef it's convenient to be
able to log error messages. This function makes it possible by
accumulating error messages from the pure function, threading them
through atomicModifyIORef and logging them afterwards at once.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 43d640b9e617ea007841ca324c5dde846a646367
Author: Petr Pudlak <[email protected]>
Date: Tue Jul 1 15:20:38 2014 +0200
Add an alias for WriterLogT Identity
.. and corresponding helper functions.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 127e5104b3fc9fd4d1bede6f861c23914778eb8b
Author: Petr Pudlak <[email protected]>
Date: Tue Jul 1 14:26:50 2014 +0200
Add functions for temporary reservations of IP addresses
.. that follow the original Python implementation.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 8acd66c8f2d67105871c012a3f8cbfe0a13c5bc6
Author: Petr Pudlak <[email protected]>
Date: Tue Jul 1 14:24:42 2014 +0200
Refactor and add utility functions for temp. reservations
In particular, for reserving a value given the set of reserved ones,
looking up networks by a UUID and for creating stateful computations.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 63443ac1448b3aeae5094a5b1c0a4552e2d26ca9
Author: Petr Pudlak <[email protected]>
Date: Fri Jul 4 15:37:00 2014 +0200
Remove 'generate' from TempRes module
.. as it's not useful anywhere outside.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 3ef26235285ae39983000756cce93b431884824c
Author: Petr Pudlak <[email protected]>
Date: Tue Jul 1 14:21:58 2014 +0200
Ensure that temp.res. functions throw ReservationError
Before many of them threw just GenericError.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 51841fe88dff9b6375af07f53845c18c435ae905
Author: Petr Pudlak <[email protected]>
Date: Mon Jun 30 12:48:37 2014 +0200
An lens-like utility function for accessing a Container
Given a key, it constructs a lens over a container.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 2d2157d550faa65729765b06747251361b06f60b
Author: Petr Pudlak <[email protected]>
Date: Mon Jun 30 11:40:44 2014 +0200
Make AddressPool included within Network
And add functions for making reservations on a Network object.
Currently AddressPool is only a thin wrapper for BitArray, because:
- all operations need information from Network about the allowed address
range; and
- having richer structure in AddressPool would require changes in the
configuration format.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 66f53a80eacebd5e1bea6be991122676ef0f983d
Author: Petr Pudlak <[email protected]>
Date: Mon Jun 30 11:38:29 2014 +0200
mapMOf2: traversing a lens over a monad + applicative
This is similar to 'traverseOf2', just that the outer part is a monad.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 4efb0309f423a50008b27b26090b1a8155a3d1b8
Author: Petr Pudlak <[email protected]>
Date: Mon Jun 30 10:04:49 2014 +0200
Add module for implementing bit arrays in Haskell
Internally, they're implemented using IntSets, which work quite well for
both sparse and dense sets. The implementation is hidden outside the
module so it's possible to replace it with something else, if needed.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 3a0d7e53c0b431ad1c7842da22888031df2ba5a1
Author: Petr Pudlak <[email protected]>
Date: Thu Jun 5 15:25:10 2014 +0200
Hide the implementation of Ip4Address
This will allow to replace the implementation later, if we need more
complex operations on IP addresses, add IPv6 etc.
(Package 'iproute' would be a good candidate.)
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 6b5da3fa4a3020720fa656d4a828d8676caa7e78
Author: Petr Pudlak <[email protected]>
Date: Thu Jul 3 17:12:15 2014 +0200
Persist temporary reservations in WConfd
.. as it needs to be stored and reloaded if WConfd is restarted while
jobs are running.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 3b51c2a1746d3a771135a62901becf77db50142e
Author: Petr Pudlak <[email protected]>
Date: Thu Jul 3 17:00:57 2014 +0200
Add JSON instances for temporary reservation data structures
.. so that they can be persisted.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 1b75c626890c1f2dbe90ca0f7b8b5271796a90de
Author: Petr Pudlak <[email protected]>
Date: Wed Jul 2 18:22:29 2014 +0200
Abstract WConfd resources that need to be saved/loaded
Currently, the part that loads/saves locks is generic, with no lock
specifics. Abstract it so that it can be reused for temporary
reservations.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
...
commit 60ce98de0a8b30c1dbd35b459bf33d0ed2a73317
Author: Petr Pudlak <[email protected]>
Date: Wed Jun 4 10:22:34 2014 +0200
Add the old LV reservation code to mocked config
.. so that the unit tests work without the presence of WConfd
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 56c1134115beb6e77f8ee6712b6f151d38fe7005
Author: Petr Pudlak <[email protected]>
Date: Tue Jun 3 17:27:17 2014 +0200
Let ConfigWriter call WConfd for reserving LVs
.. instead of using a local store.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 11e166c1daeb047ffb98a75b37792a907af006b4
Author: Petr Pudlak <[email protected]>
Date: Tue Jun 3 17:26:22 2014 +0200
Export the function for reserving LVs for WConfd's RPC
.. so that it can be called from config.py
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit a3b90f582a0cf981bad8053ca7c1673215e55696
Author: Petr Pudlak <[email protected]>
Date: Tue Jun 3 17:25:31 2014 +0200
Handle reservations of temporary logical volumes in WConfd
.. and export the corresponding function.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit f695afe5f65e24acea1638d37df320e850a2787e
Author: Petr Pudlak <[email protected]>
Date: Tue Jun 3 17:19:47 2014 +0200
Add Haskell functions for listing LVs of instances
.. and also all LVs in the cluster.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit ab4cf3931c6df7b2a134522e3ba2b5532330d7e4
Author: Petr Pudlak <[email protected]>
Date: Tue Jun 3 17:23:06 2014 +0200
Add 'fromList' to MultiMap
.. so that it can be easily constructed from a list of key-value pairs.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 4d73099ba78fb93d13e881eccd99d5e30ed51bf9
Author: Petr Pudlak <[email protected]>
Date: Tue Jun 3 17:24:17 2014 +0200
Add (de)serialization tests for LogicalVolume
Also test that invalid LV names fail to parse.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 4f913230a98e7f24d14ef3a87f57b9fa6b0f7343
Author: Petr Pudlak <[email protected]>
Date: Tue May 27 15:42:07 2014 +0200
Add a Haskell data type for logical volumes
That is, for a pair "group" and "volume".
The data type (de)serializes to/from JSON as a String of the form
"group/volume".
Fix tests broken by the change.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 6f4035cd336859d3897c5f85ceb6535b3a7f7472
Author: Petr Pudlak <[email protected]>
Date: Wed May 28 11:38:50 2014 +0200
Add a monad for validation
This monads wraps the writer monad. It allows a computation to emit
multiple errors messages and deal with them at the end.
This will be used for configuration verification, as well as for other
verification purposes such as verification of JSON input.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
...
commit 7e39b0076e945c15d2ffe533b789963bef492608
Author: Petr Pudlak <[email protected]>
Date: Wed May 28 14:53:47 2014 +0200
Add the old DRBD secrets reservation code to mocked config
.. so that the unit tests work without the presence of WConfd.
Also fix mocked GenerateMAC, which used _temporary_ids by mistake in the
original ConfigWriter.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit c02daabdb46bc01c17c15efb60d266e15942fe87
Author: Petr Pudlak <[email protected]>
Date: Tue May 27 10:14:36 2014 +0200
Let ConfigWriter delegate DRBD secrets to WConfd
Also WConfd handles proper synchronization internally so there is no
need to explicitly lock the configuration in ConfigWriter.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit cfe1f843ef4b4357464db3bfed958de922e3b7b9
Author: Petr Pudlak <[email protected]>
Date: Tue May 27 10:11:55 2014 +0200
Add DRBD secrets to temporary reservations
Expose the generation method through WConfd's RPC interface.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit de81e4e7801d81a3bd7c3962377c76876da96ceb
Author: Petr Pudlak <[email protected]>
Date: Tue May 27 10:10:29 2014 +0200
A function for listing all DRBD secrets in a cluster
This will be needed to properly generate and reserve new secrets.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit cbbc551b243d6d0a374cfc1c0bc0df2f78562082
Author: Petr Pudlak <[email protected]>
Date: Tue May 27 10:06:42 2014 +0200
Use a type alias for DRBD secrets
.. instead of just String. This is a minor step towards better
distinguishing distinct concepts with types.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 3d203354d329bd774f2b117890bb02d61c5580d3
Author: Petr Pudlak <[email protected]>
Date: Tue May 27 10:05:03 2014 +0200
Move collecting DRBD disk data to a generalized function
The same pattern that has been used for gathering DRBD minors will be
used for DRBD secrets etc.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 331663dd18852f18c3656eb039fb012163150708
Author: Petr Pudlak <[email protected]>
Date: Tue May 27 10:03:20 2014 +0200
Move generateOneMAC to the new Utils.Random module
.. since it's a general, randomized function.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit d5c2dad6e0d818583981e2c4a2cb84c05694809b
Author: Petr Pudlak <[email protected]>
Date: Mon May 26 17:18:31 2014 +0200
Add a module for randomized computations
.. and add a function for random secrets, just as we have in Python
code.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
...
commit 1d425eb98f2ebf99546377f13123c1853b02366b
Author: Petr Pudlak <[email protected]>
Date: Fri May 23 13:16:12 2014 +0200
Add the old MAC reservation code to ConfigMock
.. so that unit tests work without the presence of WConfd..
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit f28eb679278d76ec15849826b9db1e8e56aa3ed8
Author: Petr Pudlak <[email protected]>
Date: Thu May 22 18:04:06 2014 +0200
Forward MAC reservations from ConfigWriter to WConfD
Also call it for dropping reservations when a job finishes.
And remove the field for temporary DRBDs, that has been already moved to
WConfD.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 6a221b7913eeae0e2d48716e4f5b517d9caa70dd
Author: Petr Pudlak <[email protected]>
Date: Thu May 22 18:02:21 2014 +0200
Expose MAC reservations to WConfd's RPC interface
.. and also a function for dropping all reservations (currently just
MACs).
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 8628a4963e226ef6c8e77dde612164cee667c313
Author: Petr Pudlak <[email protected]>
Date: Thu May 22 18:00:45 2014 +0200
Add functions for reserving MAC addresses
For this, add an internal Tempres data structure that implements
functionality similar to the one in config.py.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 9edb01907bbaed4e019754a05546ffc843ceb1d1
Author: Petr Pudlak <[email protected]>
Date: Thu May 22 17:58:07 2014 +0200
Add a function for listing all MAC addresses in a cluster
.. collected from all network interfaces of all instances.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
...
commit be7ea0294df233cde8a49cf1d81c2871fc4f476c
Author: Petr Pudlak <[email protected]>
Date: Fri May 9 15:12:45 2014 +0200
Remove the unit test for verifying node's DRBD reservations
We'll need to reconstruct a similar test later when we add functions for
manipulating the configuration directly to WConfd.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 560c03eda6f6fc56393c75d8e364de20f8450834
Author: Petr Pudlak <[email protected]>
Date: Fri May 9 14:30:25 2014 +0200
Fix the mocked ConfigWriter to pass DRBD minors methods
.. since for unit tests, we don't have access to WConfd, which now
implements the functionality.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 9271c98e6fd9181fc318ec7403edd60c794d0b6a
Author: Petr Pudlak <[email protected]>
Date: Wed May 7 16:24:54 2014 +0200
Replace DRBD reservations in config.py with WConfd calls
.. and remove unused code.
The verification of the configuration needs to be later included in the
configuration verification checks in WConfd (see issue #759).
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit dddcb604c5ed26bf8fe7ab4ed53bd8a6e669b9d2
Author: Petr Pudlak <[email protected]>
Date: Wed May 7 16:20:31 2014 +0200
Export RPC functions for temp. DRBD reservations in WConfd
These functions will replace the methods in config.py.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 1d82406d083a842da4b9c73e442e1486296258e3
Author: Petr Pudlak <[email protected]>
Date: Wed May 7 16:17:58 2014 +0200
Add the state of temporary DRBD reservations to WConfd
.. and the corresponding functions for reading/modifying them.
The modification functions are somewhat more complex, because they need
to support that the modification function uses ConfigData and can
possibly fail (when the configuration is inconsistent).
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 40d4538be6599d8d6ca79475ca020265141c62ca
Author: Petr Pudlak <[email protected]>
Date: Wed May 7 16:14:52 2014 +0200
Utility function for modifying an IORef using a lens
.. and a supplied function that works inside the lens.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit c5daf4e61b4dfc4d0b4ccaf14675bba801cd8e9e
Author: Petr Pudlak <[email protected]>
Date: Wed May 7 11:55:37 2014 +0200
New module for temporary reservation of config. resources
This patch adds the first step, the reservation of DRBD minors.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 113b60565aa1a1ff64f3685f6c3f2d157b85c60a
Author: Petr Pudlak <[email protected]>
Date: Fri May 9 16:35:55 2014 +0200
Test the 'findFirst' function
Also add 'genSublist' which picks a random sublist from a given list.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit 4116c9e0d1c521f0429387a472c78b3a447e8193
Author: Petr Pudlak <[email protected]>
Date: Wed May 7 11:53:16 2014 +0200
A utility function for finding the first unused element
.. in a given set. This is similar to FindFirst function in our Python
code-base, but this one automatically picks the element after the end of
the set, if the set has no holes.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
commit a90c41e2f8c2ebe7bf2ce71695c58df54a028bf8
Author: Petr Pudlak <[email protected]>
Date: Wed May 7 11:45:40 2014 +0200
A function for listing the DRBD minors of an instance
This includes nested disk children.
Signed-off-by: Petr Pudlak <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings