Created attachment 15238 [details] patch for Samba 4.9 (backported/cherry-picked from master) Apply after fix for bug 13959 Tested at https://gitlab.com/samba-team/devel/samba/pipelines/65456993
Created attachment 15239 [details] patch for Samba 4.10 (backported/cherry-picked from master)
Assigning to Karolin for the next releases. Thanks!
Pushed to autobuild-v4-{10,9}-test.
Both autobuilds fail with: UNEXPECTED(failure): samba.tests.blackbox.downgradedatabase.samba.tests.blackbox.downgradedatabase.DowngradeTest.test_downgrade_database(none) REASON: Exception: Exception: Traceback (most recent call last): File "bin/python/samba/tests/blackbox/downgradedatabase.py", line 97, in test_downgrade_database self.assertGreater(len(guid_keys), 20) AssertionError: 0 not greater than 20 Re-assigning to Andrew.
(In reply to Karolin Seeger from comment #5) Odd. Did you apply it after bug 13959? I probably made things more complex by splitting this up. Full patches are on https://gitlab.com/samba-team/samba/merge_requests/532.patch and https://gitlab.com/samba-team/samba/merge_requests/533.patch
I think you guys have gotten mixed up. The downgrade script can't run on 4.10 because we haven't backported the new pack format. New format databases can't be opened by 4.10 so it can't downgrade them. I don't think the downgrade script should be backported. The flow we should support is for databases created or upgraded by later versions to be downgraded by that same version, offline. It's a little inelegant but everyone knows to backup databases before an upgrade anyway, this is a 'backup backup' for people who forgot to do that. This bug should be about fixing any issues in sambaundoguidindex in 4.10 (historically prior to it being renamed), if that is a worthwhile task, and should be considered separately from the pack format/ordered index downgrade work.
(In reply to Aaron Haslett from comment #7) I'm not sure I agree with this. Let's remember this refore we release 4.11.0.
(In reply to Stefan Metzmacher from comment #8) I just had a go at getting the unpack patch in and unfortunately it's impossible, there's a lot of necessary parents and they don't apply because of too much divergence. I'd have to write a new standalone unpack patch just for 4.10.6 and 4.9.11. Could be done but I'll wait on Andrew's decision next week.
(In reply to Aaron Haslett from comment #9) So, the downgradedatabase script backported here is from the point BEFORE the ability to downgrade the new pack format was added. Therefore this can operate on older versions, it just doesn't downgrade from 4.11. The idea is to correctly downgrade 4.10 and 4.9 back to 4.7, in a tested and py3-safe manner, and to have long-term downgrade tool we can keep adding to without users needing to know as much about what exactly is being downgraded.
Created attachment 15336 [details] patch for Samba 4.10 (backported/cherry-picked from master) V2 Removed rename and added required ldbdump comments patch
Created attachment 15349 [details] patch for Samba 4.9 (backported/cherry-picked from master) V2 No ldbdump commenting patch (part of 13959 which we are relying on) Rename removed and references in test fixed.
Created attachment 15350 [details] patch for Samba 4.10 (backported/cherry-picked from master) V3 No ldbdump commenting patch (part of 13959 which we are relying on) Rename removed and references in test fixed.
This bug is now covered by the META bug: https://bugzilla.samba.org/show_bug.cgi?id=14062 Please go there instead of adding more confusion to this bug.
(In reply to Aaron Haslett from comment #14) The remaining changes here were included in https://bugzilla.samba.org/show_bug.cgi?id=14062