LGTM, thanks.
On Fri, Nov 6, 2015 at 2:00 PM, Helga Velroyen <[email protected]> wrote:
> Alright, see consider the following interdiff:
>
> diff --git a/qa/qa_config.py b/qa/qa_config.py
> index 78e8865..f84daf8 100644
> --- a/qa/qa_config.py
> +++ b/qa/qa_config.py
> @@ -501,7 +501,7 @@ class _QaConfig(object):
> """Returns the list of nodes.
>
> This is not intended to 'acquire' those nodes. For that,
> - C{AcquireManyNodes} is more inteded. However, often it is
> + C{AcquireManyNodes} is better suited. However, often it is
> helpful to know the total number of nodes available to
> adjust cluster parameters and that's where this function
> is useful.
> @@ -863,7 +863,7 @@ def GetMasterNode():
>
>
> def GetAllNodes():
> - """Wrapper for L{_QaConfig.GetAllNodeNames}.
> + """Wrapper for L{_QaConfig.GetAllNodes}.
>
> """
> return GetConfig().GetAllNodes()
>
>
> On Fri, 6 Nov 2015 at 13:58 Lisa Velden <[email protected]> wrote:
>
>> On Fri, Nov 6, 2015 at 12:07 PM, 'Helga Velroyen' via ganeti-devel <
>> [email protected]> wrote:
>>
>>> The issue that was fixed with the previous patch would
>>> have been detected earlier if the QA would actually
>>> run a 'verify' after the modify operations. For 'verify'
>>> to not raise false negatives, we need to first reduce
>>> the candidate pool size, because otherwise QA fails
>>> with a warning about the mininmum pool size being
>>> violated.
>>>
>>> Signed-off-by: Helga Velroyen <[email protected]>
>>> ---
>>> qa/qa_config.py | 18 ++++++++++++++++++
>>> qa/qa_node.py | 13 +++++++++++++
>>> 2 files changed, 31 insertions(+)
>>>
>>> diff --git a/qa/qa_config.py b/qa/qa_config.py
>>> index 276b92c..78e8865 100644
>>> --- a/qa/qa_config.py
>>> +++ b/qa/qa_config.py
>>> @@ -497,6 +497,17 @@ class _QaConfig(object):
>>> """
>>> return self["nodes"][0]
>>>
>>> + def GetAllNodes(self):
>>> + """Returns the list of nodes.
>>> +
>>> + This is not intended to 'acquire' those nodes. For that,
>>> + C{AcquireManyNodes} is more inteded. However, often it is
>>>
>>
>> s/inteded/intended, but wouldn't be "suited" a better word?
>>
>>
>>> + helpful to know the total number of nodes available to
>>> + adjust cluster parameters and that's where this function
>>> + is useful.
>>> + """
>>> + return self["nodes"]
>>> +
>>> def GetInstanceCheckScript(self):
>>> """Returns path to instance check script or C{None}.
>>>
>>> @@ -851,6 +862,13 @@ def GetMasterNode():
>>> return GetConfig().GetMasterNode()
>>>
>>>
>>> +def GetAllNodes():
>>> + """Wrapper for L{_QaConfig.GetAllNodeNames}.
>>> +
>>> + """
>>> + return GetConfig().GetAllNodes()
>>> +
>>> +
>>>
>>
>> Wrapper for GetAllNodeNames or GetAllNodes?
>>
>>
>>> def AcquireInstance(_cfg=None):
>>> """Returns an instance which isn't in use.
>>>
>>> diff --git a/qa/qa_node.py b/qa/qa_node.py
>>> index b752932..d1d1403 100644
>>> --- a/qa/qa_node.py
>>> +++ b/qa/qa_node.py
>>> @@ -252,6 +252,16 @@ def TestNodeEvacuate(node, node2):
>>> def TestNodeModify(node):
>>> """gnt-node modify"""
>>>
>>> + default_pool_size = 10
>>> + nodes = qa_config.GetAllNodes()
>>> + test_pool_size = len(nodes) - 1
>>> +
>>> + # Reduce the number of master candidates, because otherwise all
>>> + # subsequent 'gnt-cluster verify' commands fail due to not enough
>>> + # master candidates.
>>> + AssertCommand(["gnt-cluster", "modify",
>>> + "--candidate-pool-size=%s" % test_pool_size])
>>> +
>>> # make sure enough master candidates will be available by disabling
>>> the
>>> # master candidate role first with --auto-promote
>>> AssertCommand(["gnt-node", "modify", "--master-candidate=no",
>>> @@ -262,6 +272,7 @@ def TestNodeModify(node):
>>> for value in ["yes", "no"]:
>>> AssertCommand(["gnt-node", "modify", "--force",
>>> "--%s=%s" % (flag, value), node.primary])
>>> + AssertCommand(["gnt-cluster", "verify"])
>>>
>>> AssertCommand(["gnt-node", "modify", "--master-candidate=yes",
>>> node.primary])
>>>
>>> @@ -270,6 +281,8 @@ def TestNodeModify(node):
>>> node.primary])
>>>
>>> AssertRedirectedCommand(["gnt-cluster", "verify"])
>>> + AssertCommand(["gnt-cluster", "modify",
>>> + "--candidate-pool-size=%s" % default_pool_size])
>>>
>>>
>>> def _CreateOobScriptStructure():
>>> --
>>> 2.6.0.rc2.230.g3dd15c0
>>>
>>>
>>
>>
>> --
>> Lisa Velden
>> Software Engineer
>> [email protected]
>>
>> Google Germany GmbH
>> Dienerstraße 12
>> 80331 München
>>
>> Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
>> Registergericht und -nummer: Hamburg, HRB 86891
>> Sitz der Gesellschaft: Hamburg
>>
> --
>
> Helga Velroyen
> Software Engineer
> [email protected]
>
> Google Germany GmbH
> Dienerstraße 12
> 80331 München
>
> Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
> Registergericht und -nummer: Hamburg, HRB 86891
> Sitz der Gesellschaft: Hamburg
>
> Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind,
> leiten Sie diese bitte nicht weiter, informieren Sie den Absender und
> löschen Sie die E-Mail und alle Anhänge. Vielen Dank.
>
> This e-mail is confidential. If you are not the right addressee please do
> not forward it, please inform the sender, and please erase this e-mail
> including any attachments. Thanks.
>
>
--
Lisa Velden
Software Engineer
[email protected]
Google Germany GmbH
Dienerstraße 12
80331 München
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg