Bug 13978 - sambaundoguidindex is untested and py2-only
Summary: sambaundoguidindex is untested and py2-only
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: 4.10.4
Hardware: All All
: P5 regression (vote)
Target Milestone: 4.11
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on: 13959
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-29 23:59 UTC by Andrew Bartlett
Modified: 2019-09-11 08:00 UTC (History)
3 users (show)

See Also:


Attachments
patch for Samba 4.9 (backported/cherry-picked from master) (40.82 KB, patch)
2019-06-11 09:17 UTC, Andrew Bartlett
abartlet: review? (gary)
gary: review+
abartlet: ci-passed+
Details
patch for Samba 4.10 (backported/cherry-picked from master) (29.40 KB, patch)
2019-06-11 09:19 UTC, Andrew Bartlett
abartlet: review? (gary)
gary: review+
Details
patch for Samba 4.10 (backported/cherry-picked from master) V2 (29.95 KB, patch)
2019-07-30 04:42 UTC, Aaron Haslett
no flags Details
patch for Samba 4.9 (backported/cherry-picked from master) V2 (39.31 KB, patch)
2019-07-31 00:51 UTC, Aaron Haslett
no flags Details
patch for Samba 4.10 (backported/cherry-picked from master) V3 (28.07 KB, patch)
2019-07-31 00:52 UTC, Aaron Haslett
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Bartlett 2019-05-29 23:59:10 UTC

    
Comment 1 Andrew Bartlett 2019-06-11 09:17:57 UTC
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
Comment 2 Andrew Bartlett 2019-06-11 09:19:01 UTC
Created attachment 15239 [details]
patch for Samba 4.10 (backported/cherry-picked from master)
Comment 3 Andrew Bartlett 2019-06-12 04:31:41 UTC
Assigning to Karolin for the next releases.

Thanks!
Comment 4 Karolin Seeger 2019-06-20 10:07:23 UTC
Pushed to autobuild-v4-{10,9}-test.
Comment 5 Karolin Seeger 2019-06-21 06:46:41 UTC
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.
Comment 6 Andrew Bartlett 2019-06-21 07:05:35 UTC
(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
Comment 7 Aaron Haslett 2019-07-16 03:18:16 UTC
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.
Comment 8 Stefan Metzmacher 2019-07-16 19:42:46 UTC
(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.
Comment 9 Aaron Haslett 2019-07-17 01:16:36 UTC
(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.
Comment 10 Andrew Bartlett 2019-07-23 22:18:46 UTC
(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.
Comment 11 Aaron Haslett 2019-07-30 04:42:58 UTC
Created attachment 15336 [details]
patch for Samba 4.10 (backported/cherry-picked from master) V2

Removed rename and added required ldbdump comments patch
Comment 12 Aaron Haslett 2019-07-31 00:51:27 UTC
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.
Comment 13 Aaron Haslett 2019-07-31 00:52:02 UTC
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.
Comment 14 Aaron Haslett 2019-07-31 01:43:07 UTC
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.
Comment 15 Stefan Metzmacher 2019-09-11 08:00:01 UTC
(In reply to Aaron Haslett from comment #14)

The remaining changes here were included in
https://bugzilla.samba.org/show_bug.cgi?id=14062