- Jun 25, 2008
-
-
Iustin Pop authored
Currently, when seeing if a LV is degraded or not (i.e. virtual volume), we first attach to the device (which does an lvdisplay), then do a lvs in order to display the lv_attr. This generates two external commands to do (almost) the same thing. This patch changes the Attach() method for LVs to call lvs and display both the major/minor (needed for attach) and the lv_status (needed for GetSyncStatus). Thus, later in GetSyncStatus, we don't need to run lvs again, and instead just return the value computed in Attach(). Reviewed-by: imsnah
-
- Jun 24, 2008
-
-
Iustin Pop authored
This makes it easier to setup new git repositories, and makes it more likely all people have the same ignore rules. Reviewed-by: imsnah
-
- Jun 23, 2008
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Iustin Pop authored
Since the disabling of forking in the master daemon, the two ssh-based subcommands were not working anymore. However, there is no need at all for the commands to be run from the master daemon (permissions to read the cluster private ssh key notwithstanding), they can be run directly from the command line utilities. The patch removes the two opcodes OpRunClusterCommand and OpClusterCopyFile (and their associated LUs) and changes the code in ‘gnt-cluster’ to query the list of nodes and run directly the SshRunner over the list. As such, all forking is done from the gnt-cluster script, and the commands are working again. Reviewed-by: imsnah
-
Guido Trotter authored
If an uncaught exception is thrown currently it destroys the calling thread. This patch changes the behaviour to failing the current job, logging a message, but trying to keep the daemon up. Reviewed-by: imsnah
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
Automake automatically appends "--" to @mkdir_p@. In case you have a directory named "--" in your source tree, you can remove it using the command "rm -rf -- --". Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: ultrotter
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Guido Trotter authored
The failure is because in high load, the parent gets to run before the child has the chance to os._exit(), and therefore it is still running when the parent does the check. The fix removes the chance of this happening by waiting to receive a SIGCHLD (but not calling wait()) before trying to test the pid. Reviewed-by: imsnah
-
Michael Hanselmann authored
We decided to bump the major number to 2 a few weeks ago due to the huge number of changes going into it. Reviewed-by: iustinp
-
Michael Hanselmann authored
In cfgupgrade, we need to extract parts of and build new version numbers. Reviewed-by: iustinp
-
Michael Hanselmann authored
cfgupgrade will not work with relative paths at all, but rather get them from constants.py. Reviewed-by: iustinp
-
- Jun 22, 2008
-
-
Iustin Pop authored
Currently there isn't any easy way to list all nodes or instance and their tags; you have to query each node in turn, or list all the tags via something like “gnt-cluster search-tags '.*'”. Of course, this is not optimal. The patch adds a new fields to “gnt-instance list” and “gnt-node list” called ‘tags’, that will list the tags of the object in comma-separated form. This field will be empty if there are no tags (when using a separator this output can still be parsed by other scripts). At opcode level, there is a new fields called ‘tags’ that returns a (python) list of the object tags. Reviewed-by: ultrotter
-
- Jun 21, 2008
-
-
Iustin Pop authored
Currently the generic handling of ganeti errors in cli.py (GenericMain and FormatError) only handles the core ganeti errors, and not the client protocol errors (which live in a separate hierarchy). This patch adds handling of luxi errors too, and also adds another luxi error for the case when the master is not running. This gives us a nice: gnta1:~# gnt-node list Cannot communicate with the master daemon. Is it running and listening on '/var/run/ganeti-master.sock'? error message instead of a traceback. Reviewed-by: amishchenko
-
Iustin Pop authored
Currently we don't use twisted, so we remove the twisted checks from the configure stage. Reviewed-by: amishchenko
-
- Jun 20, 2008
-
-
Iustin Pop authored
This patch adds rpc layer calls (in rpc.py and the equivalent in ganeti-noded) to close a list of block devices, and the wrapper in backend.py that takes a list of Disk objects, identifies them and returns correctly formatted results. The reason why this very basic call was missing until now from the rpc layer is that we usually don't care about device closes (though we should, and will do so in the future) as only drbd has a meaningful Close() operation; right now we directly do Shutdown(). The patch is clean enough that it's actually independent of the live migration implementation. Reviewed-by: imsnah
-
- Jun 19, 2008
-
-
Michael Hanselmann authored
docbook2{man,pdf,html} are mandatory. "configure" aborts if one of them isn't found. Reviewed-by: iustinp
-
Iustin Pop authored
Reviewed-by: manuel.franceschini
-
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
-