Forbid the compression tools from being set over RAPI
Although we impose restrictions on what can be input as a compressiontool, someone with RAPI credentials could choose and execute a numberof commands by first setting the custom tools and then executing them....
Add the compression tools parameter
This patch makes the myriad of changes necessary for the compressiontool parameter to be added. The filtering of compression tools forsuspicious entries has been added for this exact purpose.
Signed-off-by: Hrvoje Ribicic <riba@google.com>...
Make arbitrary compression tools work
We assume that the compression tools the user supplies use stdin andstdout for handling data, and that a switch is used to distinguishcompression from decompression. This patch introduces these constraintsby adding the invocation of these tools to the import-export daemon....
Disable protections against unknown compression types
Ganeti took care to restrict all possible compression invocations tothe few options that were available. This patch strips away all ofthose, but does not allow any interesting and dangerous commands...
Extend offered compression types
This patch adds a few new types of compression supported by Ganeti:gzip-fast (gzip -1), gzip-slow (ordinary gzip), and lzop. gzip nowbecomes a shorthand for gzip-fast kept for compatibility.
Extend tests in preparation for new compression types
To ensure that later modifications are also noted in tests, this patchupdates the test to account for all compression types known.
Signed-off-by: Hrvoje Ribicic <riba@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Remove the unit test for verifying node's DRBD reservations
We'll need to reconstruct a similar test later when we add functions formanipulating the configuration directly to WConfd.
Signed-off-by: Petr Pudlak <pudlak@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Fix the mocked ConfigWriter to pass DRBD minors methods
.. since for unit tests, we don't have access to WConfd, which nowimplements the functionality.
Test the 'findFirst' function
Also add 'genSublist' which picks a random sublist from a given list.
Add DiskParams to Disk object
The 'DiskParams' slot was missing from Haskell's Disk objects.Since Wconfd is now responsible for writting the config file this wascausing the 'params' slot to not be written in the config file.
Signed-off-by: Ilias Tsitsimpis <iliastsi@grnet.gr>...
View revisions
Also available in: Atom