- Apr 16, 2010
-
-
Balazs Lecz authored
Signed-off-by:
Balazs Lecz <leczb@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Balazs Lecz authored
Signed-off-by:
Balazs Lecz <leczb@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Balazs Lecz authored
Signed-off-by:
Balazs Lecz <leczb@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Balazs Lecz authored
Signed-off-by:
Balazs Lecz <leczb@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Balazs Lecz authored
Signed-off-by:
Balazs Lecz <leczb@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Apr 15, 2010
-
-
Michael Hanselmann authored
This will be used by the new import/export daemon to split output by its child processes into lines. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
There are a few issues with disabled file storage: - cluster initialization is broken by default, as it uses the 'no' setting which is not a valid path - some other parts of the code require the file storage dir to be a valid path; we workaround by skipping such code paths when it is disabled A side effect is that we abstract the storage type checks into a separate function and add validation in RepairNodeStorage (previously a luxi client which didn't use cli.py and submitted an invalid type would get "storage units of type 'foo' can not be repaired"). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Commit 43575108 added bootstrap.GenerateclusterCrypto and commit 7506a7f1 changed cfgupgrade to use it. However, this lost the functionality of upgrading in non-default DATA_DIR. To fix this, we enhance bootstrap.GenerateclusterCrypto to accept custom file paths for the three files it modifies. If more files will be needed in the future, we could just pass in modified DATA_DIR, but for now it suffices. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
René Nussbaumer authored
* Be more clear about when POST and PUT should be used * Be more verbose on parameters * Describe allowed parameter values (if not self explaining) Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Apr 12, 2010
-
-
Iustin Pop authored
When importing an instance, all the saved valued will be used as explicitly specified values, overriding the cluster defaults. This means export+import will change the status (from default to explicitly specified) of parameters. This patch adds a new option that changes the behaviour to identify parameter values which are equal to the current cluster defaults and mark them as such. It does this for hv, be and nic parameters. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently the instance creation checks the cluster hv defaults + the new parameters for validity, ignoring the os-specific hvparams (this was an oversight during the implementation of the os hvp). This patch uses the new GetHVDefaults method to provide the defaults, instead of reading directly the attributes of the cluster object. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently the FillHV method is the one that does the cluster hvparams + os hvparams merger. However, in some cases we need to do just this, without adding the instance hvparams on top. This patch adds a function to compute just this (hv + os hvp combination) default dict, and modifies FillHV to use it to build the final dict. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
If the user doesn't pass any nics in import, do not use a default one-nic, but instead read the nics from the export file as is. Fortunately the export and the way nics are read from the command line are compatible… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Similar to the previous patches, if we're missing some parameters and the export has them (either in the new style or old-style), we reuse them. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
If the user doesn't pass the disk information on import, automatically reuse the number and size of disks. This loses the iv_name attribute, but that is only cosmetic and cannot be changed by the user. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
If available, we reuse the parameters from the export info. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch changes the instance import to read the disk template automatically from the export info, if the opcode doesn't already specify a disk template. To do this, we have a couple of additional changes: - change from required parameter to optional one for disk_template - move check for disabled file storage at ./configure time to the generic _CheckDiskTemplate checker - move checks of the disk template from CheckArguments to CheckPrereq Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
We move the reading of the export to a separate function, to simplify CheckPrepreq and also read it earlier. This will allow building the missing opcode parameters from the export information, instead of requiring all of them on the command line. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This is needed since only in CheckPrereq we have the nodes locked, and future import enhancements will need to have access to the export info during the parameter build. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
ExpandNames holds too much non-locking code (first LU to be converted to ExpandNames, and we didn't have CheckArguments at that poin), and this patch moves the checks that are lock-independent to CheckArguments. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently the backend parameters are not exported automatically, but only a few directly in the '[instance]' section. Hypervisor type and hypervisor parameters are not exported at all. This patch creates two separate sections for the be and hv parameters, and stores the parameters (including ones that come from the cluster defaults, but not the hypervisor globals for example) in the export. The import code is not changed yet. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
The patch tries to export all params (based on the dict defined in constants), using None for missing keys. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This fixes an old 'FIXME' entry. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Apr 09, 2010
-
-
Guido Trotter authored
Under squeeze pylint reports the following errors: ************* Module ganeti.serializer E1103:155:LoadSignedJson: Instance of 'False' has no 'get' member (but some types could not be inferred) ************* Module ganeti-masterd E1103:166:ClientRqHandler.handle: Instance of 'False' has no 'get' member (but some types could not be inferred) E1103:167:ClientRqHandler.handle: Instance of 'False' has no 'get' member (but some types could not be inferred) ************* Module gnt-instance E1103:431:BatchCreate: Instance of 'False' has no 'keys' member (but some types could not be inferred) For the first two cases it's actually wrong: we had checked before that the variable on which "get" is called is actually a dict. In the third case though such check doesn't exist, so we add it. Then we silence the error all three times. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This patch changes the coverage parameter to allow specification of max coverage (via -1), versus auto-computation (default, 0) and manual specification. Unittests are updated for this case too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 08, 2010
-
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This will be used to conditionally enable the watcher node maintenance feature. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This new callback simply stores (without calling any lower-level callback) the last result; coupled with the filtering callback, this ensures that it has the 'best' response after all have been received. The result can then be retrieved via the GetResponse method. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently, there is no way for a user of the confd client library to know how many replies there should be, whether all have been received, etc. This is bad since we can't reliably detect the consistency of the results. This patch attempts to fix this by adding a synchronous WaitForReply function that will wait until either a timeout expires, or until a minimum number of replies have been received (interested users should add similar functionality for the async case). The callback functionality will still do call-backs into the user-provided code during the wait, but after this function has returned, we know that we received all possible replies. Note: To account for the interval between initial send of the request, and calling of this function, we modify the expiration time of the request. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently the requests are tracked in _request and in _expire_requests. This is conventient, but it restricts the ability to extend the request tracking, e.g. via packet stats and/or extension of expiration time. This patch introduces a new simple class _Request that holds all properties of pending requests; it then uses instances of this class as values in _request instead of tuples, and removes the _expire_requests. The only drawback is the change in behaviour of _ExpireRequests: previously, it used to scan the list only up to the first non-expired request, after which it aborted. Now it will scan the entire dict, which (depending on workload) could change the time behaviour. I don't think this is a problem, as: - deleting from the head of a list is very expensive (list.pop(0); list.append() is an order of magnitude more expensive than deleting an element from a dictionary and re-adding it) - we should have more than tens or hundreds of pending requests; in case this assumption changes, we could introduce a no-more-often-than-X expiration policy, etc. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 07, 2010
-
-
Iustin Pop authored
Commit 49b3fdac added consistency checks, but these are wrongly triggered for old responses - we need to make sure to check that we have the same serial. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Commit dfdc4060 added WaitForFdCondition which uses utils.Retry without handling timeout exceptions. This breaks any nested retry loops. This patch fixes the above function, and also changes utils.Retry to detect and warn future similar cases. In addition, we add a few small unittests for utils.Retry. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
After commit 76e5f8b5, mkdir_mode in utils.RenameFile is no longer passed to Makedirs. This is fixed by this patch. 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>
-
- Apr 06, 2010
-
-
David Knowles authored
Signed-off-by:
David Knowles <dknowles@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Signed-off-by:
Iustin Pop <iustin@google.com> (modified slightly the unittest to account for missing httplib2 library)
-
Iustin Pop authored
Note that users of the callback will have to manually check the attribute. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Most creation of confd clients will do the same steps: read MC file, parse it, read HMAC key, etc. We abstract this functionality so that we don't duplicate the code. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 31, 2010
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Everything still works the same way, but the user is calculated each time we start kvm, rather than stored in the config file. This makes it easier to implement the "pool" security model. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-