Revert and change the apidoc and coverage dirs
Based on Michael's suggestion, this patch partially reverts mychanges. The new directories are:
- doc/api/py- doc/api/hs- doc/coverage/py- doc/coverage/hs
Basically the Python-specific output moves one level down (into py/)...
Rename away htools/NEWS
Also add mention about it being obsolete.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Cleanup the Haskell-related Makefile.am variables
This should be more readable now. I wanted to even use the nicer_SOURCES, but _SOURCES is special in Automake (again), so _SRCS it is.
Remove obsolete htools/Makefile
Only one target wasn't ported over (the TAGS one), as hasktags is notavailable easily in distributions, so it doesn't make sense to enableit for all developers.
Move hlint rule to the main Makefile
Since we do have errors currently, this is not enabled from the main'make lint' rule. That will get cleaned up later.
Port the live-test htools rule to the main Makefile
This was a bit tricky, as the compilation from the top-dir changes thepaths in the .tix/.mix files.
Enable htools apidoc generation and unify dir names
Previously, Python api doc was under doc/api (which didn't match withthe target rule, apidoc). After this patch, we have the following:
- make py-apidoc generates Python api doc under doc/py-apidoc- make hs-apidoc generates Haskell api doc under doc/hs-apidoc...
Enable htools unittests and coverage reports
Since we have two sets of coverage data, we make the namingconsistent:
- doc/py-coverage for Python coverage- doc/hs-coverage for Haskell coverage
We also need to exclude some more dirs from the list of checked...
Fix parallel compilation for htools
We do it via per-target-binary .o/.hi files. There are a few otheroptions, in the end this was chosen as different binaries can havedifferent options/components (e.g. hail won't use RAPI, etc.) and thatthe unittests need different compilation options....
htools: add option to control the use of RAPI
RAPI needs the curl module, which is a binding to the libcurl Clibrary. This is more complex (can be compiled either against gnutlsor openssl, etc.) and it's not of much help when the tools are used onthe cluster itself, we disable it by default....
htools: install hail in the iallocator dir
Instead of bindir. We do this by adding a new allocdir variable, andredirecting hail to it.
Remove some obsolete htools files
Integrate htools's gitignore in top-level one
Makefile.am: add rules for htools compilation
This patch adds some (not very nice) rules for htoolscompilation. Since automake only knows about some languages, anddoesn't have a real extension mechanism, I cheat and declare them as"buildable scripts", instead of programs. Rationale:...
configure.ac: add checks for Haskell compiler/libs
This patch adds an enable/disable option for htools (--enable-htools),and associated tests for determining whether GHC (the compiler we usefor htools) and required libraries are present.
The method to do so is not very nice; usually, Haskell programs are...
RAPI client: Tidy and test WaitForJobCompletion
- Use constants- Don't sleep if no delay is given- Mark function as deprecated: it uses polling instead of waiting for changes (but the latter needs authentication); it can still be used- Add unittests...
RAPI client: Add job status constants
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
RAPI client: Job IDs are strings
Split BuildHooksEnv of LUs
Commit dd7f677623 added another call to BuildHooksEnv to providepost-phase status variables. Since BuildHooksEnv also built the nodelists, that meant they have to be built twice. First a rather strictcheck was used, but it turned out to be more tricky. Commit b423c51336...
cfgupgrade: really ignore hostname when told so
cfgupgrade provides a --ignore-hostname option, however consequently itspawns config.ConfigWriter, which refuses to handle a foreignconfiguration file by default.
config.ConfigWriter provides a relative keyword argument,...
RAPI client: fix epydoc formatting
Add a helper function to the RAPI client
This adds a new method WaitForJobCompletion that can be used forclient who are not interested in the entire job log, just in itscompletion status.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>...
Move htools-ganeti 2.3 design doc to doc/
I didn't know where to put in the TOC, so I added it after the ganeti2.3 design doc.
Also, it seems that Sphinx is a bit limited in its list nesting(compared to Pandoc), so I had to rework a bit the indentation (it...
Integrate htools man pages in the main tree
This moves the man pages to their right place, removes the staticfooter and header, and adds Makefile rules for the new .1 man pages.
Remove restrictive hook node list check
Commit dd7f67762 added a restrictive check for the node lists returnedby BuildHooksEnv, leading to errors with some LUs, one of which wasfixed in commit 0dfa2c227. As it turns out, other LUs have similarissues, some not easy to fix. This patch disables the restrictive check...
Revert "Add temporary dir/file for htools import"
This reverts commit 8bc9e04a21457c4188475dc849d0d7d1e22ee929, notneeded anymore.
Merge remote branch 'htools/master'
Add temporary dir/file for htools import
In order for “git merge -s recursive -X subtree=htools” to do itsmagic, an (mostly empty) directory must exist in the target tree name‘htools’. Hence we add a temp file to it before the merge, and removeit after that....
Fix hook node list when adding node
This broke QA (and everyone trying to add a node) by complaining aboutdifferent node lists.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
hooks: Provide variables with post-opcode values
When a hook is called, it is provided with a number of variablesdescribing the status of the instance/node/etc. before the operation.Some opcodes provide extra variables to see modified values from hooks,...
HooksMaster: Add more assertions for variable names
Also replace explicit loop with dict.update.
mcpu: Tidy HooksMaster a bit
- Dictionary indentation- Add empty lines for readability- Simplify conditional code
cmdlib: Factorize running post-pase hook
QA: Add tests for queries via RAPI
qlang: Remove unused import
RAPI: Add support for querying resources
- Access is only permitted for authenticated clients (queries can return sensitive data)- Filters can be specified when sending a PUT request- Updates RAPI client, documentation and tests
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Add support for query resources in RAPI URIs
masterd: Simplify code for field queries
Instead of going via cmdlib and using special cases for differentresources, the list of fields is used directly.
constants: Rename QR_OP_*, add QR_VIA_RAPI
Commit 28b71a76 added a list of resources which can be queried usingLUXI. Unfortunately the variable was named “QR_OP_LUXI”, which can beconfusing. This patch renames “QR_OP_QUERY” to “QR_VIA_OP”, “QR_OP_LUXI”...
qlang: Remove unused ReadSimpleFilter
TLReplaceDisks: Add check if disks are activated
Previously we failed later with a rather useless error message. Thispatch fixes this and tells the user to activate-disks if replace-disksis in the need of activated disks rather than abort with a cryptic error...
LUOsDiagnose: Move legacy behaviour into filter
The behaviour of LUOsDiagnose needs special treatment. Commit d22dfef7changed it to not return hidden, blacklisted or invalid OSes if therespective field is not requested. This behaviour needs to be preserved...
Convert OsDiagnose to query
qlang: Add some more documentation for filters
It's not perfect, but at least some more.
query: Add conversion wrapper
Allows converting the value of a column before returning it. Useful forsorting while still using one of the other generic functions forretrieving the value.
Fix epydoc warning about unknown reference
config: Wrap MatchNameComponent, reduce lock duration
- Remove duplication by merging two MatchNameComponent into a wrapper- Reduce lock duration by getting list of names under lock and then matching names without the lock- Also, ExpandNodeName's docstring is fixed....
opcodes: Document OpQueryFields' parameters
Update NEWS file for version 0.3.1
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Balazs Lecz <leczb@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Update copyright years in the man pages
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Balazs Lecz <leczb@google.com>
Remove obsolete env vars from the manpages
Commit 16c2369c removed support for using environment variables forselecting the text backend (since now it's just one option), butdidn't update the man pages.
Instance failover: fix bug for INT_MIRROR cases
Patches db366d9a and aac4511a added support for EXT_MIRROR instances,but inadvertently introduced a bug: for INT_MIRROR cases, we don'tneed (actually we can't support) neither an iallocator nor a targetnode....
gnt-cluster epo: Adding --power-delay flag
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
gnt-node power: Adding --power-delay flag
cli.py: Adding POWER_DELAY_OPT
The command line option --power-delay sets the time waited between powerons.
OpOobCommand: Adding power on delay
This delays the invocation of the power on of the next node. So if youpower on a bunch of nodes it will not blow the fuse.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
OpOobCommand: Document all fields
gnt-cluster epo: Adding --shutdown-timeout
This adds the --shutdown-timeout flag to gnt-cluster epo to specify theshutdown timeout for instance shutdown.
Rename DTS_NET_MIRROR to DTS_INT_MIRROR
DTS_INT_MIRROR better contrasts DTS_EXT_MIRROR.
Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>[iustin@google.com: updated patch for changed context]Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Shared file support for tools/burnin
Make burnin work with -t sharedfile and update burnin's help.
Shared block storage support is not included, as currently there is no way toprovision shared block storage from within Ganeti.
Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>...
KVM: use cache=none for shared disk templates
Disable host cache for externally mirrored disks to avoid cache incoherency.Without this, migrations between the same two nodes may end up in diskcorruption.
This is a runtime override of cluster defaults, mostly a workaround....
Shared storage instance failover
Modify LUFailoverInstance to enable shared storage instances to failover.Shared storage instance failover requires either a target node or aniallocator to determine the target node. If none is given, the cluster default...
Shared storage node migration
Modify LUNodeMigrate to provide node migration for nodes with instances usingshared storage. gnt-node migrate has to be passed an iallocator for migrationof shared storage instances to be performed. When using a shared storage...
Shared storage instance migration
Modify LUMigrateInstance and TLMigrateInstance to allow instance migrations forinstances with DTS_EXT_MIRROR disk templates.
Migrations of shared storage instances require either a target node, or aniallocator to determine the target node. If none is given, the cluster default...
CLI changes to facilitate shared storage migration/failover
Add DST_NODE_OPT to cli.py to use for directly specifying the target nodeduring migration/failover.
gnt-instance failover/migrate also get passed an iallocator option.
gnt-node failover/migrate get only a target_node option....
Migration and failover: add iallocator and target_node slots
Add iallocator and target_node slots to OpMigrateInstance andOpFailoverInstance to facilitate shared-storage-backed instance mobility. Addiallocator slot to OpMigrateNode (no explicit target_node in this case)....
IAllocator changes to work with shared storage
Make cmdlib.IAllocator shared-storage-aware. IAllocator requires secondarynodes only on DTS_NET_MIRROR disk templates and requires no secondaries forDTS_EXT_MIRROR templates.
Shared block storage support
This patch introduces basic shared block storage support.
It introduces a new storage backend, bdev.PersistentBlockDevice, touse as a backend for shared block storage. The new bdev requires a newBLOCKDEV_DRIVER_MANUAL constant with the value "manual" and uses it as...
Add bdev_sizes RPC call
The bdev_sizes multi-node RPC call returns the sizes of the requestedblock devices on the desired nodes. Its intended use is to verify theexistence of a block device on a given node for shared block storagesupport.
Block device paths are expected to lie under constants.BLOCKDEV_DIR...
QA: Improve tests for gnt-os
- Test OS lists via command line and RAPI- Test “gnt-os diagnose” and “gnt-os info”
QA: Add utility to ensure item is not in sequence
QA: Rename OS state test for clarification
Also add an additional check to ensure the OS does not exist.
QA: Use constants instead of hardcoded numbers
Log log-file reopening
This makes the log files get an record notifying of the reopen, so asto force creation of the log files soon after rotation.
Merge branch 'stable-2.4'
query: Add operator for truth
The “?” operator is the equivalent of “if var” in Python.
Release 2.4.0
NEWS update and version bump.
Merge branch 'devel-2.3' into devel-2.4
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Small improvement to the ganeti man page
Also specifies the comma-escaping feature.
Merge branch 'devel-2.2' into devel-2.3
Fix LUClusterRepairDiskSizes and rpc result usage
This LU was introduced before the RPC result conversion from .data to.payload, and it has managed to keep the old-style usage (how? it'sthe only LU that does so). Fix by changing to payload, and add some...
Fix RPC mismatch in blockdev_getsize[s]
Commit 92fd2250 added consistency checks in the RPC layer, which brokethe call_blockdev_getsizes RPC call (declared with 's' at the end inrpc.py, without 's' in the node daemon).
The immediate fix is to correct the rpc function name, the long term...
RAPI: fix evacuate node resource
PollJob returns the whole op_results, hence a list of opcode results.
gnt-instance rename: Update the man-page
In commit 31fe5102a a additional check was added. This patch rephrasesthe man page accordingly to address this change.
LUInstanceRename: Fail if renamed hostname mismatch
There's a problem if you run gnt-instance rename with a non FQDN and therenamed LU tries to resolve the hostname to make it FQDN. It could bethat this resolved hostname was just a CNAME to another name which leads...
Merge remote branch 'stable-2.4' into devel-2.4
Signed-off-by: Guido Trotter <ultrotter@google.com>...
Remove bridge field from rapi daemon
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Remove bridge field from rapi client
Fix test rapi request
This was wrong even before, as it contained both a bridge and a link,which are incompatible when passed together. Fix by passing only thelink field.
Remove deprecated 'bridge' nic parameter
This has been a synonym for "link" since a few major versions.Add a NEWS entry so we won't forget to mention it at release time.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Unhardcode constants from instance batch create
Add comments about INIC, IDISK and NIC constants
query: Fix bug when names are specified
If the client/caller would specify names through the use of a filter,the result would be sorted. This is a regression over earlier Ganetiversions and verified in QA. This patch adds an optional parameter tocontrol the sorting and provides unittests....
Fix typo in kvm-ifup script
Reported-by: Bas Tichelaar <bas@30loops.net>Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add DTS_MIRRORED frozenset
Use DTS_MIRRORED to indicate mirrored disk templates that allowmigrations/failover.
DTS_MIRRORED is the union of DTS_EXT_MIRROR and DTS_NET_MIRROR.
Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>Reviewed-by: Michael Hanselmann <hansmi@google.com>...
Shared file storage initialization code
Add shared file storage handling during cluster initialization.
Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Core shared file storage support
This patch introduces core file storage support, consisting of the following:
A configure-time switch for enabling/disabling shared file storagesupport and controlling the shared file storage location:--with-shared-file-storage-dir=. Shared file storage configuration is then...
Add shared file storage design doc
Add doc/design-shared-storage.rst to document the proposed changes and updateMakefile.am respectively.
cmdlib: Allow use of more complex filters
This patch finally enables the use of complex filters through opcodesand LUXI.
query: Add support for filters
This patch adds a “compiler” for query filters, converting them to acallable function used while preparing the query result. In addition, ahints call allows some analysis to be done on the query (e.g. referencednames), making data collection more efficient....