Skip to content
Snippets Groups Projects
Commit 4f73cfc9 authored by Iustin Pop's avatar Iustin Pop
Browse files

Merge branch 'devel-2.7'


* devel-2.7:
  Change hbal behaviour in case of early exit
  Fix build/sphinx_ext.py with tuple defaults for op params
  Fix bug in man build rule
  Fix hscolour style sheet building

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
parents 777e8b6f 2d6bdcc5
No related branches found
No related tags found
No related merge requests found
...@@ -1317,7 +1317,7 @@ man/%.gen: man/%.rst lib/query.py lib/build/sphinx_ext.py \ ...@@ -1317,7 +1317,7 @@ man/%.gen: man/%.rst lib/query.py lib/build/sphinx_ext.py \
man/%.7.in man/%.8.in man/%.1.in: man/%.gen man/footer.rst man/%.7.in man/%.8.in man/%.1.in: man/%.gen man/footer.rst
@test -n "$(PANDOC)" || \ @test -n "$(PANDOC)" || \
{ echo 'pandoc' not found during configure; exit 1; } { echo 'pandoc' not found during configure; exit 1; }
set -o pipefail ; \ set -o pipefail -e; \
trap 'echo auto-removing $@; rm $@' EXIT; \ trap 'echo auto-removing $@; rm $@' EXIT; \
$(PANDOC) -s -f rst -t man $< man/footer.rst | \ $(PANDOC) -s -f rst -t man $< man/footer.rst | \
sed -e 's/\\@/@/g' > $@; \ sed -e 's/\\@/@/g' > $@; \
...@@ -1847,10 +1847,8 @@ $(APIDOC_HS_DIR)/index.html: $(HS_LIBTESTBUILT_SRCS) Makefile ...@@ -1847,10 +1847,8 @@ $(APIDOC_HS_DIR)/index.html: $(HS_LIBTESTBUILT_SRCS) Makefile
rm -rf $(APIDOC_HS_DIR)/* rm -rf $(APIDOC_HS_DIR)/*
for i in $(ALL_APIDOC_HS_DIRS); do \ for i in $(ALL_APIDOC_HS_DIRS); do \
@mkdir_p@ $$i; \ @mkdir_p@ $$i; \
$(HSCOLOUR) -print-css > $$i/hscolour.css; \
done done
$(HSCOLOUR) -print-css > $(APIDOC_HS_DIR)/Ganeti/hscolour.css
$(LN_S) ../hscolour.css $(APIDOC_HS_DIR)/Ganeti/HTools/hscolour.css
$(LN_S) ../hscolour.css $(APIDOC_HS_DIR)/Ganeti/Confd/hscolour.css
set -e ; \ set -e ; \
export LC_ALL=en_US.UTF-8; \ export LC_ALL=en_US.UTF-8; \
OPTGHC="--optghc=-isrc --optghc=-itest/hs"; \ OPTGHC="--optghc=-isrc --optghc=-itest/hs"; \
......
...@@ -98,6 +98,10 @@ Version 2.7.0 beta1 ...@@ -98,6 +98,10 @@ Version 2.7.0 beta1
- Instance renames of LVM-based instances will now update the LV tags - Instance renames of LVM-based instances will now update the LV tags
(which can be used to recover the instance-to-LV mapping in case of (which can be used to recover the instance-to-LV mapping in case of
emergencies) emergencies)
- ``hbal`` will now exit with status 0 if, during job execution over
LUXI, early exit has been requested and all jobs are successful;
before, exit status 1 was used, which cannot be differentiated from
"job error" case
Version 2.6.2 Version 2.6.2
......
#!/bin/bash #!/bin/bash
# #
# Copyright (C) 2012 Google Inc. # Copyright (C) 2012, 2013 Google Inc.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -20,5 +20,5 @@ ...@@ -20,5 +20,5 @@
set -e set -e
! grep -F -q '\[em]' "$1" || \ ! grep -F '\[em]' "$1" || \
{ echo "Unescaped dashes found in $1, use \\-- instead of --" 1>&2; exit 1; } { echo "Unescaped dashes found in $1, use \\-- instead of --" 1>&2; exit 1; }
# #
# #
# Copyright (C) 2011, 2012 Google Inc. # Copyright (C) 2011, 2012, 2013 Google Inc.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -168,15 +168,15 @@ def _BuildOpcodeParams(op_id, include, exclude, alias): ...@@ -168,15 +168,15 @@ def _BuildOpcodeParams(op_id, include, exclude, alias):
has_test = not (test is None or test is ht.NoType) has_test = not (test is None or test is ht.NoType)
buf = StringIO() buf = StringIO()
buf.write("``%s``" % rapi_name) buf.write("``%s``" % (rapi_name,))
if has_default or has_test: if has_default or has_test:
buf.write(" (") buf.write(" (")
if has_default: if has_default:
buf.write("defaults to ``%s``" % default) buf.write("defaults to ``%s``" % (default,))
if has_test: if has_test:
buf.write(", ") buf.write(", ")
if has_test: if has_test:
buf.write("must be ``%s``" % test) buf.write("must be ``%s``" % (test,))
buf.write(")") buf.write(")")
yield buf.getvalue() yield buf.getvalue()
...@@ -335,8 +335,8 @@ def BuildValuesDoc(values): ...@@ -335,8 +335,8 @@ def BuildValuesDoc(values):
""" """
for name, doc in values: for name, doc in values:
assert len(doc.splitlines()) == 1 assert len(doc.splitlines()) == 1
yield "``%s``" % name yield "``%s``" % (name,)
yield " %s" % doc yield " %s" % (doc,)
def _ManPageNodeClass(*args, **kwargs): def _ManPageNodeClass(*args, **kwargs):
......
...@@ -53,7 +53,7 @@ respective state, ``--pending`` includes both. ...@@ -53,7 +53,7 @@ respective state, ``--pending`` includes both.
CHANGE-PRIORITY CHANGE-PRIORITY
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
| **change-priority** --priority {low | normal | high} | **change-priority** \--priority {low | normal | high}
| {[\--force] {\--pending | \--queued | \--waiting} | *job-id* ...} | {[\--force] {\--pending | \--queued | \--waiting} | *job-id* ...}
Changes the priority of one or multiple pending jobs. Jobs currently Changes the priority of one or multiple pending jobs. Jobs currently
......
...@@ -26,13 +26,13 @@ ADD ...@@ -26,13 +26,13 @@ ADD
~~~ ~~~
| **add** | **add**
| [--network=*NETWORK*] | [\--network=*NETWORK*]
| [--gateway=*GATEWAY*] | [\--gateway=*GATEWAY*]
| [--add-reserved-ips=*RESERVEDIPS*] | [\--add-reserved-ips=*RESERVEDIPS*]
| [--network6=*NETWORK6*] | [\--network6=*NETWORK6*]
| [--gateway6=*GATEWAY6*] | [\--gateway6=*GATEWAY6*]
| [--mac-prefix=*MACPREFIX*] | [\--mac-prefix=*MACPREFIX*]
| [--submit] | [\--submit]
| {*network*} | {*network*}
Creates a new network with the given name. The network will be unused Creates a new network with the given name. The network will be unused
...@@ -62,13 +62,13 @@ MODIFY ...@@ -62,13 +62,13 @@ MODIFY
~~~~~~ ~~~~~~
| **modify** | **modify**
| [--gateway=*GATEWAY*] | [\--gateway=*GATEWAY*]
| [--add-reserved-ips=*RESERVEDIPS*] | [\--add-reserved-ips=*RESERVEDIPS*]
| [--remove-reserved-ips=*RESERVEDIPS*] | [\--remove-reserved-ips=*RESERVEDIPS*]
| [--network6=*NETWORK6*] | [\--network6=*NETWORK6*]
| [--gateway6=*GATEWAY6*] | [\--gateway6=*GATEWAY6*]
| [--mac-prefix=*MACPREFIX*] | [\--mac-prefix=*MACPREFIX*]
| [--submit] | [\--submit]
| {*network*} | {*network*}
Modifies parameters from the network. Modifies parameters from the network.
...@@ -83,7 +83,7 @@ options. ...@@ -83,7 +83,7 @@ options.
REMOVE REMOVE
~~~~~~ ~~~~~~
| **remove** [--submit] {*network*} | **remove** [\--submit] {*network*}
Deletes the indicated network, which must be not connected to any node group. Deletes the indicated network, which must be not connected to any node group.
...@@ -92,7 +92,7 @@ See **ganeti**\(7) for a description of ``--submit`` and other common options. ...@@ -92,7 +92,7 @@ See **ganeti**\(7) for a description of ``--submit`` and other common options.
LIST LIST
~~~~ ~~~~
| **list** [--no-headers] [--separator=*SEPARATOR*] [-v] | **list** [\--no-headers] [\--separator=*SEPARATOR*] [-v]
| [-o *[+]FIELD,...*] [network...] | [-o *[+]FIELD,...*] [network...]
Lists all existing networks in the cluster. If no group names are given, Lists all existing networks in the cluster. If no group names are given,
......
...@@ -585,7 +585,7 @@ annotated in the command line output. ...@@ -585,7 +585,7 @@ annotated in the command line output.
RESTRICTED-COMMAND RESTRICTED-COMMAND
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
| **restricted-command** [-M] [--sync] | **restricted-command** [-M] [\--sync]
| { -g *group* *command* | *command* *nodes*... } | { -g *group* *command* | *command* *nodes*... }
Executes a restricted command on the specified nodes. Restricted commands are Executes a restricted command on the specified nodes. Restricted commands are
......
...@@ -400,16 +400,18 @@ in two ways: ...@@ -400,16 +400,18 @@ in two ways:
- by sending a ``SIGINT`` (``^C``), hbal will register the termination - by sending a ``SIGINT`` (``^C``), hbal will register the termination
request, and will wait until the currently submitted jobs finish, at request, and will wait until the currently submitted jobs finish, at
which point it will exit (with exit code 1) which point it will exit (with exit code 0 if all jobs finished
correctly, otherwise with exit code 1 as usual)
- by sending a ``SIGTERM``, hbal will immediately exit (with exit code - by sending a ``SIGTERM``, hbal will immediately exit (with exit code
2); it is the responsibility of the user to follow up with Ganeti the 2\); it is the responsibility of the user to follow up with Ganeti
result of the currently-executing jobs and check the result of the currently-executing jobs
Note that in any situation, it's perfectly safe to kill hbal, either via Note that in any situation, it's perfectly safe to kill hbal, either via
the above signals or via any other signal (e.g. ``SIGQUIT``, the above signals or via any other signal (e.g. ``SIGQUIT``,
``SIGKILL``), since the jobs themselves are processed by Ganeti whereas ``SIGKILL``), since the jobs themselves are processed by Ganeti whereas
hbal (after submission) only watches their progression. In this case, hbal (after submission) only watches their progression. In this case,
the use will again have to query Ganeti for job results. the user will have to query Ganeti for job results.
EXIT STATUS EXIT STATUS
----------- -----------
......
...@@ -186,8 +186,10 @@ execCancelWrapper _ _ _ _ _ [] = return $ Ok () ...@@ -186,8 +186,10 @@ execCancelWrapper _ _ _ _ _ [] = return $ Ok ()
execCancelWrapper anno master nl il cref alljss = do execCancelWrapper anno master nl il cref alljss = do
cancel <- readIORef cref cancel <- readIORef cref
if cancel > 0 if cancel > 0
then return . Bad $ "Exiting early due to user request, " ++ then do
show (length alljss) ++ " jobset(s) remaining." putStrLn $ "Exiting early due to user request, " ++
show (length alljss) ++ " jobset(s) remaining."
return $ Ok ()
else execJobSet anno master nl il cref alljss else execJobSet anno master nl il cref alljss
-- | Execute an entire jobset. -- | Execute an entire jobset.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment