Bug 33251 - Update Scenario 2 - In place upgrade of the Samba 3/NT4 to a Samba 4/AD domain - failed
Update Scenario 2 - In place upgrade of the Samba 3/NT4 to a Samba 4/AD domai...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba4
UNSTABLE
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Stefan Gohmann
Felix Botner
: interim-4
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-11 15:17 CET by Felix Botner
Modified: 2013-11-19 06:41 CET (History)
1 user (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 Felix Botner univentionstaff 2013-11-11 15:17:14 CET
UCS 3.2 Master (with samba3)

...

-> univention-install univention-s4-connector

...
lp_int(): value is NULL or empty!^M
lp_bool(): value is NULL or empty!^M
WARNING: No path in service IPC$ - making it unavailable!^M
NOTE: Service IPC$ is flagged unavailable.^M
Provisioning^M
ERROR(<class 'samba.provision.ProvisioningError'>): uncaught exception - ProvisioningError: Could not open '/var/lib/samba3/secrets.tdb', the Samba3 secrets database: [Errno 2] No such file or directory.  Perhaps you specified the incorrect smb.conf, --testparm or --dbdir option?^M
  File "/usr/lib/python2.6/dist-packages/samba/netcmd/__init__.py", line 175, in _run^M
    return self.run(*args, **kwargs)^M
  File "/usr/lib/python2.6/dist-packages/samba/netcmd/domain.py", line 1330, in run^M
    useeadb=eadb, dns_backend=dns_backend, use_ntvfs=use_ntvfs, no_upn=no_upn)^M
  File "/usr/lib/python2.6/dist-packages/samba/upgrade.py", line 607, in upgrade_from_samba3^M
    raise ProvisioningError("Could not open '%s', the Samba3 secrets database: %s.  Perhaps you specified the incorrect smb.conf, --testparm or --dbdir option?" % (samba3.privatedir_path("secrets.tdb"), str(e)))^M
modifying entry "cn=Printer-Admins,cn=groups,dc=perf,dc=test"^M
^M
...

-> univention-s4search 
Failed to connect to ldap URL 'ldaps://pmaster.perf.test' - LDAP client internal error: NT_STATUS_CONNECTION_REFUSED
Failed to connect to 'ldaps://pmaster.perf.test' with backend 'ldaps': (null)
Failed to connect to ldaps://pmaster.perf.test - (null)

-> find /var/lib/samba3/| grep secrets.tdb
-> find /var/lib/samba| grep secrets.tdb
-> find /var/lib/samba_backup_20131111144451/| grep secrets.tdb
/var/lib/samba_backup_20131111144451/private/secrets.tdb
Comment 1 Stefan Gohmann univentionstaff 2013-11-12 06:35:14 CET
I'm unable to reproduce this with a UCS 3.2 new installation. I'll try an updated 3.1 system.
Comment 2 Stefan Gohmann univentionstaff 2013-11-12 07:06:00 CET
The updated 3.1 S3 system could also be migrated to S4.
Comment 3 Stefan Gohmann univentionstaff 2013-11-12 08:47:18 CET
Please try again.
Comment 4 Felix Botner univentionstaff 2013-11-12 11:13:29 CET
i can reproduce this

* UCS 3.2 amd64 new installation (without samba3)
* installation of univention-samba
* ucr set connector/s4/mapping/group/grouptype=false
* univention-install univention-s4-connector

i think the problem is the mv mv /var/lib/samba /var/lib/samba_backup_... in the unjoin scipt

# added set -x to univention-samba unjoin script
-> univention-install univention-s4-connector
...
Die folgenden Pakete werden ENTFERNT:
  univention-samba
...
Vorkonfiguration der Pakete ...
Es wurden 3.315 kB in 3 s geholt (995 kB/s)
(Lese Datenbank ... 57532 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von univention-samba ...
Multifile: /etc/samba/smb.conf
+ . /usr/share/univention-lib/ldap.sh
+ ucs_removeServiceFromLocalhost Samba 3
...
+ date +%Y%m%d%H%M%S
+ mv /var/lib/samba /var/lib/samba_backup_20131112111011
+ mkdir -p /var/lib/samba/private
+ joinscript_remove_script_from_status_file univention-samba
+ local scriptname=univention-samba
+ sed -i /^univention-samba v/d /var/univention-join/status
+ exit 0
...
Entpacken von univention-s4-connector
...
Comment 5 Stefan Gohmann univentionstaff 2013-11-12 11:23:41 CET
I've added a check in the unjoin script. The var/lib/samba directory is no longer moved in case of a S3 to S4 migration.

No changelog required.
Comment 6 Felix Botner univentionstaff 2013-11-12 12:56:17 CET
still does not work

(1)

do not run univention-samba unjoin script in a samba4/ignore/mixsetup=yes
environment

(2)

samba postinst moves secrets.tdb (and schannel_store.tdb,idmap2.tdb,  passdb.tdb) to /var/lib/samba3/private, but samba4 is looking in "/var/lib/samba3/" for this file

ERROR(<class 'samba.provision.ProvisioningError'>): uncaught exception - ProvisioningError: Could not open '/var/lib/samba3/secrets.tdb', the Samba3 secrets database: [Errno 2] No such file or directory.  Perhaps you specified the incorrect smb.conf, --testparm or --dbdir option?
  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 1330, 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 607, in upgrade_from_samba3
    raise ProvisioningError("Could not open '%s', the Samba3 secrets database: %s.  Perhaps you specified the incorrect smb.conf, --testparm or --dbdir option?" % (samba3.privatedir_path("secrets.tdb"), str(e)))
Comment 7 Stefan Gohmann univentionstaff 2013-11-12 14:18:26 CET
OK, fixed in univention-samba with r45964 and in univention-samba4 with r45968.
Comment 8 Felix Botner univentionstaff 2013-11-12 17:33:43 CET
OK
Comment 9 Stefan Gohmann univentionstaff 2013-11-19 06:41:49 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

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