- Mar 11, 2010
-
-
Iustin Pop authored
This is similar to the Haskell function, except that the signature is reverse to match the 'any' and 'all' Python functions. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This makes the Log function able to take multiple args for simplified message construction, similar to the ToStdout one. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
In simulate errors mode, the test "ntime_diff is not None" will be ignored, and thus a None value will try to be formatted as %.01f. We workaround this by formatting it before, and then only using %s, which can format a 'None' value. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
We don't need the pwentry when checking if a username exists, just to be sure the KeyError is not returned. Remove the variable, and thus shut up lint. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 10, 2010
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Initially we only support the "user" model (in which the user running the virtual machine can be specified as an additional parameter). We use usernames rather than uids in this mode, because the kvm -runas flag doesn't support uids anyway, and we check the passed username for validity. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
These constants add two new kvm hypervisor parameters, specifying the security model (user/pool) and the security domain, within that model. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
This adds tests for the stacking of objects.Cluster.FillHV to verify that the override is working as expected. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Passing <quote> rather than ' avoids having special characters at the beginning of the line, which man doesn't like. Signed-off-by:
Guido Trotter <ultrotter@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>
-
Iustin Pop authored
Since we index the nodes and instances by their name, we should have checks that the dict key to object.name mapping is correct. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
The upcoming python 2.6.5 release has a change that makes delattr(obj, attr) fail for slots-enabled objects if the attr is not already set. To prevent against this, we only run the delattr if the attribute is already set. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
This makes it the first argument show, for example under "ps". Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Newer virtio can boot from the network perfectly well, so there's no point in keeping this restriction in place. This will still fail on older kernels. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
The gnt-instance manpage only contained the correct syntax for xen-pvm. Specify what the kvm syntax is, and also warn about a problem with virtio+netboot, for older kvm versions. Signed-off-by:
Guido Trotter <ultrotter@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
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
To simplify writing unittests, one data structure class in http.server is also changed. According to the coverage utility, this provides 95% coverage. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
When username and password were sent for a resource not requiring authentication, it wouldn't be accepted if the user in question had a hashed password. The reason was that the function GetAuthRealm used to return None if no authentication was necessary. However, the authentication realm is necessary to verify hashed passwords. This is fixed by requiring GetAuthRealm to always return a realm and separating the decision whether to require authentication or not to a separate function. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 09, 2010
-
-
Guido Trotter authored
There were a few outdated options specified there. This patch unifies the description under only one section, and updates it. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This allows one to cleanly set a node offline and promote as needed other nodes. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
The current code in LUSetNodeParms regarding the demotion from master candidate role is complicated and duplicates the code in ConfigWriter, where such decisions should be made. Furthermore, we still cannot demote nodes (not even with force), if other regular nodes exist. This patch adds a new opcode attribute ‘auto_promote’, and changes the decision tree as follows: - if the node will be set to offline or drained or explicitly demoted from master candidate, and this parameter is set, then we lock all nodes in ExpandNames() - later, in CheckPrereq(), if the node is indeed a master candidate, and the future state (as computed via GetMasterCandidateStats with the current node in the exception list) has fewer nodes than it should, and we didn't lock all nodes, we exit with an exception - in Exec, if we locked all nodes, we do a AdjustCandidatePool() run, to ensure nodes are locked as needed (we do it before updating the node to remove a warning, and prevent the situation that if the LU fails between these, we're not left with an inconsistent state) Note that in Exec we run the AdjustCP irrespective of any node state change (just based on lock status), so we might simplify the CheckPrereq even more by not checking the future state, basically requiring auto_promote/lock_all for master candidates, since the case where we have more than needed master candidates is rarer; OTOH, this would prevent manual promotion ahead of time of another node, which is why I didn't choose this way. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently backend.NodeVolumes() drops everything except the first PV, thus we get a truncated result. The patch is not the nicest, as Python doesn't have a simple `concat' function, so I had to change the list comprehension to an explicit loop. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
The return from LUVerifyCluster should be True (or equivalent) for pass, and False (or equivalent) for fail. The HooksCallBack function uses '1' (= True) when a hook fails, which is exactly the opposite of what we want - it will make failed hooks to reset the result to success, overriding actual failures in cluster verify. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
We need to manually filter out offline nodes before using rpc.call_upload_file and rpc.call_write_ssconf_files, since these method are static (they work without a ConfigWriter instance) and thus do not know which nodes are offline and which are not). Note that we add a new ConfigWriter._UnlockedGetOnlineNodeList() method rather than hardcoding the filtering of online nodes in _WriteConfig. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
This finishes the integration of per-os-hypervisor parameters by updating the man page. Signed-off-by:
René Nussbaumer <rn@google.com> Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
Introduce “gnt-os modify” command to make it possible to set the per-os-hypervisor parameters. Signed-off-by:
René Nussbaumer <rn@google.com> Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
Let gnt-cluster info show us the per-os-hypervisor parameters. Signed-off-by:
René Nussbaumer <rn@google.com> Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
This patch implements all modifications to support per-os-hypervisor parameters in the framework. Signed-off-by:
René Nussbaumer <rn@google.com> Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Mar 08, 2010
-
-
Timothy Kuhlman authored
Each nic should be connected to its own qemu vlan, to avoid them all bridging together. Signed-off-by:
Timothy Kuhlman <timkuhlman@gmail.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This way we can re-use file objects opened in other places. Also add more unittests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch adds validation of new names used, i.e. at cluster init time, node add time, and instance creation. For instances, especially when using «--no-name-check» (which skips DNS checks), we should validate the give name, and also normalize it (otherwise, we could have two instances named inst1 and Inst1). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This differs slightly from the specification, by allowing names to start with digits, not checking the length of individual components, and allowing underscores. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch changes ListVisibleFiles to raise ProgrammerError if it's passed a non-absolute/non-normalized path name, and adds unittests for this behaviour. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This should remove most of the remaining constructs which can be replaced by PathJoin. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Since in objects we don't have access to utils.py, we add a warning that the result value from objects.Disk.StaticDevPath might not be a valid path, and change its only caller to validate the path. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This switches hv_kvm to PathJoin. There are still a few cases of direct path construction, but those _should_ be safe. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-