Bug 12179 - Run samba-tool dbcheck with a test name
Summary: Run samba-tool dbcheck with a test name
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.5.0rc2
Hardware: All All
: P5 normal (vote)
Target Milestone: 4.5
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-26 02:39 UTC by Marc Muehlfeld
Modified: 2022-08-11 03:57 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Muehlfeld 2016-08-26 02:39:37 UTC
Summary:
===========

If "samba-tool dbcheck" is started with a test name, not only this single test is executed.




Current result:
==================

The following command should only run one rule (fix_replmetadata_unsorted_attid):

# samba-tool dbcheck --cross-ncs --fix --yes fix_replmetadata_unsorted_attid

Even if the command auto-fixes replPropertyMetaData problems, it stops for a different problem and waits for user input:

Fix replPropertyMetaData on CN=NTDS Settings,CN=DC1,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=samdom,DC=example,DC=com by sorting the attribute list? [YES]
Fixed attribute 'replPropertyMetaData' of 'CN=NTDS Settings,CN=DC1,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=samdom,DC=example,DC=com'

ERROR: incorrect instanceType part of Binary DN binary component for msDS-HasInstantiatedNCs in object CN=NTDS Settings,CN=DC1,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=samdom,DC=example,DC=com - B:8:0000000D:<GUID=33507d729d57ae4d88dffd46df1a9b22>;<RMD_ADDTIME=130541646810000000>;<RMD_CHANGETIME=130541646810000000>;<RMD_FLAGS=0>;<RMD_INVOCID=6f0dbc96ea9c1140b9a10e9971009b20>;<RMD_LOCAL_USN=3592>;<RMD_ORIGINATING_USN=3592>;<RMD_VERSION=0>;CN=Configuration,DC=samdom,DC=example,DC=com
Change DN to B:8:0000000D:<GUID=727d5033-579d-4dae-88df-fd46df1a9b22>;<RMD_ADDTIME=130541646810000000>;<RMD_CHANGETIME=130541646810000000>;<RMD_FLAGS=0>;<RMD_INVOCID=96bc0d6f-9cea-4011-b9a1-0e9971009b20>;<RMD_LOCAL_USN=3592>;<RMD_ORIGINATING_USN=3592>;<RMD_VERSION=0>;CN=Configuration,DC=samdom,DC=example,DC=com? [y/N/all/none]




Expected result:
===================

If started with a test name, samba-tool dbcheck should only find and fix problems matching the test; not others.
Comment 1 Douglas Bagnall 2022-08-11 03:57:14 UTC
This appears to be by design, which I will admit is not extremely intuitive. 

Better would be to have the list as an argument value, like

 --yes='fix_replmetadata_unsorted_attid fix_all_DN_GUIDs' --no='*'