- Jun 19, 2008
-
-
Michael Hanselmann authored
This change allows us to use cleaner dependencies between directories. The build system is basically rewritten in large parts and may contain bugs. Reviewed-by: iustinp
-
- Jun 18, 2008
-
-
Iustin Pop authored
The path to the filename for drbd8 proc data is not correctly computed when using distcheck. The patch duplicates it from the other drbd tests. Reviewed-by: ultrotter
-
Iustin Pop authored
Currently, compute the status of a drbd8 device in GetSyncStatus and return only the values that we need (and fit in the framework of GetSyncStatus). However, the full status details are useful (and needed) in other places, so the patch attempts to improve this situation. We abstract the status of a device outside in a separate class, that knows how to parse contents from /proc/drbd and set easily accessible attributes. We then simplify the GetSyncStatus to use this and return the values that it needs, and add a separate method that returns the full status object. The move to a separate class cleans up a little bit the old sync-progress computation from GetSyncStatus, but it's still many regexes. The patch also adds unittests for a few statuses, and modifies one BaseDRBD call to accept a custom filename instead of '/proc/drbd' to ease unittests. Reviewed-by: imsnah
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
This is the safest way to detect changes and the amount of data is small, so keeping a copy around is cheap enough. Reviewed-by: iustinp
-
Michael Hanselmann authored
Cleanup: _data is private and should not be modified from outside of this class. Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
- Lock it before renaming - Code cleanup; close() automatically unlocks it Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
- Make closing file optional: Required by ganeti-watcher to keep file open after writing it. Changes return value of utils.WriteFile if "close" parameter evaluates to True. - Pre- and post-write functions: Can be used to lock files. This will be used by ganeti-watcher to lock the temporary file before renaming. Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: ultrotter
-
Michael Hanselmann authored
- Log timestamp for all messages - Write everything to logfile and optionally to stderr - Log messages are no longer buffered, allowing a user to see progress Reviewed-by: ultrotter
-
Michael Hanselmann authored
Also fix the regular expression to not remove newlines. The simplejson module puts whitespace at line endings when using indentation. Remove unnecessary import of ConfigParser module. Reviewed-by: ultrotter
-
- Jun 17, 2008
-
-
Iustin Pop authored
Currently, the way to customize a DRBD disk from (node name 1, node name 2, port) to (ip1, port, ip2, port) is to use the ConfigWriter method SetDiskID. However, since this needs a ConfigWriter object, it can be run only on the master, and therefore disk object can't be passed to more than one node unchanged. This, coupled with the rpc layer limitation that all nodes in a multi-node call receive the same arguments, prevent any kind of multi-node operation that has disks as an argument. This patch takes the SetDiskID method from ConfigWriter and ports it to the disk object itself, and instead of the full node configuration it uses a simple {node_name: replication_ip} mapping for all the nodes involved in the disk tree (currently we only pass primary and secondary node since we don't support nested drbd devices). This allows us to send disks to both the primary and secondary nodes at once and perform synchronized drbd activation on primary/secondary nodes. Note that while for the 1.2 branch this will not change old methods, it is worth to investigate and possible replace all such calls on the master to the nodes themselves for the 2.0 branch. Reviewed-by: ultrotter
-
Iustin Pop authored
There is a mistake in handling grow-disk for an invalid disk. This patch fixes it. Reviewed-by: imsnah
-
Iustin Pop authored
The patch documents the steps needed to complete a user-visible grow (i.e. not only grow-disk, but also filesystem resize is needed, etc.) Reviewed-by: imsnah
-
Iustin Pop authored
This patch exposes at command line level the grow-disk operation. Reviewed-by: imsnah
-
Iustin Pop authored
This patch adds a new opcode and LU for growing an instance's disk. The opcode allows growing only one disk at time, and will throw an error if the operation fails midway (e.g. on the primary node after it has been increased on the secondary node). As such, it might actually leave different sized LVs on different nodes, but this will not create problems. Reviewed-by: imsnah
-
Iustin Pop authored
This patch adds a method that implements updating of a disk (object.Disk) size, together with its children. While this will not track the exact disk size, it allows at least an approximate size to be recorded in the configuration (and queried). Reviewed-by: imsnah
-
Iustin Pop authored
This simple patch exposes the block device grow operation at the rpc layer. It does not increase the protocol version as it has been recently changed by the live failover rpc call. Reviewed-by: imsnah
-
- Jun 16, 2008
-
-
Iustin Pop authored
This patch adds a wrapper over the block device grow operation that converts the input and output parameters as needed for the rpc layer. Reviewed-by: imsnah
-
Iustin Pop authored
This patch implements disk resize at the bdev level for the LVM and DRBD8 disk types. It is not implemented for DRBD7 and MD since the way MD works with its underlaying devices makes it harder and this combination is also deprecated. The LVM resize operation is tried three times, with different allocation policies: - contiguous first, since this is best for allocation purposes (it won't fragment too much the PV) - cling, which is supported only by more recent LVM versions, will try to place the new extents on the same PV as the rest of the LV - and finally normal, which is the default Reviewed-by: imsnah
-
Guido Trotter authored
Before we used to be able to update SimpleStore by just calling SetKey, this feature is now moved to an external class, which inherits from it. In this patch the new WritableSimpleStore class is also put to use, in the LUs that need it. Rather than making each LU instantiate it, we have a new LogicalUnit flag REQ_WSSTORE which defaults to False, but when declared to be True asks the LogicalUnit to be initialized with a writeable version of the SimpleStore. LUMasterFailover and LURenameCluster are then changed to use it. InitCluster is also changed to instantiate a WritableSimpleStore, rather than a normal one. Reviewed-by: imsnah
-
Iustin Pop authored
This patch adds the migration rpc call and its implementation in the backend. The patch does not deal with the correct activation of disks. Because of the new RPC, the protocol version is increased. Reviewed-by: imsnah
-
Iustin Pop authored
This is just the hypervisor-level migration (e.g. “xm migrate”) not the whole node coordination work. Reviewed-by: ultrotter
-
- Jun 15, 2008
-
-
Guido Trotter authored
When replacing disks or evacuating nodes with instances administratively down ganeti fails because the instance disks are not active. This patch activates them, performs the replacement, and shuts them down again. Changing this also fixes the same issue on gnt-node evacuate. Reviewed-by: iustinp
-
Guido Trotter authored
We're not adding a new instance, just making configuration changes to the one we're working on. Reviewed-by: imsnah
-
Guido Trotter authored
Currently the iallocator option is ignored by burnin at import/export time even if passed in. With this patch it becomes used. The log message used by the importer is also changed to reflect this. This patch also improves import/export on the non-iallocator case: - The secondary node is not passed anymore on non-mirrored templates - On mirrored templates the secondary node is logged Reviewed-by: imsnah
-
Iustin Pop authored
There is a mistake in the error message generated when we can't reach a node for checking for available disk space. Without it, the error message is: Failure: prerequisites not met for this operation: Cannot get current information from node '{u'gnte2.lab.k1024.org': {'cpu_total': 1, 'memory_free': 480, 'vg_size': 131068, 'memory_total': 504, 'bootid': '2176dd3b-2f96-42f0-8b6e-2873ecaf5f9c', 'memory_dom0': 134, 'vg_free': 130172}, u'gnte1.lab.k1024.org': False}' instead of the expected: Failure: prerequisites not met for this operation: Cannot get current information from node 'gnte2.lab.k1024.org' Reviewed-by: imsnah
-
- Jun 13, 2008
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
- Shorter code - Reorder arguments to logger.SetupLogging calls to make more sense Reviewed-by: iustinp
-
Guido Trotter authored
When a Job raises a ganeti exception a message is printed but nothing is reported in the job itself. It's better to update the job status, thus notifying the client, possibly polling for the job result, of what went wrong. Reviewed-by: iustinp
-
Guido Trotter authored
s/result/op_result/ (this code was never used, so this wasn't caught) Reviewed-by: iustinp
-
- Jun 12, 2008
-
-
Michael Hanselmann authored
Not all distributions have the same version of aclocal, autoconf or automake. Users can pass the name of a specific executables via environment variables. Change configure.ac to require at least autoconf 1.9. Reviewed-by: iustinp
-
Michael Hanselmann authored
This allows us to initialize a new cluster. The code certainly contains bugs and hooks aren't implemented yet. Reviewed-by: iustinp
-
Michael Hanselmann authored
This is required for splitting the cluster initialization code. Reviewed-by: iustinp
-
Michael Hanselmann authored
This is required for the split of the cluster initialization code. Reviewed-by: iustinp, ultrotter
-
Michael Hanselmann authored
It's not needed anymore now that all opcodes require a cluster. Cluster initialization was the only exception. Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
…/run/master.sock is not specific enough. Reviewed-by: iustinp
-