- Jul 16, 2009
-
-
Guido Trotter authored
I got overexcited and forgot we have to remain compatible with python 2.4. With this patch we move from sha256 to sha1 for hmac authenticated serialized messages, and we handle both newer and older python, by importing the right module for each. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 14, 2009
-
-
Guido Trotter authored
This function is not used. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Currently if a disk is added later the base_index is not considered, and all the disks are called disk0. This patch fixes it. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
This patch includes HMAC authenticated json messages to the serializer. The new interface works on any json-encodable data type, and can sign it with a private key and an optional salt. The same private key must be used upon message loading to verify the message. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jul 13, 2009
-
-
Michael Hanselmann authored
This resource can be used to retrieve and set the role of a node. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This was broken by my pylint fixes patch. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 08, 2009
-
-
Guido Trotter authored
When the parameter is set to True and start_daemons is also True, ganeti-masterd will be started with the new --no-voting --yes-do-it options. This new option is set to True only on masterfailover, when no_voting is used. This changed the behavior from 2.0, where we didn't start the master daemon at all, when this option was used. The manpage is also updated to remove the 2.0 only change. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This allows failing over in certain corner cases, such as a 2 node cluster with one node down. The man page is also updated to document this dangerous option and how to recover from this situation. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 07, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
If a user used ^Z to stop the program, poll() in socket.recv would return EAGAIN due to SIGSTOP. This patch changes luxi.Transport.Recv to ignore EAGAIN. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 01, 2009
-
-
Iustin Pop authored
With the change to stripped LVs, the actual size of a meta device (which is small) can be more than we expected (for non-stripped LVs). This patch increases from 160MB to 1GB the accepted size, and updates the comment with the rationale behind this change. Note that we do want even meta devices stripped, since it can increase metadata update. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
- Jun 30, 2009
-
-
Iustin Pop authored
Currently, when draining nodes we reset their master candidate flag, but we don't instruct them to demote themselves. This leads to “ERROR: file '/var/lib/ganeti/config.data' should not exist on non master candidates (and the file is outdated)”. This patch simply adds a call to node_demote_from_mc in this case. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch fixes a few node readd issues. Currently, the node readd consists of two opcodes: - OpSetNodeParms, which resets the offline/drained flags - OpAddNode (with readd=True), which reconfigures the node The problem is that between these two, the configuration is inconsistent for certain cluster configurations. Thus, this patch removes the first opcode and modified the LUAddNode to deal with this case too. The patch also modifies the computation of the intended master_candidate status, and actually sets the readded node to master candidate if needed. Previously, we didn't modify the existing node at all. Finally, the patch modifies the bottom of the Exec() function for this LU to: - trigger a node update, which in turn redistributes the ssconf files to all nodes (and thus the new node too) - if the new node is not a master candidate, then call the node_demote_from_mc RPC so that old master files are cleared My testing shows this behaves correctly for various cases. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
If the config file is missing when the DemoteFromMC() function is called, it will raise a ProgrammerError. Instead of changing the utils.CreateBackup() file which is called from multiple places, for now we only change the DemoteFromMC() function to not call it if the file is not existing (we rely on the master to prevent race conditions here). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
This patch modifies ConfigWriter.GetMasterCandidateStats to allow it to ignore some nodes in the calculation, so that we can use it to predict cluster state without some nodes (which we know we will modify, and thus we should not rely on their state). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
Currently the message for extraneous files on non master candidates is confusing, to say the least. This makes it hopefully more clear. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
- Jun 29, 2009
-
-
Iustin Pop authored
There are volume-related rpc calls. This patch renames the ‘volume_list’ call to ‘lv_list’ to make more clear its purpose. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
Before this case was not covered, and printed a stack trace. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
If an ident member of an IdentKeyVal relationship starts with no_ or -, handle it the same way we do for a key. Some unittests are added to check that check_ident_key_val behaves as expected. This patch also changes ForceDictType to, for now, fail on such an entry, and the same to happen when creating an instance or modifying its nics or disks. This behavior will be used later on to allow deletion of os entries in os parameters. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
If an empty string is passed to _SplitKeyVal, we should return {}, rather than {'': True}. Also test for the correct behavior. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Also, since Ganeti 2.1 will be compatible with both 10 and 15, change the OS_API_VERSION constant to be an OS_API_VERSIONS set, and update the places in the code that used that constat to use something else. In particular: - in the qa for now we just create a fake version 10 OS - in the os environment we use the highest common version (which means we need to pass in the os to OSEnvironment) - when loading an OS any common version will do Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
The api_versions list is first stripped and then converted to integer. Combining the two operations. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
The code for adjusting the candidate pool size was done after the config update, and this means we triggered the save of the config file without fixing the candidate pool, which aborts with an error. The patch just moves it above. The old comment was valid, but we anyway save the config file in MaintainCandidatePool, so this should be safe. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch adds a ‘role’ node list field, which shows a one-character node status. This is a simpler way to see the node status than selecting all the flags individually. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 26, 2009
-
-
Guido Trotter authored
A few places in the code open a file "manually" rather than using our wrapper function, because they need an array with the lines. Combining the result of utils.ReadFile with splitlines() we get rid of the exceptions. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This makes what versions we're talking about clearer. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 24, 2009
-
-
Guido Trotter authored
Making ssconf._ReadFile a wrapper over utils.ReadFile Signed-off-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 23, 2009
-
-
Iustin Pop authored
As per comments for patch “Convert node_start_master to new style result”, the ‘payload’ variable is renamed to ‘err_msgs’. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently the http library only checks credentials when authentication is required. This means that any credentials are accepted on the root resource, for example, which makes problems hard to diagnose - the user/pw works for all queries, until one tries to do a modification at which point fails. This patch changes the PreHandleRequest() function to not ignore credentials when passed, even if we don't require authentication. This makes the behavior of RAPI more predictable. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
The documentation for the reboot was wrong. This patch fixes it and updates the docstring with more details. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 19, 2009
-
-
Iustin Pop authored
This patch implements dry-run mode for the operations which modify the state of the cluster. Dry-run mode is enabled by passing a 'dry-run' query argument with positive integer value. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently LUCreateInstance has no result; this patch changes it so that both the normal result and the dry-run result is the node list of the selected instance. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch adds support for the dry-run mode for all command line operations, and also makes use of this for commands using the SubmitOrSend function. For the ones not using it, the flag has no effect (future patches). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch adds a new (global) opcode flag 'dry_run' which, when True, causes early exit from the LU workflow, returning a special value from the LU object (initialized in the parent LogicalUnit class, and which if not overriden from child LUs will be None). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This simple patch adds to all opcodes extension of the base opcode __slots__. This way we can add slots across all opcodes, for example 'dry-run'. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 18, 2009
-
-
Iustin Pop authored
There were multiple issues: - copy-paste resulted in wrong indentation - wrong function name - missing spaces around assignment - overriding built-in names (type, dir) or already defines ones (errors, hypervisor) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-