[SCM] Samba Shared Repository - branch master updated
Kai Blin
kai at samba.org
Thu Jun 21 15:48:02 MDT 2012
The branch, master has been updated
via cea3bdb wintest: enable dns forwarding for internal dns
via 1318b5b wintest: get original nameserver for forwarding on a more general place
via 5305570 wintest: extend get_is_dc function with additional expectations
via 884e28f6 wintest: check netcats exitstatus instead of output
via ed3ded1 wintest: set recursive queries for internal dns
via b45d4be wintest: add option to select the dns backend
via 09bee25 wintest: set nameserver on a more general place
via 226dbc1 wintest: add option to use ntvfs instead of s3fs
via 9fcd4a8 wintest: add working bbaumbach.conf file for use with VirtualBox
from dd763d6 Fix bug #8974 - Kernel oplocks are broken when uid(file) != uid(process).
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit cea3bdb1031c95b874447676bcecfdd3b4731968
Author: Björn Baumbach <bb at sernet.de>
Date: Thu Jun 21 13:45:18 2012 +0200
wintest: enable dns forwarding for internal dns
Internal DNS will forward dns requests to the original nameserver
(specified in resolv.conf).
Signed-off-by: Kai Blin <kai at samba.org>
Autobuild-User(master): Kai Blin <kai at samba.org>
Autobuild-Date(master): Thu Jun 21 23:47:35 CEST 2012 on sn-devel-104
commit 1318b5bb2c6ebc2a810cb899a27daf5d90505559
Author: Björn Baumbach <bb at sernet.de>
Date: Thu Jun 21 13:43:22 2012 +0200
wintest: get original nameserver for forwarding on a more general place
Signed-off-by: Kai Blin <kai at samba.org>
commit 5305570758e93cbe84f58161d71d65b219dde467
Author: Björn Baumbach <bb at sernet.de>
Date: Tue Jun 5 13:57:59 2012 +0200
wintest: extend get_is_dc function with additional expectations
Windows Server 2003 r2 answers "wintest2k3 is not a DC."
Signed-off-by: Kai Blin <kai at samba.org>
commit 884e28f66b01a8bf21f855f91875f22defa121ab
Author: Björn Baumbach <bb at sernet.de>
Date: Tue Jun 12 19:45:51 2012 +0200
wintest: check netcats exitstatus instead of output
There are many netcat implementations with different output messages.
Signed-off-by: Kai Blin <kai at samba.org>
commit ed3ded11220d16c5ebfefd7e165eeb32e185f452
Author: Björn Baumbach <bb at sernet.de>
Date: Tue Jun 5 10:35:19 2012 +0200
wintest: set recursive queries for internal dns
Need dns recursive queries = yes, since
host expects answers with RA-bit.
Signed-off-by: Kai Blin <kai at samba.org>
commit b45d4beca54428cb71994fed40d44c9ba06bb4d3
Author: Björn Baumbach <bb at sernet.de>
Date: Thu May 31 14:15:47 2012 +0200
wintest: add option to select the dns backend
This is an option to use the internal dns.
Signed-off-by: Kai Blin <kai at samba.org>
commit 09bee254f028368e59a462ab5d487546da6f940a
Author: Björn Baumbach <bb at sernet.de>
Date: Fri Jun 1 16:16:16 2012 +0200
wintest: set nameserver on a more general place
Signed-off-by: Kai Blin <kai at samba.org>
commit 226dbc116da7eb59fd59a9fb8a88c05a13b74e05
Author: Björn Baumbach <bb at sernet.de>
Date: Thu May 31 11:13:59 2012 +0200
wintest: add option to use ntvfs instead of s3fs
Signed-off-by: Kai Blin <kai at samba.org>
commit 9fcd4a83a5c75d227846467756c64d2bf5adde9a
Author: Björn Baumbach <bb at sernet.de>
Date: Wed May 30 15:00:07 2012 +0200
wintest: add working bbaumbach.conf file for use with VirtualBox
Signed-off-by: Kai Blin <kai at samba.org>
-----------------------------------------------------------------------
Summary of changes:
wintest/conf/bbaumbach.conf | 97 +++++++++++++++++++++++++++++++++++++++++++
wintest/test-s4-howto.py | 36 +++++++++++-----
wintest/wintest.py | 46 ++++++++++++++++----
3 files changed, 158 insertions(+), 21 deletions(-)
create mode 100644 wintest/conf/bbaumbach.conf
Changeset truncated at 500 lines:
diff --git a/wintest/conf/bbaumbach.conf b/wintest/conf/bbaumbach.conf
new file mode 100644
index 0000000..aaacd32
--- /dev/null
+++ b/wintest/conf/bbaumbach.conf
@@ -0,0 +1,97 @@
+# Björn Baumbachs wintest config file
+# Using VirtualBox in headless mode. Since it's not possible to
+# startup VMs in gui mode.
+
+# where the git checkout is
+SOURCETREE : /home/bbaumba/src/git/samba
+
+# where to install Samba to
+PREFIX : /smbTest/wintest
+
+# debug level which will be put in smb.conf
+DEBUGLEVEL : 1
+
+# commands to control VMs
+VM_POWEROFF : su bbaumba -c "VBoxManage controlvm ${VMNAME} poweroff"
+VM_RESTORE : su bbaumba -c "VBoxManage snapshot ${VMNAME} restore ${SNAPSHOT} && VBoxManage startvm ${VMNAME} --type headless"
+VM_RESET : su bbaumba -c "VBoxManage controlvm ${VMNAME} reset"
+
+# interfaces to listen on
+INTERFACE : wintest
+
+# this is an additional IP that will be used for named to listen
+# on. It should not be the primary IP of the interface
+INTERFACE_IP : 192.168.4.77
+INTERFACE_NET : 192.168.4.77/24
+
+# how to run bind9
+BIND9 : /usr/sbin/named
+NAMED_CHECKCONF : /usr/sbin/named-checkconf
+RNDC : /usr/sbin/rndc
+BIND_USER : named
+
+# provision information
+REALM : WINTEST.EXAMPLE.ORG
+LCREALM : wintest.example.org
+DOMAIN : wintest
+BASEDN : DC=wintest,DC=example,DC=org
+PASSWORD1 : p at ssw0rd
+PASSWORD2 : p at ssw0rd2
+PASSWORD3 : p at ssw0rd3
+
+## a Windows7 VM
+#WINDOWS7_HOSTNAME : wintest7
+#WINDOWS7_VM : wintest7
+#WINDOWS7_SNAPSHOT : ready
+#WINDOWS7_USER : Administrator
+#WINDOWS7_PASS : Passw0rd
+
+# a winxp VM - needs Windows XP Service Pack 2 Support Tools
+WINXP_HOSTNAME : wintestxp
+WINXP_VM : wintestxp
+WINXP_SNAPSHOT : ready
+WINXP_USER : Administrator
+WINXP_PASS : geheim
+
+# Samba will join this w2k8r2 VM as a DC and then as a RODC
+#W2K8R2A_HOSTNAME : wintest2k8r2
+#W2K8R2A_VM : wintest2k8r2
+#W2K8R2A_REALM : v2.tridgell.net
+#W2K8R2A_DOMAIN : v2
+#W2K8R2A_PASS : Passw0rd
+#W2K8R2A_SNAPSHOT : ready2
+#W2K8R2A_IP : 192.168.4.103
+
+
+## this w2k8r2 VM will become a DC in the samba domain
+#W2K8R2B_HOSTNAME : w2k8r2b
+#W2K8R2B_VM : w2k8r2b
+#W2K8R2B_PASS : p at ssw0rd
+#W2K8R2B_SNAPSHOT : howto-test2
+#
+## this w2k8r2 VM will become a RODC in the samba domain
+#W2K8R2C_HOSTNAME : w2k8r2c
+#W2K8R2C_VM : w2k8r2c
+#W2K8R2C_PASS : p at ssw0rd
+#W2K8R2C_SNAPSHOT : howto-test2
+
+# Samba will join this w2k3 VM as a DC
+W2K3A_HOSTNAME : wintest2k3
+W2K3A_VM : wintest2k3
+W2K3A_REALM : vsofs3.com
+W2K3A_DOMAIN : vsofs3
+W2K3A_PASS : Passw0rd
+W2K3A_SNAPSHOT : ready
+W2K3A_IP : 192.168.4.102
+
+## this w2k3 VM will become a DC in the samba domain
+#W2K3B_HOSTNAME : w2k3b
+#W2K3B_VM : w2k3b
+#W2K3B_PASS : penguin
+#W2K3B_SNAPSHOT : howto-test
+#
+## this w2k8 VM will become a DC in the samba domain
+#W2K8B_HOSTNAME : w2k8c
+#W2K8B_VM : w2k8
+#W2K8B_PASS : p at ssw0rd
+#W2K8B_SNAPSHOT : howto-test
diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py
index 91ae0a2..fdbb181 100755
--- a/wintest/test-s4-howto.py
+++ b/wintest/test-s4-howto.py
@@ -35,7 +35,12 @@ def provision_s4(t, func_level="2008"):
'--option=interfaces=${INTERFACE}',
'--host-ip=${INTERFACE_IP}',
'--option=bind interfaces only=yes',
- '--option=rndc command=${RNDC} -c${PREFIX}/etc/rndc.conf']
+ '--option=rndc command=${RNDC} -c${PREFIX}/etc/rndc.conf',
+ '${USE_NTVFS}',
+ '--dns-backend=${NAMESERVER_BACKEND}',
+ '${ALLOW_DNS_UPDATES}',
+ '${DNS_RECURSIVE_QUERIES}',
+ '${DNS_FORWARDER}']
if t.getvar('INTERFACE_IPV6'):
provision.append('--host-ip6=${INTERFACE_IPV6}')
t.run_cmd(provision)
@@ -112,7 +117,8 @@ def test_dyndns(t):
'''test that dynamic DNS is working'''
t.chdir('${PREFIX}')
t.run_cmd("sbin/samba_dnsupdate --fail-immediately")
- t.rndc_cmd("flush")
+ if not t.getvar('NAMESERVER_BACKEND') == 'SAMBA_INTERNAL':
+ t.rndc_cmd("flush")
def run_winjoin(t, vm):
@@ -392,7 +398,8 @@ def prep_join_as_dc(t, vm):
t.info("Starting VMs for joining ${WIN_VM} as a second DC using samba-tool domain join DC")
t.chdir('${PREFIX}')
t.run_cmd('killall -9 -q samba smbd nmbd winbindd', checkfail=False)
- t.rndc_cmd('flush')
+ if not t.getvar('NAMESERVER_BACKEND') == 'SAMBA_INTERNAL':
+ t.rndc_cmd('flush')
t.run_cmd("rm -rf etc/smb.conf private")
child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_DOMAIN}\\administrator", "${WIN_PASS}", set_time=True)
t.get_ipconfig(child)
@@ -558,10 +565,12 @@ def test_howto(t):
# we don't need fsync safety in these tests
t.putenv('TDB_NO_FSYNC', '1')
- if not t.skip("configure_bind"):
- t.configure_bind(kerberos_support=True, include='${PREFIX}/private/named.conf')
- if not t.skip("stop_bind"):
- t.stop_bind()
+ if not t.getvar('NAMESERVER_BACKEND') == 'SAMBA_INTERNAL':
+ if not t.skip("configure_bind"):
+ t.configure_bind(kerberos_support=True, include='${PREFIX}/private/named.conf')
+ if not t.skip("stop_bind"):
+ t.stop_bind()
+
if not t.skip("stop_vms"):
t.stop_vms()
@@ -580,10 +589,15 @@ def test_howto(t):
start_s4(t)
if not t.skip("smbclient"):
test_smbclient(t)
- if not t.skip("configure_bind2"):
- t.configure_bind(kerberos_support=True, include='${PREFIX}/private/named.conf')
- if not t.skip("start_bind"):
- t.start_bind()
+
+ t.set_nameserver(t.getvar('INTERFACE_IP'))
+
+ if not t.getvar('NAMESERVER_BACKEND') == 'SAMBA_INTERNAL':
+ if not t.skip("configure_bind2"):
+ t.configure_bind(kerberos_support=True, include='${PREFIX}/private/named.conf')
+ if not t.skip("start_bind"):
+ t.start_bind()
+
if not t.skip("dns"):
test_dns(t)
if not t.skip("kerberos"):
diff --git a/wintest/wintest.py b/wintest/wintest.py
index 36711d9..6257fb4 100644
--- a/wintest/wintest.py
+++ b/wintest/wintest.py
@@ -325,11 +325,6 @@ nameserver %s
def configure_bind(self, kerberos_support=False, include=None):
self.chdir('${PREFIX}')
- nameserver = self.get_nameserver()
- if nameserver == self.getvar('INTERFACE_IP'):
- raise RuntimeError("old /etc/resolv.conf must not contain %s as a nameserver, this will create loops with the generated dns configuration" % nameserver)
- self.setvar('DNSSERVER', nameserver)
-
if self.getvar('INTERFACE_IPV6'):
ipv6_listen = 'listen-on-v6 port 53 { ${INTERFACE_IPV6}; };'
else:
@@ -437,8 +432,6 @@ options {
self.info("Restarting bind9")
self.chdir('${PREFIX}')
- self.set_nameserver(self.getvar('INTERFACE_IP'))
-
self.run_cmd("mkdir -p var/named/data")
self.run_cmd("chown -R ${BIND_USER} var/named")
@@ -494,9 +487,12 @@ options {
while retries > 0:
child = self.pexpect_spawn("nc -v -z -w 1 %s %u" % (hostname, port), crlf=False, timeout=1)
- i = child.expect(['succeeded', 'failed', pexpect.EOF, pexpect.TIMEOUT])
+ child.expect([pexpect.EOF, pexpect.TIMEOUT])
+ child.close()
+ i = child.exitstatus
if wait_for_fail:
- if i > 0:
+ #wait for timeout or fail
+ if i == None or i > 0:
return
else:
if i == 0:
@@ -553,7 +549,7 @@ options {
def get_is_dc(self, child):
'''check if a windows machine is a domain controller'''
child.sendline("dcdiag")
- i = child.expect(["is not a Directory Server",
+ i = child.expect(["is not a [Directory Server|DC]",
"is not recognized as an internal or external command",
"Home Server = ",
"passed test Replications"])
@@ -901,6 +897,14 @@ RebootOnCompletion=No
self.parser.add_option("--prefix", type='string', default=None, help='override install prefix')
self.parser.add_option("--sourcetree", type='string', default=None, help='override sourcetree location')
self.parser.add_option("--nocleanup", action='store_true', default=False, help='disable cleanup code')
+ self.parser.add_option("--use-ntvfs", action='store_true', default=False, help='use NTVFS for the fileserver')
+ self.parser.add_option("--dns-backend", type="choice",
+ choices=["SAMBA_INTERNAL", "BIND9_FLATFILE", "BIND9_DLZ", "NONE"],
+ help="The DNS server backend. SAMBA_INTERNAL is the builtin name server, " \
+ "BIND9_FLATFILE uses bind9 text database to store zone information, " \
+ "BIND9_DLZ uses samba4 AD to store zone information (default), " \
+ "NONE skips the DNS setup entirely (not recommended)",
+ default="BIND9_DLZ")
self.opts, self.args = self.parser.parse_args()
@@ -913,6 +917,11 @@ RebootOnCompletion=No
self.load_config(self.opts.conf)
+ nameserver = self.get_nameserver()
+ if nameserver == self.getvar('INTERFACE_IP'):
+ raise RuntimeError("old /etc/resolv.conf must not contain %s as a nameserver, this will create loops with the generated dns configuration" % nameserver)
+ self.setvar('DNSSERVER', nameserver)
+
self.set_skip(self.opts.skip)
self.set_vms(self.opts.vms)
@@ -934,3 +943,20 @@ RebootOnCompletion=No
self.info('cleaning')
self.chdir('${SOURCETREE}/' + subdir)
self.run_cmd('make clean')
+
+ if self.opts.use_ntvfs:
+ self.setvar('USE_NTVFS', "--use-ntvfs")
+ else:
+ self.setvar('USE_NTVFS', "")
+
+ self.setvar('NAMESERVER_BACKEND', self.opts.dns_backend)
+
+ if self.opts.dns_backend == 'SAMBA_INTERNAL':
+ self.setvar('ALLOW_DNS_UPDATES', '--option=allow dns updates = True')
+ # we need recursive queries, since host expects answers with RA-bit
+ self.setvar('DNS_RECURSIVE_QUERIES', '--option=dns recursive queries = Yes')
+ self.setvar('DNS_FORWARDER', "--option=dns forwarder = %s" % nameserver)
+ else:
+ self.setvar('ALLOW_DNS_UPDATES', '')
+ self.setvar('DNS_RECURSIVE_QUERIES', '')
+ self.setvar('DNS_FORWARDER', '')
--
Samba Shared Repository
More information about the samba-cvs
mailing list