traffic_replay: Generate users faster by writing to local DB
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 11 Oct 2018 01:47:28 +0000 (14:47 +1300)
committerDouglas Bagnall <dbagnall@samba.org>
Tue, 30 Oct 2018 23:30:16 +0000 (00:30 +0100)
commitb40daca6d4c886f2cea5efce38a5e945410d65d8
tree0aee06e912ded85a526075b47c865e5b8d369f33
parentaeef8b41fa03a32859f824f4a09560ad83bd2b50
traffic_replay: Generate users faster by writing to local DB

We can create user accounts much faster if the LDB connection talks
directly to the local sam.ldb file rather than going via LDAP. This
patch allows the 'host' argument to the tool to be a .ldb file (e.g.
"/usr/local/samba/private/sam.ldb") instead of a server name/IP.

In most cases, the traffic_replay tool wants to run on a remote device
(because the point of it is to send traffic to the DC). However, the
--generate-users-only is one case where the tool can be run locally,
directly on the test DC. (The traffic_replay user generation is handy
for standalone testing, because it also handles assigning group
memberships to the generated user accounts).

Note that you also need to use '--option="ldb:nosync = true"' to get
the improvement in performance.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
script/traffic_replay