- 06 Feb, 2014 17 commits
-
-
Jose A. Lopes authored
When an instance is being created, add an extra NIC (if necessary) which is meant to be used by the instance communication. Signed-off-by:
Jose A. Lopes <jabolopes@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Jose A. Lopes authored
* Add helper function that generates names of the form 'gnt.com.%d' which are the names for the TAP interfaces meant to be used by instance communication. These names are unique within the node. * Use the previous helper function to actually generate the name for the NICs of KVM instance being created. Signed-off-by:
Jose A. Lopes <jabolopes@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Jose A. Lopes authored
This is necessary in order to create TAP interfaces for the communication mechanism, which are named 'gnt.com.%d', where '%d' is a unique number within a given node. Signed-off-by:
Jose A. Lopes <jabolopes@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Jose A. Lopes authored
... including, user, group, daemonizing code with command line options, integration with the Snap HTTP server, and logic. Signed-off-by:
Jose A. Lopes <jabolopes@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Petr Pudlak authored
After Step 1 WConfD will handle the access to the configuration and will allow job-as-processes to access it. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
Describe how to use file lock to implement it in a POSIX compliant way. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
The Hoogle database is generated to doc/api/hs/ganeti.txt when Haddock is run. The database can be used by developers with a locally installed Hoogle command line tool or for a web installation of Hoogle. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Hrvoje Ribicic <riba@google.com>
-
Klaus Aehlig authored
* stable-2.11 Implement ChangeJobPriority in luxid Provide a function to change the priority of a queued job When enqueuing new jobs, respect job ID Change return type of internal rmJob Add a function to change the priority of a job Add a function changing the priority of an opcode 3 cherry-picks from master: Add functions for manipulating errors in Result(T) Remove FromString in favor of Error from standard libraries Add Alternative instances for GenericResult and ResultT Conflicts: src/Ganeti/BasicTypes.hs: use version of master Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
For jobs still queued, we ask the queue to change the priority, and replicate the changed job. For jobs that have already been started, we have to contact the job directly, which, at the moment, means forwarding the request to masterd. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
There is a separation of responsibilities here. For jobs still in the queue, it is the responsibility of the queue (scheduler), for started jobs, the job itself has to take care of it. To avoid the job transitioning inbetween, it is temporarily dequeued during the operation. The operation changes the file on master, while leaving the replication to the caller. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
When adding new jobs, don't add them at the end, but at a position that fits with their job id. In this way, we can build operations that require fully dequeing a job an adding it later after some modifications. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
...to also provide the job itself. In this way, the function can also be used for tasks that require temporarily removing a job from the queue. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
...by changing the priority of the non-finished opcodes. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
This pure function follows the semantic that an opcode, including its priority, may only be changed if the opcode is not finalized. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Petr Pudlak authored
There is often need to manipulate these errors, for example to convert a String from Result into an exception. These functions make this easier. Function 'toErrorStr' lifts 'Result' to any 'MonadError'. This is useful for converting 'Result' into 'ResultT' or any other similar monad stack. Functions 'catchErrorT' and 'handleErrorT' catch errors just as 'catchError' does, but also allow to change the error type. Functions `withError` and `withErrorT` allow to modify an error within GenericResult or ResultT. This is convenient when combining functions with different error types, for example to convert between strings and exceptions. Furthemore, 'failError' generalize 'Bad'. It can be used anywhere 'Bad' is, and in any 'MonadError' instance. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com> Cherry-pick of 565821d1 Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Petr Pudlak authored
They have the very same functionality, and using our own FromString only causes unnecessary code duplication. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com> Cherry-pick of a87a017b Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Petr Pudlak authored
This allows to use Alternative specific combinators, namely `optional`. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com> Cherry-pick of 78209a84 Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
- 04 Feb, 2014 15 commits
-
-
Petr Pudlak authored
Opening a file can fail as well, so catch errors there too. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
.. and convert them into a "Result". This is accomplished by using "liftIO" from ResultT. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Klaus Aehlig authored
The special field andRestArguments is intended to be only used as the last field of an object, catching all remaining keys. Add a compile-time check to verify that it is used correctly. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Jose A. Lopes authored
Signed-off-by:
Jose A. Lopes <jabolopes@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Jose A. Lopes authored
Signed-off-by:
Jose A. Lopes <jabolopes@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Jose A. Lopes authored
Signed-off-by:
Jose A. Lopes <jabolopes@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Jose A. Lopes authored
... because it is a protected definition. Signed-off-by:
Jose A. Lopes <jabolopes@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Jose A. Lopes authored
Signed-off-by:
Jose A. Lopes <jabolopes@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Petr Pudlak authored
* stable-2.11 Add andRestArguments to IDiskParams Add function providing the canonical andRestArguments Add genAndRestArguments :: Gen (Map String JSValue) Add additional constructor AndRestArguments to OptionalType Fix specification of TIDiskParams Make BlockDev subclasses adhere the interface for Create Make BlockDev subclasses adhere to new interface Make disk.name and disk.uuid available in bdev Add 'dnsmasq' section and TAP interface names Conflicts: src/Ganeti/THH.hs Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Klaus Aehlig authored
In this way, we cann pass through the opaque parameters required for disk creation and modification in the case of external storage. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
The field catching the remaining fields will always be of the same shape, so add a function for this to make usage simple. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
So that objects using AndRestArguments are available for testing. As the AndRestArguments are intended for passing through additional parameters passed on the command line, we restrict them to the values that are allowed at this position: Strings of ASCII characters and Integers. Also, another property guaranteed by the specification is that the keys in the map are different from all the other fields. To obtain this property without adding additional complexity to the test infrastructure, we choose a length for the keys that is longer than all the valid fields. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
A field of this type will capture all the remaining fields of an object as JSValues. Obviously, the intended use is to have precisely one such field. This mechanism will allow to pass opaque values trough, as it is, e.g., required for the disk parameters for external storage. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
Commit 580b1fdd incorrectly assumes that disk parameters are just the standard ones, whereas the man page explicitly states that additional parameters can be passed as well, if they make sense for the chosen storage type. Fix this. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
Klaus Aehlig authored
In commit 702c3270 two new parameters were added to the Create function of BlockDev. Make subclasses also adhere this specification. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
- 03 Feb, 2014 1 commit
-
-
Klaus Aehlig authored
In commit 702c3270 two new parameters were added to the constructor of BlockDev. Make the subclassess accept these additional parameters as well. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Petr Pudlak <pudlak@google.com>
-
- 31 Jan, 2014 1 commit
-
-
Dimitris Aragiorgis authored
Until now Disk name and uuid was not available on bdev level. In case of ExtStorage, this info is useful, and may be for other templates in the future too. This patch treats the name and uuid object slots just like the size one and passes them to BlockDev.__init__() and to BlockDev.Create(). The ExtStrorage interface exports these options to scripts via the VOL_CNAME and VOL_UUID environment variables. This fixes Issue 696. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
- 30 Jan, 2014 6 commits
-
-
Jose A. Lopes authored
Script to check whether the local dirty commits are changing files which do not have an updated copyright. The script will determine your current remote branch and local branch, from which it will extract the commits to analyze. Afterwards, for each commit, it will see which files are being modified and, for each file, it will check the copyright. Just call the script before pushing your changes and before devel/review. Signed-off-by:
Jose A. Lopes <jabolopes@google.com> Reviewed-by:
Hrvoje Ribicic <riba@google.com>
-
Jose A. Lopes authored
* add section 'dnsmasq' explaining how to configure dnsmasq to work with the communication mechanism * add names to TAP interfaces (e.g., ``gnt.com.0``) which allow DHCP servers to filter the TAP interfaces to bind to Signed-off-by:
Jose A. Lopes <jabolopes@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Petr Pudlak authored
This somewhat shortens and simplifies the code. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
This helps to handle errors coming from the Luxi client. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
Since we already touched getJobIDs, and this function is already based on ResultT, use new error functions here as well. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-
Petr Pudlak authored
Also simplify code and remove unused functions. Signed-off-by:
Petr Pudlak <pudlak@google.com> Reviewed-by:
Klaus Aehlig <aehlig@google.com>
-