Bug 37646 - S3->S4 inplace migration fails when BDCs are present
S3->S4 inplace migration fails when BDCs are present
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.1
Assigned To: Felix Botner
Arvid Requate
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-28 19:59 CET by Arvid Requate
Modified: 2015-11-17 12:12 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2015-01-28 19:59:19 CET
S3->S4 inplace migration fails when BDCs are present.

Looks like Samba changed something in upgrade.py to skip creating BDC accounts in the SAM backend and then finally  upgrade.add_users_to_group  raises an exception because it cannot find the member account of the primarygroup of the BDC (in this case the group  was DC Slave Hosts). We should create a patch for this and communicate this upstream.

=============================================================================
Exporting users
  Skipping wellknown rid=501 (for username=gast)
  Skipping wellknown rid=500 (for username=Administrator)
  Skipping BDC account for mybdc1, this DC must be re-joined
  Skipping BDC account for mybdc2, this DC must be re-joined
  Skipping BDC account for mybdc3, this DC must be re-joined
[...]
Commiting 'add users' transaction to disk
Adding users to groups
ERROR(<class 'samba.provision.ProvisioningError'>): uncaught exception - ProvisioningError: Could not add me
mber 'S-1-5-21-1234567890-1234567890-1234567890-1234' to group 'S-1-5-21-1234567890-1234567890-1234567890-101001' as either group or user record doesn't exist: Unable to find GUID for DN 

  File "/usr/lib/python2.6/dist-packages/samba/netcmd/__init__.py", line 175, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/samba/netcmd/domain.py", line 1399, in run
    useeadb=eadb, dns_backend=dns_backend, use_ntvfs=use_ntvfs, no_upn=no_upn)
  File "/usr/lib/python2.6/dist-packages/samba/upgrade.py", line 1018, in upgrade_from_samba3
    add_users_to_group(result.samdb, g, groupmembers[str(g.sid)], logger)
  File "/usr/lib/python2.6/dist-packages/samba/upgrade.py", line 353, in add_users_to_group
    raise ProvisioningError("Could not add member '%s' to group '%s' as either group or user record doesn't exist: %s" % (member_sid, group.sid, emsg))
=============================================================================
Comment 1 Arvid Requate univentionstaff 2015-01-29 15:20:19 CET
Looks like this issue results from an UCS patch (Bug 33338 Comment 14), where some more things need to be done. E.g. a simple try/except/log around the add_users_to_group to let it continue.
Comment 2 Felix Botner univentionstaff 2015-11-13 15:16:23 CET
modified 40_samba3upgrade.patch:

log instead raise for ldb.ERR_NO_SUCH_OBJECT in add_users_to_group()


S3->S4 inplace migration worked for me now
Comment 3 Arvid Requate univentionstaff 2015-11-16 15:49:57 CET
Verifed:
* Works
* Changelog ok
Comment 4 Stefan Gohmann univentionstaff 2015-11-17 12:12:46 CET
UCS 4.1 has been released:
 https://docs.software-univention.de/release-notes-4.1-0-en.html
 https://docs.software-univention.de/release-notes-4.1-0-de.html

If this error occurs again, please use "Clone This Bug".