[Freeipa-devel] [PATCH 016, 024, 025] First part of the replica promotion tests + testplan

Martin Basti mbasti at redhat.com
Fri Mar 11 16:29:45 UTC 2016



On 10.03.2016 23:09, Oleg Fayans wrote:
> Hi Martin,
>
>
>
> On 03/08/2016 08:18 PM, Martin Basti wrote:
>>
>> On 08.03.2016 18:24, Martin Basti wrote:
>>>
>>> On 08.03.2016 12:38, Oleg Fayans wrote:
>>>> The patches were rebased against the current master
>>>>
>>>> On 03/04/2016 05:33 PM, Martin Basti wrote:
>>>>> * old messages have been removed *
>>>>>>>>> 1)
>>>>>>>>> this method is unused please remove it
>>>>>>>>>
>>>>>>>>>        def test_kra_install_master(self):
>>>>>> Well, in fact it is used twice: in both domain levels, so I'd better
>>>>>> keep it:
>>>>>>
>>>>>> -bash-4.3$ ipa-run-tests test_integration/test_replica_promotion.py
>>>>>> --collect-only
>>>>>> ====================================================================================
>>>>>>
>>>>>>
>>>>>> test session starts
>>>>>> =====================================================================================
>>>>>>
>>>>>>
>>>>>> platform linux2 -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.3
>>>>>> rootdir: /usr/lib/python2.7/site-packages/ipatests, inifile:
>>>>>> pytest.ini
>>>>>> plugins: sourceorder, multihost
>>>>>> collected 8 items
>>>>>> <Module 'test_integration/test_replica_promotion.py'>
>>>>>>      <Class 'TestReplicaPromotionLevel0'>
>>>>>>        <Instance '()'>
>>>>>>          <Function 'test_kra_install_master'>
>>>>>>          <Function 'test_promotion_disabled'>
>>>>>>          <Function 'test_backup_restore'>
>>>>>>      <Class 'TestKRAInstall'>
>>>>>>        <Instance '()'>
>>>>>>          <Function 'test_kra_install_without_replica_file'>
>>>>>>      <Class 'TestCAInstall'>
>>>>>>        <Instance '()'>
>>>>>>          <Function 'test_ca_install_without_replica_file'>
>>>>>>      <Class 'TestReplicaPromotionLevel1'>
>>>>>>        <Instance '()'>
>>>>>>          <Function 'test_kra_install_master'>
>>>>>>          <Function 'test_replica_prepare_disabled'>
>>>>>>      <Class 'TestReplicaManageCommands'>
>>>>>>        <Instance '()'>
>>>>>>          <Function 'test_replica_manage_commands'>
>>>>> aah my bad, I forgot that pytest executes it when it begins with test_*
>>>>> even in parent class
>>>>>>>>> 2)
>>>>>>>>> Why are these there? I do not see any usage
>>>>>>>>>
>>>>>>>>> from env_config import get_global_config
>>>>>>>>> config = get_global_config()
>>>>>> Removed
>>>>>>
>>>>>>>>> 3) nitpick
>>>>>>>>> +    num_clients = 0
>>>>>>>>> this is set by default
>>>>>> Removed
>>>>>>
>>>>>>>>> otherwise LGTM
>>>>>>>>>
>>>>>>>>> Results of testing tomorrow.
>>>>>>>>>
>>>>>>>>> Martin^2
>>>>>>>>>
>>>>>>>> I applied all patches including workarounds, but test failed.
>>>>>>>>
>>>>>>>> ipatests.test_integration.test_replica_promotion.TestReplicaPromotionLevel0
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> [ipa.ipatests.test_integration.host.Host.replica1.cmd51] RUN
>>>>>>>> ['ipa-replica-install', '-U', '-p', 'Secret123', '-w', 'Secret123',
>>>>>>>> '--setup-ca', '--ip-address', '192.168.144.102',
>>>>>>>> '/root/ipatests/replica-info.gpg']
>>>>>>>> [ipa.ipatests.test_integration.host.Host.replica1.cmd51] The host
>>>>>>>> replica1.ipa.test already exists on the master server.
>>>>>>>> [ipa.ipatests.test_integration.host.Host.replica1.cmd51] You should
>>>>>>>> remove it before proceeding:
>>>>>>>> [ipa.ipatests.test_integration.host.Host.replica1.cmd51] % ipa
>>>>>>>> host-del replica1.ipa.test
>>>>>>>> [ipa.ipatests.test_integration.host.Host.replica1.cmd51]
>>>>>>>> ipa.ipapython.install.cli.install_tool(Replica): ERROR    The
>>>>>>>> ipa-replica-install command failed. See
>>>>>>>> /var/log/ipareplica-install.log for more information
>>>>>>>> [ipa.ipatests.test_integration.host.Host.replica1.cmd51] Exit
>>>>>>>> code: 3
>>>>>>>> FAILED
>>>>>> this is exactly the error that happens when a workaround for 5627
>>>>>> is not
>>>>>> applied. I have re-run the tests with all the patches and everything
>>>>>> passed. Could you please double-check, whether patch 0027 was applied
>>>>>> correctly?
>>>>>>
>>>>>> bash-4.3$ ipa-run-tests test_integration/test_replica_promotion.py
>>>>>> --pdb
>>>>>> ====================================================================================
>>>>>>
>>>>>>
>>>>>> test session starts
>>>>>> =====================================================================================
>>>>>>
>>>>>>
>>>>>> platform linux2 -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.3
>>>>>> rootdir: /usr/lib/python2.7/site-packages/ipatests, inifile:
>>>>>> pytest.ini
>>>>>> plugins: sourceorder, multihost
>>>>>> collected 8 items
>>>>>>
>>>>>> test_integration/test_replica_promotion.py ........
>>>>>>
>>>>>> ================================================================================
>>>>>>
>>>>>>
>>>>>> 8 passed in 7561.93 seconds
>>>>>> =================================================================================
>>>>>>
>>>>>>
>>>>>>
>>>>> I will
>>>>>
>>>>>>> And it needs ticket, otherwise it will not be in 4-3 branch.
>>>>>> https://fedorahosted.org/freeipa/ticket/5723
>>> NACK
>>>
>>> 1)
>>> ipatests.test_integration.test_replica_promotion.TestReplicaPromotionLevel0
>>>
>>>
>>> [ipa.ipatests.test_integration.host.Host.replica2.ParamikoTransport]
>>> RUN ['ipa-replica-install', '-U', '-p', 'Secret123', '-w',
>>> 'Secret123', '--setup-ca', '--ip-address', '192.168.200.103', '-r',
>>> 'IPA.TEST']
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd65] RUN
>>> ['ipa-replica-install', '-U', '-p', 'Secret123', '-w', 'Secret123',
>>> '--setup-ca', '--ip-address', '192.168.200.103', '-r', 'IPA.TEST']
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd65] IPA client is
>>> already configured on this system, ignoring the --domain, --server,
>>> --realm, --hostname, --password and --keytab options.
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd65] Your system
>>> may be partly configured.
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd65] Run
>>> /usr/sbin/ipa-server-install --uninstall to clean up.
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd65]
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd65]
>>> ipa.ipapython.install.cli.install_tool(Replica): ERROR    You must
>>> provide a file generated by ipa-replica-prepare to create a replica
>>> when the domain is at level 0.
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd65]
>>> ipa.ipapython.install.cli.install_tool(Replica): ERROR    The
>>> ipa-replica-install command failed. See
>>> /var/log/ipareplica-install.log for more information
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd65] Exit code: 1
>>> FAILED
>>>
>>> 2)
>>> ipatests.test_integration.test_replica_promotion.TestKRAInstall
>>>
>>> [ipa.ipatests.test_integration.host.Host.replica2.ParamikoTransport]
>>> RUN ['ipa-replica-install', '-U', '-p', 'Secret123', '-w',
>>> 'Secret123', '--setup-ca', '--ip-address', '192.168.200.103', '-r',
>>> 'IPA.TEST']
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22] RUN
>>> ['ipa-replica-install', '-U', '-p', 'Secret123', '-w', 'Secret123',
>>> '--setup-ca', '--ip-address', '192.168.200.103', '-r', 'IPA.TEST']
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22] IPA client is
>>> already configured on this system, ignoring the --domain, --server,
>>> --realm, --hostname, --password and --keytab options.
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22] Your system
>>> may be partly configured.
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22] Run
>>> /usr/sbin/ipa-server-install --uninstall to clean up.
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22]
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22]
>>> ipa.ipapython.install.cli.install_tool(Replica): ERROR    You must
>>> provide a file generated by ipa-replica-prepare to create a replica
>>> when the domain is at level 0.
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22]
>>> ipa.ipapython.install.cli.install_tool(Replica): ERROR    The
>>> ipa-replica-install command failed. See
>>> /var/log/ipareplica-install.log for more information
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22] Exit code: 1
>>> FAILED
>>>
>>>
>>> 3)
>>> ipatests.test_integration.test_replica_promotion.TestCAInstall
>>>
>>> [ipa.ipatests.test_integration.host.Host.replica2.ParamikoTransport]
>>> RUN ['ipa-replica-install', '-U', '-p', 'Secret123', '-w',
>>> 'Secret123', '--setup-dns', '--forwarder', '10.34.78.1',
>>> '--ip-address', '192.168.200.103', '-r', 'IPA.TEST']
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22] RUN
>>> ['ipa-replica-install', '-U', '-p', 'Secret123', '-w', 'Secret123',
>>> '--setup-dns', '--forwarder', '10.34.78.1', '--ip-address',
>>> '192.168.200.103', '-r', 'IPA.TEST']
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22] IPA client is
>>> already configured on this system, ignoring the --domain, --server,
>>> --realm, --hostname, --password and --keytab options.
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22] Your system
>>> may be partly configured.
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22] Run
>>> /usr/sbin/ipa-server-install --uninstall to clean up.
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22]
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22]
>>> ipa.ipapython.install.cli.install_tool(Replica): ERROR    You must
>>> provide a file generated by ipa-replica-prepare to create a replica
>>> when the domain is at level 0.
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22]
>>> ipa.ipapython.install.cli.install_tool(Replica): ERROR    The
>>> ipa-replica-install command failed. See
>>> /var/log/ipareplica-install.log for more information
>>> [ipa.ipatests.test_integration.host.Host.replica2.cmd22] Exit code: 1
>>> FAILED
>>>
>>>
>>> Reason:
>>>
>>>   def install_replica(master, replica, setup_ca=True, setup_dns=False,
>>> -                    setup_kra=False, extra_args=()):
>>> +                    setup_kra=False, extra_args=(), domain_level=None):
>>> +    if domain_level is None:
>>> +        domain_level = domainlevel(master)
> Oops. Sorry, must have been a result of inaccurate rebase. Fixed
> The successful run is attached
>
>>> -    if domainlevel(master) == DOMAIN_LEVEL_0:
>>> +    if domainlevel == DOMAIN_LEVEL_0:
>>>
>>> domain_level variable is actually unused
>>>
>> Also with your patch that removes host_prepare, I see many following
>> errors in test debug output
>>
>> [ipa.ipatests.test_integration.host.Host.replica1.cmd8] -bash: line 1:
>> cd: /root/ipatests: No such file or directory
>> [ipa.ipatests.test_integration.host.Host.replica1.cmd8] -bash: line 2:
>> /root/ipatests/env.sh: No such file or directory
>>
>>
>> I do not see these errors in current tests, so the patch does not seem
>> right to me.
> http://jenkins.idm.lab.eng.brq.redhat.com:8080/job/freeipa-integration-f23master-customized_ds_config_install-domlevel-1/23/consoleFull
>
> I've been experimenting a lot to find get rid of it but was
> unsuccessful. Seemingly it does not affect the tests.
>
>
ACK

I added ticket to commit messages

Pushed to:
ipa-4-3: bad89ea7b94e020532eb17cea03321cfb4ace85c
master: 578cff956738af06b005c3ef931dbe518d5605a3




More information about the Freeipa-devel mailing list