#7972 automember rebuild sometimes appears to return before the rebuild is complete
Closed: fixed 4 years ago by frenaud. Opened 4 years ago by rcritten.

Ticket was cloned from Red Hat Bugzilla (product Fedora): Bug 1718397

Description of problem:
Two tests in freeIPA testsing in ipatests/test_xmlrpc/test_automember_plugin.py
are failing with some regularity.

The test is trying to exercise rebuild. In order to do this the modify-ops
feature needs to be disabled.

The sequence of events is:

1. host is created
2. hostgroup is created
3. automember rule is created
4. condition created that would add this host to the hostgroup

So since the rule was created afterward the rule isn't applied. We need to
rebuild.

So next this happens:

5. autoMemberProcessModifyOps is set to off
6. 389-ds is restarted
7. the ipa command automember-rebuild is called (this creates a rebuild task)

The ipa command will loop until the task disappears, indicating the work is
done.

8. the ipa command automember-rebuild --no-wait is called (same thing but this
time it doesn't wait for the task to finish)

9. An internal view of the hostgroup is updated to indicate that the host is a
member.
10. The hostgroup is retrieved from LDAP and compared to the internal view.
They should match.

The same test is done for user groups as well.

We see one or both failing periodically with rebuild not adding the membership
according to the condition.

I moved the restart until after the rebuild command and haven't been able to
reproduce the failure. I don't know if this is related to modify-op being off
means membership is not always properly calculated or the server is still not
quite up after the restart when we try to force the rebuild or the task is
returning as finished when it isn't.

Version-Release number of selected component (if applicable):

389-ds-base-1.4.0.22-1.fc29

How reproducible:

intermittently

Steps to Reproduce:
1. ipa-server-install (DNS, etc is optional)
2. kinit admin
3. pull freeipa git source
4. pytest-3 -v ipatests/test_xmlrpc/test_automember_plugin.py

Actual results:

Sometimes fails with AssertionError that a key is missing. This indicates that
the rebuild was not complete.

Metadata Update from @rcritten:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1718397

4 years ago

Metadata Update from @rcritten:
- Issue assigned to rcritten

4 years ago

master:

  • 7ec0976 tests: Wait for automember rebuild --no-wait tasks to finish

ipa-4-7:

  • 086e48f tests: Wait for automember rebuild --no-wait tasks to finish

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata