Use node UUID as client certificate serial number
It turns out, that some implementations of OpenSSL are morepedantic in checking the certficates than others. In thisparticular case, the SSL connection could not beestablished when the serial number of the certificates...
Revert "Temporarily remove SSL changes from NEWS file"
This reverts commit 89671df1c, which temporarily removedthe announcement of improved SSL security in the NEWS file.As this patch series fixes the SSL problem that causedthe disabling of the features, we are adding back the...
Revert "Disabling client certificate usage"
This reverts commit 45f75526b848, which was introduced totemporarily disable the implementation of SSL clientcertificates. As this patch series fixes the reason forthe disabling, we are rolling back the patch....
Fix watcher tampering with instance userdown QA
The watcher was tampering with the instance user down QA because, whenthe watcher sees an instance marked an 'USER_down', it will cleanupthe instance, that is it will stop the instance, thus marking it as...
Make htools and luxid mandatory in the Makefile
Since Ganeti now uses luxid for core operations, it needs to be alwayspresent.
Signed-off-by: Petr Pudlak <pudlak@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Add a config. conditional for running Haskell coverage
Similarly to PY_UNIT, add HS_UNIT to run Haskell coverage only if wehave the required modules.
Remove the HTOOLS configuration variable
.. and update the code that uses it.
Fix start/stop scripts to run luxid unconditionally
and update the unit check the list of daemons.
Make luxid's Haskell dependencies mandatory
in the build configuration files.
Update the list dependencies in INSTALL
In particular, move luxid's dependencies to the section with mandatorydependencies.
Temporarily remove SSL changes from NEWS file
Since the current changes in the SSL handling havebeen partially disabled, remove their announcementin the NEWS file until there is something actuallyuser-facing happening.
Signed-off-by: Helga Velroyen <helgav@google.com>...
Fix bracket style in rapi-workload
Pep8 complained about bracket indentation. This fixes it to satisfy Pep8as well as our style guide.
Signed-off-by: Petr Pudlak <pudlak@google.com>Reviewed-by: Hrvoje Ribicic <riba@google.com>(cherry-picked from ccded668c8a93fa25aaf21ddf5105270a04fe517)...
Gracefully handle queries for non-existing nodes
When adding a node, Ganeti checks whether the node is alreadypart of the cluster by querying for the node name. However,as queries are meant to return all nodes with the given name,it might well return the empty list when a new node is to be...
Consider job-IDs queried for twice only once
As reading jobs from disk is an expensive operation, when queryingfor jobs, we optimize by considering which values the job-id is askedfor in the filter. As any reasonable person would not add the sameclause twice in an Or-clause, the implicit assumption was that the...
Merge branch 'stable-2.10' into stable-2.11
Merge branch 'stable-2.9' into stable-2.10
Revision bump for 2.9.4
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Set release date for 2.9.4
Fix 'JobIdListOnly' type from 'List' to 'Map'
Note UUID identification change in NEWS file
Signed-off-by: Hrvoje Ribicic <riba@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Allow classic queries to use either names or UUIDs
When UUIDs are used in CLI commands, such addressing of objects failsor succeeds inconsistently across object types. Worse yet, some callsdo not fail, but simply return no result. This is due to the way the...
Remove NEWS entry for 2.9.4
Remove the NEWS entry for 2.9.4 temporarily until it actually getsreleased. Otherwise check-news would complain about the unreleasedversion below released ones.
The NEWS entry will be added back once 2.9.4 is released and the...
Document the change of noded's group in NEWS
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Change return type of internal rmJob
...to also provide the job itself. In this way, the function canalso be used for tasks that require temporarily removing a jobfrom the queue.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Petr Pudlak <pudlak@google.com>
When enqueuing new jobs, respect job ID
When adding new jobs, don't add them at the end, but at aposition that fits with their job id. In this way, we canbuild operations that require fully dequeing a job an addingit later after some modifications.
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Provide a function to change the priority of a queued job
There is a separation of responsibilities here. For jobs stillin the queue, it is the responsibility of the queue (scheduler),for started jobs, the job itself has to take care of it. To avoidthe job transitioning inbetween, it is temporarily dequeued during...
Implement ChangeJobPriority in luxid
For jobs still queued, we ask the queue to change the priority,and replicate the changed job. For jobs that have already beenstarted, we have to contact the job directly, which, at the moment,means forwarding the request to masterd....
Add a function changing the priority of an opcode
This pure function follows the semantic that an opcode, includingits priority, may only be changed if the opcode is not finalized.
Add a function to change the priority of a job
...by changing the priority of the non-finished opcodes.
Add functions for manipulating errors in Result(T)
There is often need to manipulate these errors, for example to convert a Stringfrom Result into an exception. These functions make this easier.
Function 'toErrorStr' lifts 'Result' to any 'MonadError'. This is useful...
Remove FromString in favor of Error from standard libraries
They have the very same functionality, and using our own FromString onlycauses unnecessary code duplication.
Signed-off-by: Petr Pudlak <pudlak@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>...
Add Alternative instances for GenericResult and ResultT
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 78209a84b0f6be27fd381ac2...
Workaround for monitor bug related to greeting msg
QMP may return multiple greeting messages upon connection.This is reported on qemu-devel. The fix is one-liner butuntil it get's released this is a quick and dirty workaroundthat flushes the client's buffer after getting the first...
hotplug: Verify if a command succeeded or not
Just after issuing _CallHoplugCommands() we invoke_VerifyHotplugCommand() which parses `info pci` resultand searches for given PCI slot and device id.
If we previously had removed a device but it is still there...
hotplug: Call each qemu commmand with an own socat
Previously we issued one socat command with two "\n" separatedactions (e.g. netdev_add ...\ndevice_add...)
After having observed a strange monitor behavior [1] splittingthose commands and introducing a sleep time in between, may reduce...
Merge branch 'stable-2.8' into stable-2.9
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Fix execution group of NodeD
The Node deamon was executed with the wrong gid (gnt-daemons) instead of the oneassigned to it by configure.ac.
Fixes Issue 707.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Add andRestArguments to IDiskParams
In this way, we cann pass through the opaque parametersrequired for disk creation and modification in the case ofexternal storage.
Add function providing the canonical andRestArguments
The field catching the remaining fields will always be of the sameshape, so add a function for this to make usage simple.
Add genAndRestArguments :: Gen (Map String JSValue)
So that objects using AndRestArguments are available for testing.As the AndRestArguments are intended for passing through additionalparameters passed on the command line, we restrict them to thevalues that are allowed at this position: Strings of ASCII characters...
Add additional constructor AndRestArguments to OptionalType
A field of this type will capture all the remaining fieldsof an object as JSValues. Obviously, the intended use isto have precisely one such field. This mechanism will allowto pass opaque values trough, as it is, e.g., required for...
Fix specification of TIDiskParams
Commit 580b1fdd incorrectly assumes that disk parameters arejust the standard ones, whereas the man page explicitly statesthat additional parameters can be passed as well, if they makesense for the chosen storage type. Fix this....
Make BlockDev subclasses adhere the interface for Create
In commit 702c3270 two new parameters were added to theCreate function of BlockDev. Make subclasses also adherethis specification.
Make the LUInstanceCreate return node names, not UUIDs
The LUInstanceCreate returned names instead of UUIDs in 2.6. Along theway, the names were internally replaced with UUIDs, and the abstractionleaked. This patch fixes the issue.
Signed-off-by: Hrvoje Ribicic <riba@google.com>...
Make BlockDev subclasses adhere to new interface
In commit 702c3270 two new parameters were added to theconstructor of BlockDev. Make the subclassess accept theseadditional parameters as well.
Make disk.name and disk.uuid available in bdev
Until now Disk name and uuid was not available on bdev level.In case of ExtStorage, this info is useful, and may be for othertemplates in the future too.
This patch treats the name and uuid object slots just like the size...
upgrade: start daemons after ensure-dirs
On upgrading a cluster, we only can rely on daemons startingup cleanly, if all needed directories are generated first. Soensure-dirs needs to be run first.
upgrade design: ensure-dirs before starting daemons
Align the automatic upgrade procedure with the manual upgradeinstructions and run ensure-dirs before starting the new daemons.This is necessary, as only after ensuring that all needed directoriesare present we can rely on the new daemons starting up cleanly....
Document new handling of degraded instances in NEWS
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Hrvoje Ribicic <riba@google.com>
Gracefully handle degraded instances in verification
The current code assumes that every instance either is of typediskless or has at least one disk. However, with the option toremove individual disk degraded 0-disk non-diskless instancescan occur. While such instances usually are not useful, Ganeti...
Be aware of the degraded case when cleaning up an instance
In the case of a degraded file-based instance, the file storage directoryfor that instance cannot be obtained by looking at the first disk. Usethe standard location, computed from first principles, in this case....
Fix network management section in admin.rst
..and clarify that IPv6 info currently does not get usedby Ganeti it self.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Add 'dnsmasq' section and TAP interface names
Adapt release date for 2.10.0-rc2
Postpone the rc2 release to Friday 31st.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Document changes to file-based disks in NEWS
Preserve disk basename on instance rename
For file-based instances, upon rename, the directory containingthe instance disks is moved. Therefore, the basename needs tobe preserved in this case. Fix this. Note that so far, thisworked by accident as before 94e252a3 file names used to be...
Revision bump for 2.10.0-rc2
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Update NEWS file in preparation of 2.10.0rc2
Include changes made in 2.8, 2.9 and in 2.10 in the NEWS file.
Update NEWS file
This patch updates the NEWS file with NEWS of the bugfix, adding thenew 2.9.4 version in progress.
Modify test to reflect RAPI operation changes
A rlib2 unittest tested for the wrong behaviour, and this patch changesthe inputs and expected values to account for this.
Add QA tests for RAPI multi-instance allocation
The instance multi-allocation had no tests to detect its breakage, andthis patch fixes that.
Fix multi-allocation RAPI method
The OpInstanceMultiAlloc that the instances-multi-alloc RAPI methoduses accepts a list of OpInstanceCreate opcodes rather than a list ofdictionaries as provided by the method. This patch correctly constructsthe opcodes, allowing the RAPI call to work as expected....
Make safeRenameFile create dirs with defined permissions
If, and only if, safeRenameFile creates a new directory, make sureit has well defined permissions. While there, also optimize for thecommon case. The main use of safeRenameFile is archiving jobs. As...
Add constant for subdir permissions within the job queue
When archiving jobs, new directories have to be created, asjobs are archived in groups of 10000. Add a constant describingthe permissions of these newly created directories.
Note that, due to the type, the constant cannot be part...
Add utility to fix permissions
Especially when creating new directories, we need to make sureownership and permissions are set correctly. Provide a functionto do so.
Add data type describing permissions and possibly owners
When creating new files, and, more importantly, new directoriesit is relevant to set permissions, and possibly owners, correctly.Provide a type specifying the target configuration.
Add Network Management section in admin.rst
This section provides some basic info regarding gnt-network design,adds a simple hands-on example and refers to external componentsthat gnt-network can interact with, in order instances will getthe desired configuration....
Assign unique filenames to filebased disks
With the new format for cmdline arguments, the user is able to add adisk to an instance at a specific index. But filebased disks' filenameshave the form "{0}/disk{1}" where '{0}' is the file_storage_dir and'{1}' is the index of the disk. So if an instance has 3 disks and we...
Add missing import
Enable network tags in Haskell code
Prior to the creation of the 2.10 branch, network tags were broken, andthe Haskell code introduced there mistakenly accepted this as thedesired functionality. This patch fixes this in a very simple way.
Add 'provider' to IDiskParams
IDISK_PROVIDER was included in python's IDISK_PARAMS, so itshould also be included in the Haskell code.
Now that luxid creates and enqueues jobs, without this patch theExtStorage interface is broken as the user can not pass the disk...
Haskell style: explicit errors, visible in the type
While it is already standard in the Ganeti code base, explicitlydocument that we do not like Exceptions and use sum types instead.
Clarify spacing in record syntax
So far, our code base does not have a consistent way of spacingrecords. To work towards more consistency, add a recommendationinto out style guide. We standardize on what seems most commonin the Haskell world and also is the dominant form in our code...
Improve the point-free section of the style guide
Distinguish declaring functions in the point-free style and usinga very similar technique to avoid parentheses (which isn't technicallypoint-free).
Add code style document to documentation
The Ganeti code style has been stored on the project wiki at:
https://code.google.com/p/ganeti/wiki/StyleGuide https://code.google.com/p/ganeti/wiki/HaskellStyleGuide
This commit combines the two pages into an .rst file with minimal...
Export docs from wiki to repo
Export documents about 'cluster keys replacement' and 'design filebased storage' from the wiki to the repository.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Revision bump for 2.9.3
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Jose Lopes <jabolopes@google.com>
Schedule 2.9.3 release
Disabling client certificate usage
This patch temporarily disables the usage of the clientSSL certificates. The handling of RPC connections had aconceptional flaw, because the certificates lack a propersignature. For this, Ganeti needs to implement a CA,...
Implement auto-archiving of jobs
As luxid is taking over the handling of the job queue, italso needs to handle the automated archiving of jobs. Herewe replicate the semantics of the current python implementationof archiving as many jobs older than the given time as possible,...
Add a utility function to try archiving jobs
Provide a function that walks through a list of job ids andarchives them if appropriate. Abort that process if a giventimeout is reached.
Support computation on Timestamp
As timestamps are also used to determine if an event is sufficientlylong in the past (e.g., on archiving jobs), support adding a timeinterval to a Timestamp.
Add constructor function for Timestamp
Provide means to get Ganeti's internal timestampsfrom standard clock time.
Add a predicate on Jobs on whether it can be archived
Jobs usually are archived a given time after they have finished.For finalized jobs without end-time, the start-time is taken enlieu. This function provides the pure predicate for this decision.
Make ArchiveJob in luxid create the archive, if necessary
As jobs are archived in groups of 10000, creating new subdirectoriesof the archive might be necessary when archiving a job. Use afunction that takes care of this.
Provide a safe version of rename
...that also creates the target directory, if needed.
Fix expectation for the return value of jobqueue_rename
On sucess, jobqueue_rename returns a list containing onenull per change request.
Document fix of issue 691 in NEWS
NEWS: fix typo in 2.8.4 release
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Petr Pudlák <pudlak@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Fix 'hvparams' of '_InstanceStartupMemory' on hypervisors
Most hypervisors were calling '_InstanceStartupMemory' but not passingthe 'hvparams' keyword argument. Actually, it is not necessary topass this argument given that it is an attribute in the instance...
Add missing option to gnt-instance documentation
Signed-off-by: Hrvoje Ribicic <riba@google.com>Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
With the merge of stable-2.8 into stable-2.9, quite a few fixesgot inherited.
Fix disk_type error in hypervisor parameter documentation
According to the code, presenting disks as paravirtual is supported onboth HVM and KVM, while IDE works only on KVM. This patch updates docsto be accurate.
fix off-by-one error in indentation
Version bump for 2.8.4 and NEWS update
Update the version number to 2.8.4 and insert the final details for thisrelease in the NEWS file, including the release date.
Implement ArchiveJob queries in luxid
With luxid taking over the tasks of masterd, archivingjobs also belongs to its responsibilities. As archivinga job affects the global state of the job queue, synchroniseover the queue lock.