Re: [Samba] Samba Versions

2010-11-16 Thread Anil Wakhare
Hi,
The latest version of samba is 3.0.33.-3.28.el5,I am using same one.

On Tue, Nov 16, 2010 at 12:33 PM, Volker Lendecke volker.lende...@sernet.de
 wrote:

 On Mon, Nov 15, 2010 at 06:10:46PM -0600, Gilmartin, Niall wrote:
  We are using Samba Version 2.2.5 on a HP D Class Server
  running HP-UX 10.20. Anyway my question is does anybody
  happen to know what is the latest version of Samba that
  will operate with HP-UX 10.20, or basically any version of
  Samba work with HP-UX 10.20?

 It's the Samba Team's goal to make the latest version
 runnable on all Posix platforms. So you might try to compile
 3.5.6. If it does not work, please report back any problems.

 Volker
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba




-- 

---

Thanks  Regards.
Anil S Wakhare.
Pune 411027,Maharashtra,India
Ph:-9763328839
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] how to map shared folders when start user profile in XP

2010-11-16 Thread Anil Wakhare
Hi,
I am not getting ur question.can u explain it briefly.

On Tue, Nov 16, 2010 at 1:08 PM, marcos gonzalez 
marcos.gonzalez.c...@gmail.com wrote:

 Hi

 yes, Im interested in a login script, but Im a newbie with this and I don't
 know where I can take examples. Inside samba documentacion there are no the
 sufficient complex examples and in my case Im interested to made a script
 for every user.

 Suggestions?

 Thnaks

 2010/11/15 Gaiseric Vandal gaiseric.van...@gmail.com

  Are you using a login script?  That should take care of mapping shared
  folders to drive letters.
 
  You can't use login scripts to setup printers.   If the printers are
  properly shared from a Windows server or Samba server users should be
 able
  to easily locate them in My Network Places.
 
 
 
  On 11/12/2010 06:33 AM, marcos gonzalez wrote:
 
  Hi guys
 
  I have configured samba 3.3.2 in a domain with Xp clients and I would
 like
  to config inside clients the shared folders how units when users starts,
  and
  the printers too. Im looking for this and the information is very
  confused,
  and I dont know which the fast option for users. Suggestions?
 
  Thanks
 
 
 
  --
  To unsubscribe from this list go to the following URL and read the
  instructions:  https://lists.samba.org/mailman/options/samba
 
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba




-- 

---

Thanks  Regards.
Anil S Wakhare.
Pune 411027,Maharashtra,India
Ph:-9763328839
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] how to remotely join workstations from commandline no ADS

2010-11-16 Thread Hubert Choma
It is any commandline to remotely join workstation to domain (pdbedit 
backend) . On WIKI I have found
http://wiki.samba.org/index.php/Remote_join

net dom join
command but it is for Active Directory . I don't have AD so how can I 
add remotely computer ?

I have following problem with one computer which lost authentication 
with samba server. This is due to connection to another network (not my) 
in which is MS 2003 server which provide internet connection to this 
host.
I can't map any disk from any user (admin, domain admin etc.) of this 
host (from my machine) and  can't see remotely logs or running services 
from administrative tools. This host is unavailable from network . Ping 
running ok.
I can see this host on network neighbourhood but when i click on this 
computer I see password prompt . It seems like host was unjoin from 
domain???

It is strange because I have manually add this computer and user which 
work on this machine to domain. And it works for a few months until it 
was connected to second network.


[2010/10/11 09:51:52,  3] smbd/vfs.c:vfs_init_custom(130)
  Initialising custom vfs hooks from [/[Default VFS]/]
[2010/10/11 09:51:52,  2] 
libsmb/credentials.c:netlogon_creds_server_check(223)
  netlogon_creds_server_check: credentials check failed.
[2010/10/11 09:51:52,  0] 
rpc_server/srv_netlog_nt.c:_netr_ServerAuthenticate2(555)
  _netr_ServerAuthenticate2: netlogon_creds_server_check failed. Rejecting 
auth request from client SM1 machine account SM1$
[2010/10/11 09:51:52,  3] 
passdb/secrets.c:secrets_store_schannel_session_info(1217)


My smb ver. 3.3.8-0.52.el5_5.2


Pleas help


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] how to map shared folders when start user profile in XP

2010-11-16 Thread Daniel Müller
Hi,
first of all you need to know if your users have the right to install
printers in your domain.
If they do not ,you can not do it by login script. Or the first login on the
workstation must be a administrator.
What I did  made a directory on the netlogon share with the name of the
printer. Copied the driver/files there.
Used kixtart to ask the registry if the printer exists, if not it is
installed (ex.: Lexmark E352db):

$RETURNVALUE = existkey(HKEY_Local_Machine\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Print\Printers\Lexmark E352dn)
IF NOT $RETURNVALUE = 0 

shell \\tpdc\netlogon\printer.bat


else


ENDIF


Here now printer.bat. To overcome the restrictions of the users I do it with
runas/sanur as administrator:

runas /user:tpdc\administrator \\tpdc\netlogon\sdre352dn.bat
|\\tpdc\netlogon\sanur.exe /i \\tpdc\netlogon\pw.txt

Now the installation with sdre352dn.bat:

echo make the ip port of the printer
cscript C:\Windows\System32\prnport.vbs -a -r IP_192.168.133.10 -h
192.168.133.10 -o raw -n 9100
echo install driver to workstations

rundll32 printui.dll,PrintUIEntry /if /b Lexmark E352dn /f
\\tpdc\netlogon\Lexmark\LMABK740.inf  /r IP_192.168.133.10 /m Lexmark
E352dn 

rundll32 printui.dll,PrintUIEntry /y /n Lexmark E352dn



Good Luck
Daniel

---
EDV Daniel Müller

Leitung EDV
Tropenklinik Paul-Lechler-Krankenhaus
Paul-Lechler-Str. 24
72076 Tübingen

Tel.: 07071/206-463, Fax: 07071/206-499
eMail: muel...@tropenklinik.de
Internet: www.tropenklinik.de
---
-Ursprüngliche Nachricht-
Von: samba-boun...@lists.samba.org [mailto:samba-boun...@lists.samba.org] Im
Auftrag von marcos gonzalez
Gesendet: Dienstag, 16. November 2010 08:39
An: gaiseric.van...@gmail.com
Cc: samba@lists.samba.org
Betreff: Re: [Samba] how to map shared folders when start user profile in XP

Hi

yes, Im interested in a login script, but Im a newbie with this and I don't
know where I can take examples. Inside samba documentacion there are no the
sufficient complex examples and in my case Im interested to made a script
for every user.

Suggestions?

Thnaks

2010/11/15 Gaiseric Vandal gaiseric.van...@gmail.com

 Are you using a login script?  That should take care of mapping shared
 folders to drive letters.

 You can't use login scripts to setup printers.   If the printers are
 properly shared from a Windows server or Samba server users should be able
 to easily locate them in My Network Places.



 On 11/12/2010 06:33 AM, marcos gonzalez wrote:

 Hi guys

 I have configured samba 3.3.2 in a domain with Xp clients and I would
like
 to config inside clients the shared folders how units when users starts,
 and
 the printers too. Im looking for this and the information is very
 confused,
 and I dont know which the fast option for users. Suggestions?

 Thanks



 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] how to map shared folders when start user profile in XP

2010-11-16 Thread marcos gonzalez
Hi

Im searching examples to configure logon scripts for every user. If I
configure netlogon how this

[global]
 logon path = \\%N\profiles\%U
   logon drive = H:
   logon home =
   logon script = logon.bat
[netlogon]
#   comment = Network Logon Service
   path = /var/lib/samba/netlogon
#   admin users = root
#   guest ok = yes
   read only = yes
   browseable = no

Only I can use one script, but I prefer to use specific scripts for users
too. I don't know If I can.

Other problem is how to configure shared folders for groups of users.

Thanks

2010/11/16 Anil Wakhare aswakh...@gmail.com

 Hi,
 I am not getting ur question.can u explain it briefly.

 On Tue, Nov 16, 2010 at 1:08 PM, marcos gonzalez 
 marcos.gonzalez.c...@gmail.com wrote:

 Hi

 yes, Im interested in a login script, but Im a newbie with this and I
 don't
 know where I can take examples. Inside samba documentacion there are no
 the
 sufficient complex examples and in my case Im interested to made a script
 for every user.

 Suggestions?

 Thnaks

 2010/11/15 Gaiseric Vandal gaiseric.van...@gmail.com

  Are you using a login script?  That should take care of mapping shared
  folders to drive letters.
 
  You can't use login scripts to setup printers.   If the printers are
  properly shared from a Windows server or Samba server users should be
 able
  to easily locate them in My Network Places.
 
 
 
  On 11/12/2010 06:33 AM, marcos gonzalez wrote:
 
  Hi guys
 
  I have configured samba 3.3.2 in a domain with Xp clients and I would
 like
  to config inside clients the shared folders how units when users
 starts,
  and
  the printers too. Im looking for this and the information is very
  confused,
  and I dont know which the fast option for users. Suggestions?
 
  Thanks
 
 
 
  --
  To unsubscribe from this list go to the following URL and read the
  instructions:  https://lists.samba.org/mailman/options/samba
 
 --

 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba




 --

 ---

 Thanks  Regards.
 Anil S Wakhare.
 Pune 411027,Maharashtra,India
 Ph:-9763328839


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] how to map shared folders when start user profile in XP

2010-11-16 Thread Daniel Müller
Look at logon script = logon.bat
Substitute it with %u.bat (for Users, sometimes %U)
Substitute it with %g.bat (Primary Group for Users %u)
Now you need for every user or group  a batch file

Or you do the include syntax to pass over a different smb.conf

include = /path/to/your/smb.confs/smb.conf.(%m/%u/%g)

---
EDV Daniel Müller

Leitung EDV
Tropenklinik Paul-Lechler-Krankenhaus
Paul-Lechler-Str. 24
72076 Tübingen

Tel.: 07071/206-463, Fax: 07071/206-499
eMail: muel...@tropenklinik.de
Internet: www.tropenklinik.de
---

-Ursprüngliche Nachricht-
Von: samba-boun...@lists.samba.org [mailto:samba-boun...@lists.samba.org] Im
Auftrag von marcos gonzalez
Gesendet: Dienstag, 16. November 2010 11:35
An: samba@lists.samba.org
Betreff: Re: [Samba] how to map shared folders when start user profile in XP

Hi

Im searching examples to configure logon scripts for every user. If I
configure netlogon how this

[global]
 logon path = \\%N\profiles\%U
   logon drive = H:
   logon home =
   logon script = logon.bat
[netlogon]
#   comment = Network Logon Service
   path = /var/lib/samba/netlogon
#   admin users = root
#   guest ok = yes
   read only = yes
   browseable = no

Only I can use one script, but I prefer to use specific scripts for users
too. I don't know If I can.

Other problem is how to configure shared folders for groups of users.

Thanks

2010/11/16 Anil Wakhare aswakh...@gmail.com

 Hi,
 I am not getting ur question.can u explain it briefly.

 On Tue, Nov 16, 2010 at 1:08 PM, marcos gonzalez 
 marcos.gonzalez.c...@gmail.com wrote:

 Hi

 yes, Im interested in a login script, but Im a newbie with this and I
 don't
 know where I can take examples. Inside samba documentacion there are no
 the
 sufficient complex examples and in my case Im interested to made a script
 for every user.

 Suggestions?

 Thnaks

 2010/11/15 Gaiseric Vandal gaiseric.van...@gmail.com

  Are you using a login script?  That should take care of mapping shared
  folders to drive letters.
 
  You can't use login scripts to setup printers.   If the printers are
  properly shared from a Windows server or Samba server users should be
 able
  to easily locate them in My Network Places.
 
 
 
  On 11/12/2010 06:33 AM, marcos gonzalez wrote:
 
  Hi guys
 
  I have configured samba 3.3.2 in a domain with Xp clients and I would
 like
  to config inside clients the shared folders how units when users
 starts,
  and
  the printers too. Im looking for this and the information is very
  confused,
  and I dont know which the fast option for users. Suggestions?
 
  Thanks
 
 
 
  --
  To unsubscribe from this list go to the following URL and read the
  instructions:  https://lists.samba.org/mailman/options/samba
 
 --

 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba




 --

 ---

 Thanks  Regards.
 Anil S Wakhare.
 Pune 411027,Maharashtra,India
 Ph:-9763328839


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] how to map shared folders when start user profile in XP

2010-11-16 Thread Anil Wakhare
Hi,
According to me,you can first  configure the smb.conf file.
Use the following

 domain master = yes
domain logons = yes
# the login script name depends on the machine name
logon script = %m.bat
# the login script name depends on the unix user used
logon script = %u.bat
logon path = \\%n\Profiles\%u
;   logon drive = H:
# disables profiles support by specifing an empty path
logon path = \\uccagent\%u
logon path = \\administrator\%u


On Tue, Nov 16, 2010 at 4:04 PM, marcos gonzalez 
marcos.gonzalez.c...@gmail.com wrote:

 Hi

 Im searching examples to configure logon scripts for every user. If I
 configure netlogon how this

 [global]
  logon path = \\%N\profiles\%U
   logon drive = H:
   logon home =
   logon script = logon.bat
 [netlogon]
 #   comment = Network Logon Service
   path = /var/lib/samba/netlogon
 #   admin users = root
 #   guest ok = yes
   read only = yes
   browseable = no

 Only I can use one script, but I prefer to use specific scripts for users
 too. I don't know If I can.

 Other problem is how to configure shared folders for groups of users.

 Thanks

 2010/11/16 Anil Wakhare aswakh...@gmail.com

  Hi,
  I am not getting ur question.can u explain it briefly.
 
  On Tue, Nov 16, 2010 at 1:08 PM, marcos gonzalez 
  marcos.gonzalez.c...@gmail.com wrote:
 
  Hi
 
  yes, Im interested in a login script, but Im a newbie with this and I
  don't
  know where I can take examples. Inside samba documentacion there are no
  the
  sufficient complex examples and in my case Im interested to made a
 script
  for every user.
 
  Suggestions?
 
  Thnaks
 
  2010/11/15 Gaiseric Vandal gaiseric.van...@gmail.com
 
   Are you using a login script?  That should take care of mapping shared
   folders to drive letters.
  
   You can't use login scripts to setup printers.   If the printers are
   properly shared from a Windows server or Samba server users should be
  able
   to easily locate them in My Network Places.
  
  
  
   On 11/12/2010 06:33 AM, marcos gonzalez wrote:
  
   Hi guys
  
   I have configured samba 3.3.2 in a domain with Xp clients and I would
  like
   to config inside clients the shared folders how units when users
  starts,
   and
   the printers too. Im looking for this and the information is very
   confused,
   and I dont know which the fast option for users. Suggestions?
  
   Thanks
  
  
  
   --
   To unsubscribe from this list go to the following URL and read the
   instructions:  https://lists.samba.org/mailman/options/samba
  
  --
 
  To unsubscribe from this list go to the following URL and read the
  instructions:  https://lists.samba.org/mailman/options/samba
 
 
 
 
  --
 
  ---
 
  Thanks  Regards.
  Anil S Wakhare.
  Pune 411027,Maharashtra,India
  Ph:-9763328839
 
 
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba




-- 

---

Thanks  Regards.
Anil S Wakhare.
Pune 411027,Maharashtra,India
Ph:-9763328839
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba Versions

2010-11-16 Thread Robert Freeman-Day
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

This should be clarified.  The version of samba mentioned is a Red Hat
package.  To keep things platform/packager agnostic, refer to this wiki
page to find out the latest supported versions of samba:

http://wiki.samba.org/index.php/Samba3_Release_Planning

On 11/16/2010 04:19 AM, Anil Wakhare wrote:
 Hi,
 The latest version of samba is 3.0.33.-3.28.el5,I am using same one.
 
 On Tue, Nov 16, 2010 at 12:33 PM, Volker Lendecke volker.lende...@sernet.de
 wrote:
 
 On Mon, Nov 15, 2010 at 06:10:46PM -0600, Gilmartin, Niall wrote:
 We are using Samba Version 2.2.5 on a HP D Class Server
 running HP-UX 10.20. Anyway my question is does anybody
 happen to know what is the latest version of Samba that
 will operate with HP-UX 10.20, or basically any version of
 Samba work with HP-UX 10.20?

 It's the Samba Team's goal to make the latest version
 runnable on all Posix platforms. So you might try to compile
 3.5.6. If it does not work, please report back any problems.

 Volker
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

 
 
 


- -- 


Robert Freeman-Day

https://launchpad.net/~presgas
GPG Public Key:
http://keyserver.ubuntu.com:11371/pks/lookup?op=getsearch=0xBA9DF9ED3E4C7D36
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzior8ACgkQup357T5MfTayIQCgqIX7c2707iPeA5g5BLqtRoWZ
GfYAoLOC+KqD4akS3P/1AYQTahhMpWQv
=WfvI
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] I can't rename any file/folder from samba clients.

2010-11-16 Thread anil

 Hi,
Make user as a file owner,I think it will work


On 11/16/2010 07:47 PM, Linux Tux wrote:

Hello world,

I have a problem, i can't rename any file/folder from samba clients.
I can create and delete  files/folders but not rename.
Permessions in /home/public : chmod -r 777 /home/public

I tried many configurations comment/uncomment below parameters in [public]
but without any effect.

Any idea ?
Thanks

This is my configuration:

This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# For a step to step guide on installing, configuring and using samba,
# read the Samba-HOWTO-Collection. This may be obtained from:
#  http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
#
# Many working examples of smb.conf files can be found in the
# Samba-Guide which is generated daily and can be downloaded from:
#  http://www.samba.org/samba/docs/Samba-Guide.pdf
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command testparm
# to check that you have not made any basic syntactic errors.
#
#---
# SELINUX NOTES:
#
# If you want to use the useradd/groupadd family of binaries please run:
# setsebool -P samba_domain_controller on
#
# If you want to share home directories via samba please run:
# setsebool -P samba_enable_home_dirs on
#
# If you create a new directory you want to share you should mark it as
# samba-share_t so that selinux will let you write into it.
# Make sure not to do that on system directories as they may already have
# been marked with othe SELinux labels.
#
# Use ls -ldZ /path to see which context a directory has
#
# Set labels only on directories you created!
# To set a label use the following: chcon -t samba_share_t /path
#
# If you need to share a system created directory you can use one of the
# following (read-only/read-write):
# setsebool -P samba_export_all_ro on
# or
# setsebool -P samba_export_all_rw on
#
# If you want to run scripts (preexec/root prexec/print command/...) please
# put them into the /var/lib/samba/scripts directory so that smbd will be
# allowed to run them.
# Make sure you COPY them and not MOVE them so that the right SELinux
context
# is applied, to check all is ok use restorecon -R -v /var/lib/samba/scripts
#
#--
#
#
#=== Global Settings
=

[global]

# --- Network Related Options -
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
 workgroup = MYGROUP
 server string = Samba Server Version %v

;   netbios name = MYSERVER

;   interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
;   hosts allow = 127. 192.168.12. 192.168.13.

# --- Logging Options -
#
# Log File let you specify where to put logs and how to split them up.
#
# Max Log Size let you specify the max size log files should reach

 # logs split per machine
;   log file = /var/log/samba/%m.log
 # max 50KB per log file, then rotate
;   max log size = 50

# --- Standalone Server Options 
#
# Security can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.

 security = share
 passdb backend = tdbsam


# --- Domain Members Options 
#
# Security must be set to domain or ads
#
# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
#
# Use password server option only with security = server or if you can't
# use the DNS to locate Domain Controllers
# The argument list may include:
#   password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
#   

Re: [Samba] winbind sometimes does not resolve sid to a name

2010-11-16 Thread Shirish Pargaonkar
On Sat, Nov 13, 2010 at 5:34 PM, Michael Wood esiot...@gmail.com wrote:
 On 14 November 2010 01:16, Shirish Pargaonkar
 shirishpargaon...@gmail.com wrote:
 On Sat, Nov 13, 2010 at 4:52 PM, Michael Adam ob...@samba.org wrote:
 Hi Shirish,

 Shirish Pargaonkar wrote:
 On Mon, Nov 8, 2010 at 1:47 PM, Jeremy Allison j...@samba.org wrote:
  On Mon, Nov 08, 2010 at 01:21:30PM -0600, Shirish Pargaonkar wrote:
  Sometimes a group sid does not get resolved to its name.
 
  Is this a settings problem?  Looks like winbind deamon
  went dormant for a while and then woke up?
  I am using interface wbcLookupSid provided by the
  library libwbclient.so for resolving sids to names.
 
  These are the winbind related parameters in
  /etc/samba/smb.conf
 
  Not enough information for useful debugging. What
  do the winbindd logs say ?
 

 ps -eaf | grep winbind
 root     20085     1  0 14:03 ?        00:00:00 /usr/sbin/winbindd -D
 root     20086 20085  0 14:03 ?        00:00:00 /usr/sbin/winbindd -D
 root     20089 20085  0 14:03 ?        00:00:00 /usr/sbin/winbindd -D

 Cleared /var/log/samba/winbindd.log just before issueing
 command getcifsacl which could not resolve the group SID

 winbindd.log attached.

 not really. :-)

 Cheers - Michael

 Michael, not sure what is implied.  The log is not sufficient?

 No, the mailing list (sometimes) strips attachments.  There was no log
 file attached to your e-mail when I received it.

 I see two error messages in the log.

 [2010/11/08 14:32:56,  5] winbindd/winbindd_async.c:lookupsid_recv2(138)
  lookupsid (forest root) returned an error
 [2010/11/08 14:32:56,  5] winbindd/winbindd_sid.c:lookupsid_recv(61)
  lookupsid returned an error

 --
 Michael Wood esiot...@gmail.com


Hope this attachment sticks.

Regards,

Shirish
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] how to map shared folders when start user profile in XP

2010-11-16 Thread marcos gonzalez
Hi

I understand If I change the smb.conf to :

logon script = %u.bat
logon path = \\%n\Profiles\%u
logon drive = H:

putting the script user.bat into the root profile folder (for example
/var/lib/samba/profiles/user/ ) for every user load their configuration?

Thanks!

2010/11/16 Anil Wakhare aswakh...@gmail.com

 Hi,
 According to me,you can first  configure the smb.conf file.
 Use the following

  domain master = yes
 domain logons = yes
 # the login script name depends on the machine name
 logon script = %m.bat
 # the login script name depends on the unix user used
 logon script = %u.bat
 logon path = \\%n\Profiles\%u
 ;   logon drive = H:
 # disables profiles support by specifing an empty path
 logon path = \\uccagent\%u
 logon path = \\administrator\%u



 On Tue, Nov 16, 2010 at 4:04 PM, marcos gonzalez 
 marcos.gonzalez.c...@gmail.com wrote:

 Hi

 Im searching examples to configure logon scripts for every user. If I
 configure netlogon how this

 [global]
  logon path = \\%N\profiles\%U
   logon drive = H:
   logon home =
   logon script = logon.bat
 [netlogon]
 #   comment = Network Logon Service
   path = /var/lib/samba/netlogon
 #   admin users = root
 #   guest ok = yes
   read only = yes
   browseable = no

 Only I can use one script, but I prefer to use specific scripts for users
 too. I don't know If I can.

 Other problem is how to configure shared folders for groups of users.

 Thanks

 2010/11/16 Anil Wakhare aswakh...@gmail.com

  Hi,
  I am not getting ur question.can u explain it briefly.
 
  On Tue, Nov 16, 2010 at 1:08 PM, marcos gonzalez 
  marcos.gonzalez.c...@gmail.com wrote:
 
  Hi
 
  yes, Im interested in a login script, but Im a newbie with this and I
  don't
  know where I can take examples. Inside samba documentacion there are no
  the
  sufficient complex examples and in my case Im interested to made a
 script
  for every user.
 
  Suggestions?
 
  Thnaks
 
  2010/11/15 Gaiseric Vandal gaiseric.van...@gmail.com
 
   Are you using a login script?  That should take care of mapping
 shared
   folders to drive letters.
  
   You can't use login scripts to setup printers.   If the printers are
   properly shared from a Windows server or Samba server users should be
  able
   to easily locate them in My Network Places.
  
  
  
   On 11/12/2010 06:33 AM, marcos gonzalez wrote:
  
   Hi guys
  
   I have configured samba 3.3.2 in a domain with Xp clients and I
 would
  like
   to config inside clients the shared folders how units when users
  starts,
   and
   the printers too. Im looking for this and the information is very
   confused,
   and I dont know which the fast option for users. Suggestions?
  
   Thanks
  
  
  
   --
   To unsubscribe from this list go to the following URL and read the
   instructions:  https://lists.samba.org/mailman/options/samba
  
  --
 
  To unsubscribe from this list go to the following URL and read the
  instructions:  https://lists.samba.org/mailman/options/samba
 
 
 
 
  --
 
  ---
 
  Thanks  Regards.
  Anil S Wakhare.
  Pune 411027,Maharashtra,India
  Ph:-9763328839
 
 
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba




 --

 ---

 Thanks  Regards.
 Anil S Wakhare.
 Pune 411027,Maharashtra,India
 Ph:-9763328839


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] how to map shared folders when start user profile in XP

2010-11-16 Thread anil

 Hi,
Your problem is sorted now?

On 11/16/2010 10:18 PM, marcos gonzalez wrote:

Hi

I understand If I change the smb.conf to :

logon script = %u.bat
logon path = \\%n\Profiles\%u
logon drive = H:

putting the script user.bat into the root profile folder (for example
/var/lib/samba/profiles/user/ ) for every user load their configuration?

Thanks!

2010/11/16 Anil Wakhareaswakh...@gmail.com


Hi,
According to me,you can first  configure the smb.conf file.
Use the following

  domain master = yes
 domain logons = yes
 # the login script name depends on the machine name
 logon script = %m.bat
 # the login script name depends on the unix user used
 logon script = %u.bat
 logon path = \\%n\Profiles\%u
;   logon drive = H:
 # disables profiles support by specifing an empty path
 logon path = \\uccagent\%u
 logon path = \\administrator\%u



On Tue, Nov 16, 2010 at 4:04 PM, marcos gonzalez
marcos.gonzalez.c...@gmail.com  wrote:


Hi

Im searching examples to configure logon scripts for every user. If I
configure netlogon how this

[global]
  logon path = \\%N\profiles\%U
   logon drive = H:
   logon home =
   logon script = logon.bat
[netlogon]
#   comment = Network Logon Service
   path = /var/lib/samba/netlogon
#   admin users = root
#   guest ok = yes
   read only = yes
   browseable = no

Only I can use one script, but I prefer to use specific scripts for users
too. I don't know If I can.

Other problem is how to configure shared folders for groups of users.

Thanks

2010/11/16 Anil Wakhareaswakh...@gmail.com


Hi,
I am not getting ur question.can u explain it briefly.

On Tue, Nov 16, 2010 at 1:08 PM, marcos gonzalez
marcos.gonzalez.c...@gmail.com  wrote:


Hi

yes, Im interested in a login script, but Im a newbie with this and I
don't
know where I can take examples. Inside samba documentacion there are no
the
sufficient complex examples and in my case Im interested to made a

script

for every user.

Suggestions?

Thnaks

2010/11/15 Gaiseric Vandalgaiseric.van...@gmail.com


Are you using a login script?  That should take care of mapping

shared

folders to drive letters.

You can't use login scripts to setup printers.   If the printers are
properly shared from a Windows server or Samba server users should be

able

to easily locate them in My Network Places.



On 11/12/2010 06:33 AM, marcos gonzalez wrote:


Hi guys

I have configured samba 3.3.2 in a domain with Xp clients and I

would

like

to config inside clients the shared folders how units when users

starts,

and
the printers too. Im looking for this and the information is very
confused,
and I dont know which the fast option for users. Suggestions?

Thanks



--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


--

To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba




--

---

Thanks  Regards.
Anil S Wakhare.
Pune 411027,Maharashtra,India
Ph:-9763328839



--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba




--

---

Thanks  Regards.
Anil S Wakhare.
Pune 411027,Maharashtra,India
Ph:-9763328839




--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] how to map shared folders when start user profile in XP

2010-11-16 Thread Chris Weiss
that's because login scripts are a windows thing.  Any old NT4
examples will work with a samba3 domain.

On Tue, Nov 16, 2010 at 1:38 AM, marcos gonzalez
marcos.gonzalez.c...@gmail.com wrote:
 Hi

 yes, Im interested in a login script, but Im a newbie with this and I don't
 know where I can take examples. Inside samba documentacion there are no the
 sufficient complex examples and in my case Im interested to made a script
 for every user.

 Suggestions?

 Thnaks

 2010/11/15 Gaiseric Vandal gaiseric.van...@gmail.com

 Are you using a login script?  That should take care of mapping shared
 folders to drive letters.

 You can't use login scripts to setup printers.   If the printers are
 properly shared from a Windows server or Samba server users should be able
 to easily locate them in My Network Places.



 On 11/12/2010 06:33 AM, marcos gonzalez wrote:

 Hi guys

 I have configured samba 3.3.2 in a domain with Xp clients and I would like
 to config inside clients the shared folders how units when users starts,
 and
 the printers too. Im looking for this and the information is very
 confused,
 and I dont know which the fast option for users. Suggestions?

 Thanks



 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Win7 SLOW printing

2010-11-16 Thread Ryan Suarez
Ok, it looks like this was the cause of the delay.  As soon as I disable 
windows firewall on this client, the errors disappear and jobs start 
printing immediately.  We have bring your own laptops (with their own 
image) here at the college.  I suspect this is the same cause of their 
delays.


Could someone please shed some light what samba uses this connection for?

On 10-11-15 04:50 PM, Ryan Suarez wrote:

Greetings,

We use a dedicated samba-3.3.12+cups-1.3.11 on debian lenny to serve 
printing (with point and print) to windows clients.  We're getting 
complaints that some clients (win7, vista, XP) have to wait an awful 
long time from when they hit 'print' to when the job starts coming out 
of the printer.  Other clients (win7, vista, XP) print right away.


I can tail the cups log and see that as soon as it gets the job, it's 
printed immediately.  The issue is cups does not log the job until a 
few minutes/hours after the problem clients hit print.  I have a 
problem client to try and isolate the problem.  The only difference I 
can see (for now) is that samba logs this when the problem client prints:


[2010/11/15 16:23:34,  1] lib/util_sock.c:open_socket_out(1424)
  timeout connecting to 192.168.76.10:445
[2010/11/15 16:23:42,  1] lib/util_sock.c:open_socket_out(1424)
  timeout connecting to 192.168.76.10:139
[2010/11/15 16:23:42,  1] libsmb/cliconnect.c:cli_start_connection(1657)
  cli_start_connection: failed to connect to OA-C126-DGC20 
(192.168.76.10). Error NT_STATUS_ACCESS_DENIED

[2010/11/15 16:23:51,  1] lib/util_sock.c:open_socket_out(1424)
  timeout connecting to 192.168.76.10:445
[2010/11/15 16:24:00,  1] lib/util_sock.c:open_socket_out(1424)
  timeout connecting to 192.168.76.10:139
[2010/11/15 16:24:00,  1] libsmb/cliconnect.c:cli_start_connection(1657)
  cli_start_connection: failed to connect to OA-C126-DGC20 
(192.168.76.10). Error NT_STATUS_ACCESS_DENIED

[2010/11/15 16:24:09,  1] lib/util_sock.c:open_socket_out(1424)
  timeout connecting to 192.168.76.10:445
...

A client that prints right away does not get the error above.  Why is 
samba trying to initiate a connection to this client?  Could this be 
the cause of their delay?


thanks and much appreciated,
Ryan



--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Win7 SLOW printing

2010-11-16 Thread Jeremy Allison
On Tue, Nov 16, 2010 at 01:27:43PM -0500, Ryan Suarez wrote:
 Ok, it looks like this was the cause of the delay.  As soon as I
 disable windows firewall on this client, the errors disappear and
 jobs start printing immediately.  We have bring your own laptops
 (with their own image) here at the college.  I suspect this is the
 same cause of their delays.
 
 Could someone please shed some light what samba uses this connection for?

This is the insane Windows print spooler design, where the server
connects back to the client to do change notify.

Samba tries to do the same - look at spoolss_connect_to_client()
in rpc_server/srv_spoolss_nt.c - maybe we should have an option
to disable this.

Jeremy.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Win7 SLOW printing

2010-11-16 Thread Ryan Suarez

On 10-11-16 01:44 PM, Jeremy Allison wrote:

On Tue, Nov 16, 2010 at 01:27:43PM -0500, Ryan Suarez wrote:
   

Ok, it looks like this was the cause of the delay.  As soon as I
disable windows firewall on this client, the errors disappear and
jobs start printing immediately.  We have bring your own laptops
(with their own image) here at the college.  I suspect this is the
same cause of their delays.

Could someone please shed some light what samba uses this connection for?
 

This is the insane Windows print spooler design, where the server
connects back to the client to do change notify.

Samba tries to do the same - look at spoolss_connect_to_client()
in rpc_server/srv_spoolss_nt.c - maybe we should have an option
to disable this.
   


Thanks Jeremy!  Found this link that describes it in more detail:
http://www.samba.org/samba/docs/man/Samba-Developers-Guide/devprinting.html#id2561672

We have alot of these clients that we don't control.  Bring your own 
laptop, where firewall is enabled by default, is prevalent here at the 
college.  I think disabling this server-side is more palatable than 
fixing every client.  I'm just concerned what functionality we'll lose 
in regards to point and print and printing in general.  Thoughts?


-Ryan
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Samba 3.5.X

2010-11-16 Thread Belter Steve Ortiz Mijangos
Hello,

I don't know if this was reported before, I never found anything related.

A few days ago I installed a Domain Controller with samba 3.5.6, with an
ldap backend.  I added a Windows 2008 Server R2 to the domain but never was
able to authenticate to the domain, I always got the error There are
currently no logon.   .  After a time I decided to try samba 3.4.8,
without any changes in the configuration and nowhere else, I was able to
authenticate.

Is there a reason for this??

Steve
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Invitation to connect on LinkedIn

2010-11-16 Thread Celso Vianna via LinkedIn
LinkedIn
Celso Vianna requested to add you as a connection on LinkedIn:
--

Serge,

I'd like to add you to my professional network on LinkedIn.

- Celso

Accept invitation from Celso Vianna
http://www.linkedin.com/e/mzateh-gglgws4q-51/vTWyDe4yCEPPQyWVLZMh1H4yCEPPQGFCi7/blk/I21349239_25/pmpxnSRJrSdvj4R5fnhv9ClRsDgZp6lQs6lzoQ5AomZIpn8_dj9vejcOejgPcj99bPhRhBx3jClUbPcQcjoVe3cNej4LrCBxbOYWrSlI/EML_comm_afe/

View invitation from Celso Vianna
http://www.linkedin.com/e/mzateh-gglgws4q-51/vTWyDe4yCEPPQyWVLZMh1H4yCEPPQGFCi7/blk/I21349239_25/0RcBYVcP8Vd3cNcAALqnpPbOYWrSlI/svi/


 
-- 
(c) 2010, LinkedIn Corporation
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[SCM] Samba Shared Repository - branch master updated

2010-11-16 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  0f29042 s4:subtree_rename LDB module - make use of 
dsdb_find_nc_root
   via  71a5ea9 s4:objectclass LDB module - free nc_root after name 
context comparisons
  from  f99403e s4-test: fixes for test-howto.py

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 0f2904247ba7f888023bd4ab4e2e42d565d7e840
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Nov 16 08:34:52 2010 +0100

s4:subtree_rename LDB module - make use of dsdb_find_nc_root

This is exactly what's needed there.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Nov 16 08:42:07 UTC 2010 on sn-devel-104

commit 71a5ea93ff76dee94f23a4f69dd1ede0a12255f6
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Nov 16 08:34:27 2010 +0100

s4:objectclass LDB module - free nc_root after name context comparisons

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/objectclass.c|2 +
 source4/dsdb/samdb/ldb_modules/subtree_rename.c |   49 --
 2 files changed, 29 insertions(+), 22 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c 
b/source4/dsdb/samdb/ldb_modules/objectclass.c
index 19feaa5..5a7c67e 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -859,6 +859,8 @@ static int objectclass_modify(struct ldb_module *module, 
struct ldb_request *req
  objectclass: object class changes on 
objects under the standard name contexts not allowed!);
return LDB_ERR_UNWILLING_TO_PERFORM;
}
+
+   talloc_free(nc_root);
}
 
ret = ldb_build_mod_req(down_req, ldb, ac,
diff --git a/source4/dsdb/samdb/ldb_modules/subtree_rename.c 
b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
index 64bbc08..cf08a9a 100644
--- a/source4/dsdb/samdb/ldb_modules/subtree_rename.c
+++ b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
@@ -147,10 +147,11 @@ static int check_constraints(struct ldb_message *msg,
 struct ldb_dn *olddn, struct ldb_dn *newdn)
 {
struct ldb_context *ldb = ldb_module_get_ctx(ac-module);
-   struct ldb_dn *dn1, *dn2;
+   struct ldb_dn *dn1, *dn2, *nc_root;
int32_t systemFlags;
bool move_op = false;
bool rename_op = false;
+   int ret;
 
/* Skip the checks if old and new DN are the same, or if we have the
 * relax control specified or if the returned objects is already
@@ -215,9 +216,28 @@ static int check_constraints(struct ldb_message *msg,
 
systemFlags = ldb_msg_find_attr_as_int(msg, systemFlags, 0);
 
-   /* the config system flags don't apply for the schema partition */
-   if ((ldb_dn_compare_base(ldb_get_config_basedn(ldb), olddn) == 0) 
-   (ldb_dn_compare_base(ldb_get_schema_basedn(ldb), olddn) != 0)) {
+   /* Fetch name context */
+
+   ret = dsdb_find_nc_root(ldb, ac, olddn, nc_root);
+   if (ret != LDB_SUCCESS) {
+   return ret;
+   }
+
+   if (ldb_dn_compare(nc_root, ldb_get_schema_basedn(ldb)) == 0) {
+   if (move_op) {
+   ldb_asprintf_errstring(ldb,
+  subtree_rename: Cannot move %s, 
it isn't permitted!,
+  ldb_dn_get_linearized(olddn));
+   return LDB_ERR_UNWILLING_TO_PERFORM;
+   }
+   if (rename_op 
+   (systemFlags  SYSTEM_FLAG_SCHEMA_BASE_OBJECT) != 0) {
+   ldb_asprintf_errstring(ldb,
+  subtree_rename: Cannot rename 
%s, it isn't permitted!,
+  ldb_dn_get_linearized(olddn));
+   return LDB_ERR_UNWILLING_TO_PERFORM;
+   }
+   } else if (ldb_dn_compare(nc_root, ldb_get_config_basedn(ldb)) == 0) {
if (move_op 
(systemFlags  SYSTEM_FLAG_CONFIG_ALLOW_MOVE) == 0) {
/* Here we have to do more: control the
@@ -256,24 +276,7 @@ static int check_constraints(struct ldb_message *msg,
   ldb_dn_get_linearized(olddn));
return LDB_ERR_UNWILLING_TO_PERFORM;
}
-   }
-   if (ldb_dn_compare_base(ldb_get_schema_basedn(ldb), olddn) == 0) {
-   if (move_op) {
-   ldb_asprintf_errstring(ldb,
-  subtree_rename: Cannot move %s, 
it isn't permitted!,
-  ldb_dn_get_linearized(olddn));
-   

[SCM] Samba Shared Repository - branch master updated

2010-11-16 Thread Kamen Mazdrashki
The branch, master has been updated
   via  cce6627 s4-schema_load: Don't clean in_transaction flag until 
transaction is really finished
  from  0f29042 s4:subtree_rename LDB module - make use of 
dsdb_find_nc_root

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit cce662763efc2843c3dffeb1d43c12e641ce9949
Author: Kamen Mazdrashki kame...@samba.org
Date:   Thu Nov 11 23:25:35 2010 +0200

s4-schema_load: Don't clean in_transaction flag until transaction is really 
finished

Autobuild-User: Kamen Mazdrashki kame...@samba.org
Autobuild-Date: Tue Nov 16 11:00:35 UTC 2010 on sn-devel-104

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/schema_load.c |   13 ++---
 1 files changed, 6 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/schema_load.c 
b/source4/dsdb/samdb/ldb_modules/schema_load.c
index 086b2bf..ddc3b3f 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_load.c
+++ b/source4/dsdb/samdb/ldb_modules/schema_load.c
@@ -318,25 +318,24 @@ static int schema_load_start_transaction(struct 
ldb_module *module)
return ldb_next_start_trans(module);
 }
 
-static int schema_load_del_transaction(struct ldb_module *module)
+static int schema_load_end_transaction(struct ldb_module *module)
 {
struct schema_load_private_data *private_data =
talloc_get_type(ldb_module_get_private(module), struct 
schema_load_private_data);
 
private_data-in_transaction = false;
 
-   return ldb_next_del_trans(module);
+   return ldb_next_end_trans(module);
 }
 
-static int schema_load_prepare_commit(struct ldb_module *module)
+static int schema_load_del_transaction(struct ldb_module *module)
 {
-   int ret;
struct schema_load_private_data *private_data =
talloc_get_type(ldb_module_get_private(module), struct 
schema_load_private_data);
 
-   ret = ldb_next_prepare_commit(module);
private_data-in_transaction = false;
-   return ret;
+
+   return ldb_next_del_trans(module);
 }
 
 static int schema_load_extended(struct ldb_module *module, struct ldb_request 
*req)
@@ -359,7 +358,7 @@ static const struct ldb_module_ops 
ldb_schema_load_module_ops = {
.init_context   = schema_load_init,
.extended   = schema_load_extended,
.start_transaction = schema_load_start_transaction,
-   .prepare_commit= schema_load_prepare_commit,
+   .end_transaction   = schema_load_end_transaction,
.del_transaction   = schema_load_del_transaction,
 };
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-11-16 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  d451ac1 s4:acl LDB module - use also here dsdb_find_nc_root to 
implement the NC-specific checks
   via  856e309 s4:descriptor LDB module - also get_default_ag should 
make use of dsdb_find_nc_root
   via  cebad70 s4:descriptor LDB module - handle the NCs in a more generic 
way by using dsdb_find_nc_root
   via  7cc2f98 s4:dsdb_find_nc_root - let it work also when the 
namingContexts attribute isn't available yet
   via  d2453b5 s4:descriptor LDB module - make more clear that special 
control entries never should be handled by modules
   via  f863f434 s4:objectclass LDB module - the olddn is the special DN 
for rename requests
  from  cce6627 s4-schema_load: Don't clean in_transaction flag until 
transaction is really finished

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit d451ac1f3ac7b391e3cb28dca8e665bf1e1beddd
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Nov 16 14:22:27 2010 +0100

s4:acl LDB module - use also here dsdb_find_nc_root to implement the 
NC-specific checks

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Nov 16 15:12:13 UTC 2010 on sn-devel-104

commit 856e309b14491849ec65d37fc23e03dd07063e21
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Nov 16 13:17:32 2010 +0100

s4:descriptor LDB module - also get_default_ag should make use of 
dsdb_find_nc_root

commit cebad70ee6d8fb3e2f3d306d98fb88a4c8526f28
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Nov 16 13:12:02 2010 +0100

s4:descriptor LDB module - handle the NCs in a more generic way by using 
dsdb_find_nc_root

commit 7cc2f9803801dcae0a4780f46cd2b642fac1b1cf
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Nov 16 15:20:04 2010 +0100

s4:dsdb_find_nc_root - let it work also when the namingContexts 
attribute isn't available yet

This is needed on provisioning when the modules aren't set up yet.

commit d2453b52d84c148176b7384d0973645423647d38
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Nov 16 13:25:34 2010 +0100

s4:descriptor LDB module - make more clear that special control entries 
never should be handled by modules

commit f863f434a01d49a27b963ec71a86727f0d95dc59
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Nov 16 13:22:05 2010 +0100

s4:objectclass LDB module - the olddn is the special DN for rename 
requests

---

Summary of changes:
 source4/dsdb/common/util.c   |   42 ++---
 source4/dsdb/samdb/ldb_modules/acl.c |   85 +-
 source4/dsdb/samdb/ldb_modules/descriptor.c  |   63 ---
 source4/dsdb/samdb/ldb_modules/objectclass.c |2 +-
 4 files changed, 133 insertions(+), 59 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 7f6ce64..fb891ab 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -3282,15 +3282,41 @@ int dsdb_find_nc_root(struct ldb_context *samdb, 
TALLOC_CTX *mem_ctx, struct ldb
DEBUG(1,(Searching for namingContexts in rootDSE failed: 
%s\n, ldb_errstring(samdb)));
talloc_free(tmp_ctx);
return ret;
-   }
+   }
 
-   el = ldb_msg_find_element(root_res-msgs[0], namingContexts);
-   if (!el) {
-   DEBUG(1,(Finding namingContexts element in root_res failed: 
%s\n,
-   ldb_errstring(samdb)));
-  talloc_free(tmp_ctx);
-  return LDB_ERR_NO_SUCH_ATTRIBUTE;
-   }
+   el = ldb_msg_find_element(root_res-msgs[0], namingContexts);
+   if (!el) {
+   struct ldb_message *tmp_msg;
+
+   DEBUG(5,(Finding namingContexts element in root_res failed. 
Using a temporary list.));
+
+   /* This generates a temporary list of NCs in order to let the
+* provisioning work. */
+   tmp_msg = ldb_msg_new(tmp_ctx);
+   if (tmp_msg == NULL) {
+   talloc_free(tmp_ctx);
+   return ldb_oom(samdb);
+   }
+   ret = ldb_msg_add_steal_string(tmp_msg, namingContexts,
+  ldb_dn_alloc_linearized(tmp_msg, 
ldb_get_schema_basedn(samdb)));
+   if (ret != LDB_SUCCESS) {
+   talloc_free(tmp_ctx);
+   return ret;
+   }
+   ret = ldb_msg_add_steal_string(tmp_msg, namingContexts,
+  ldb_dn_alloc_linearized(tmp_msg, 
ldb_get_config_basedn(samdb)));
+   if (ret != LDB_SUCCESS) {
+   talloc_free(tmp_ctx);
+   return ret;
+  

[SCM] Samba Shared Repository - branch master updated

2010-11-16 Thread Andrew Bartlett
The branch, master has been updated
   via  deed2a9 s4-kdc Rework supported encryption type logic to match 
Microsoft
  from  d451ac1 s4:acl LDB module - use also here dsdb_find_nc_root to 
implement the NC-specific checks

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit deed2a935b0ebd615929e21ec423204d44ada067
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Nov 16 21:01:22 2010 +1100

s4-kdc Rework supported encryption type logic to match Microsoft

Thanks to Hongwei Sun for the clear description of the algorithim
involved.  Importantly, it isn't possible to remove encryption types
from the list, only to add them over the defaults (DES and
arcfour-hmac-md5, and additional AES for DCs and RODCs).

This changes the behaviour for entries with
msDS-supportedEncryptionTypes: 0, which Angelos Oikonomopoulos
reported finding set by ADUC when attempting to store cleartext
passwords.

Andrew Bartlett

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Tue Nov 16 21:24:43 UTC 2010 on sn-devel-104

---

Summary of changes:
 source4/kdc/db-glue.c |   53 ++--
 1 files changed, 16 insertions(+), 37 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c
index b062282..215b230 100644
--- a/source4/kdc/db-glue.c
+++ b/source4/kdc/db-glue.c
@@ -214,35 +214,34 @@ static krb5_error_code 
samba_kdc_message2entry_keys(krb5_context context,
uint16_t i;
uint16_t allocated_keys = 0;
int rodc_krbtgt_number = 0;
-   uint32_t supported_enctypes;
+   uint32_t supported_enctypes
+   = ldb_msg_find_attr_as_uint(msg,
+   msDS-SupportedEncryptionTypes,
+   0);
 
if (rid == DOMAIN_RID_KRBTGT || is_rodc) {
-   /* KDCs (and KDCs on RODCs) use AES, but not DES */
-   supported_enctypes = ENC_ALL_TYPES;
-   supported_enctypes = ~(ENC_CRC32|ENC_RSA_MD5);
+   /* KDCs (and KDCs on RODCs) use AES */
+   supported_enctypes |= ENC_HMAC_SHA1_96_AES128 | 
ENC_HMAC_SHA1_96_AES256;
} else if (userAccountControl  
(UF_PARTIAL_SECRETS_ACCOUNT|UF_SERVER_TRUST_ACCOUNT)) {
/* DCs and RODCs comptuer accounts use AES */
-   supported_enctypes = ENC_ALL_TYPES;
+   supported_enctypes |= ENC_HMAC_SHA1_96_AES128 | 
ENC_HMAC_SHA1_96_AES256;
} else if (ent_type == SAMBA_KDC_ENT_TYPE_CLIENT ||
   (ent_type == SAMBA_KDC_ENT_TYPE_ANY)) {
/* for AS-REQ the client chooses the enc types it
 * supports, and this will vary between computers a
-* user logs in from.  However, some accounts may be
-* banned from using DES, so allow the default to be
-* overridden
+* user logs in from.
 *
 * likewise for 'any' return as much as is supported,
 * to export into a keytab */
-   supported_enctypes = ldb_msg_find_attr_as_uint(msg, 
msDS-SupportedEncryptionTypes,
-  ENC_ALL_TYPES);
+   supported_enctypes = ENC_ALL_TYPES;
+   }
+
+   /* If UF_USE_DES_KEY_ONLY has been set, then don't allow use of the 
newer enc types */
+   if (userAccountControl  UF_USE_DES_KEY_ONLY) {
+   supported_enctypes = ENC_CRC32|ENC_RSA_MD5;
} else {
-   /* However, if this is a TGS-REQ, then lock it down to
-* a reasonable guess as to what the server can decode
-* - we must use whatever is in
-* msDS-SupportedEncryptionTypes, or the 'old' set
-* of keys (ie, what Windows 2000 supported) */
-   supported_enctypes = ldb_msg_find_attr_as_uint(msg, 
msDS-SupportedEncryptionTypes,
-  ENC_CRC32 | 
ENC_RSA_MD5 | ENC_RC4_HMAC_MD5);
+   /* Otherwise, add in the default enc types */
+   supported_enctypes |= ENC_CRC32 | ENC_RSA_MD5 | 
ENC_RC4_HMAC_MD5;
}
 
/* Is this the krbtgt or a RODC krbtgt */
@@ -255,26 +254,6 @@ static krb5_error_code 
samba_kdc_message2entry_keys(krb5_context context,
}
 
 
-   /* If UF_USE_DES_KEY_ONLY has been set, then don't allow use of the 
newer enc types */
-   if (userAccountControl  UF_USE_DES_KEY_ONLY) {
-   /* However, this still won't allow use of DES, if we
-* were told not to by msDS-SupportedEncTypes */
-   supported_enctypes = ENC_CRC32|ENC_RSA_MD5;
-   } else {
- 

[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  1f98541 Add CGI_DEBUG variable.
  from  0cb42c2 Add buildfarm.web tests.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit 1f985416a874ef995e451af972947ff0cb24b989
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Nov 16 22:48:10 2010 +0100

Add CGI_DEBUG variable.

---

Summary of changes:
 buildfarm/web/__init__.py |   15 +++
 web/build.cgi |6 ++
 2 files changed, 13 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/web/__init__.py b/buildfarm/web/__init__.py
index dda4b17..e0af291 100755
--- a/buildfarm/web/__init__.py
+++ b/buildfarm/web/__init__.py
@@ -467,19 +467,18 @@ class ViewBuildPage(BuildFarmPage):
 if len(old_rev_builds) == 0:
 return
 
-yield h2Older builds:/h2
+yield h2Older builds:/h2\n
 
-yield table class='real'
-yield theadtrthRevision/ththStatus/th/tr/thead
-yield tbody
+yield table class='real'\n
+yield theadtrthRevision/ththStatus/th/tr/thead\n
+yield tbody\n
 
 for build in old_rev_builds:
-yield trtd%s/tdtd%s/td/tr % (
+yield trtd%s/tdtd%s/td/tr\n % (
 revision_link(myself, build.revision, tree),
-build_link(myself, tree, host, compiler, build.revision,
-html_build_status(build.status(
+build_status_html(myself, build))
 
-yield /tbody/table
+yield /tbody/table\n
 
 def render(self, myself, tree, host, compiler, rev, plain_logs=False):
 view one build in detail
diff --git a/web/build.cgi b/web/build.cgi
index 3f6b295..da748ca 100755
--- a/web/build.cgi
+++ b/web/build.cgi
@@ -32,4 +32,10 @@ resource.setrlimit(resource.RLIMIT_DATA, (30, 30))
 buildfarm = CachingBuildFarm()
 buildApp = BuildFarmApp(buildfarm)
 handler = wsgiref.handlers.CGIHandler()
+CGI_DEBUG = False
+
+if CGI_DEBUG:
+import cgitb
+cgitb.enable()
+handler.log_exception = cgitb.handler
 handler.run(buildApp)


-- 
build.samba.org


[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  77951af Fix access to buildfarm variable.
  from  1f98541 Add CGI_DEBUG variable.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit 77951af92f278155ab01666b8f855fa5c59c66df
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Nov 16 22:50:16 2010 +0100

Fix access to buildfarm variable.

---

Summary of changes:
 buildfarm/web/__init__.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/web/__init__.py b/buildfarm/web/__init__.py
index e0af291..6bf88fe 100755
--- a/buildfarm/web/__init__.py
+++ b/buildfarm/web/__init__.py
@@ -809,7 +809,7 @@ class ViewSummaryPage(BuildFarmPage):
 for compiler in self.buildfarm.compilers:
 for tree in self.buildfarm.trees:
 try:
-build = buildfarm.get_build(tree, 
host.name.encode(utf-8), compiler)
+build = self.buildfarm.get_build(tree, host.name, 
compiler)
 status = build_status_html(myself, build)
 except data.NoSuchBuildError:
 continue


-- 
build.samba.org


[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  3ad205e switch over to sqlite database by default.
  from  77951af Fix access to buildfarm variable.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit 3ad205e5236529904fa89f2c7a37d9869607c0c9
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Nov 16 23:02:50 2010 +0100

switch over to sqlite database by default.

---

Summary of changes:
 buildfarm/web/__init__.py |2 +-
 web/build.cgi |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/web/__init__.py b/buildfarm/web/__init__.py
index 6bf88fe..f584a21 100755
--- a/buildfarm/web/__init__.py
+++ b/buildfarm/web/__init__.py
@@ -846,7 +846,7 @@ class ViewSummaryPage(BuildFarmPage):
 yield td
 yield %d/td % panic_count[tree]
 try:
-lcov_status = buildfarm.lcov_status(tree)
+lcov_status = self.buildfarm.lcov_status(tree)
 except data.NoSuchBuildError:
 yield td/td
 else:
diff --git a/web/build.cgi b/web/build.cgi
index da748ca..c8ad30b 100755
--- a/web/build.cgi
+++ b/web/build.cgi
@@ -21,7 +21,7 @@ import os
 import sys
 sys.path.insert(0, os.path.join(os.path.dirname(__file__), ..))
 
-from buildfarm.filecache import CachingBuildFarm
+from buildfarm.sqldb import StormCachingBuildFarm
 from buildfarm.web import BuildFarmApp
 import wsgiref.handlers
 import resource
@@ -29,7 +29,7 @@ import resource
 resource.setrlimit(resource.RLIMIT_RSS, (30, 30))
 resource.setrlimit(resource.RLIMIT_DATA, (30, 30))
 
-buildfarm = CachingBuildFarm()
+buildfarm = StormCachingBuildFarm()
 buildApp = BuildFarmApp(buildfarm)
 handler = wsgiref.handlers.CGIHandler()
 CGI_DEBUG = False


-- 
build.samba.org


[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  aa21359 Enable debugging as early as possible.
  from  3ad205e switch over to sqlite database by default.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit aa21359eafa883b2b6fe79a4d69b79308a8d8a66
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Nov 16 23:11:45 2010 +0100

Enable debugging as early as possible.

---

Summary of changes:
 web/build.cgi |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/web/build.cgi b/web/build.cgi
index c8ad30b..8b919ff 100755
--- a/web/build.cgi
+++ b/web/build.cgi
@@ -21,16 +21,12 @@ import os
 import sys
 sys.path.insert(0, os.path.join(os.path.dirname(__file__), ..))
 
-from buildfarm.sqldb import StormCachingBuildFarm
-from buildfarm.web import BuildFarmApp
 import wsgiref.handlers
 import resource
 
 resource.setrlimit(resource.RLIMIT_RSS, (30, 30))
 resource.setrlimit(resource.RLIMIT_DATA, (30, 30))
 
-buildfarm = StormCachingBuildFarm()
-buildApp = BuildFarmApp(buildfarm)
 handler = wsgiref.handlers.CGIHandler()
 CGI_DEBUG = False
 
@@ -38,4 +34,9 @@ if CGI_DEBUG:
 import cgitb
 cgitb.enable()
 handler.log_exception = cgitb.handler
+
+from buildfarm.sqldb import StormCachingBuildFarm
+from buildfarm.web import BuildFarmApp
+buildfarm = StormCachingBuildFarm()
+buildApp = BuildFarmApp(buildfarm)
 handler.run(buildApp)


-- 
build.samba.org


[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  2dac42b Set umask.
  from  aa21359 Enable debugging as early as possible.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit 2dac42ba046dc9c00982e07851fd547a4d0a61b1
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Nov 16 23:17:18 2010 +0100

Set umask.

---

Summary of changes:
 buildfarm/sqldb.py |   10 +++---
 1 files changed, 7 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/sqldb.py b/buildfarm/sqldb.py
index e0ef491..95529ed 100644
--- a/buildfarm/sqldb.py
+++ b/buildfarm/sqldb.py
@@ -221,9 +221,13 @@ class StormCachingBuildFarm(BuildFarm):
 if self.store is not None:
 return self.store
 db_path = os.path.join(self.path, db, hostdb.sqlite)
-db = create_database(sqlite:%s?timeout=%f % (db_path, self.timeout))
-self.store = Store(db)
-setup_schema(self.store)
+umask = os.umask(0664)
+try:
+db = create_database(sqlite:%s?timeout=%f % (db_path, 
self.timeout))
+self.store = Store(db)
+setup_schema(self.store)
+finally:
+os.umask(umask)
 return self.store
 
 def _open_hostdb(self):


-- 
build.samba.org


[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  46fe0ca Fix use of buildfarm global variable.
   via  3843593 Split up pages a bit.
  from  2dac42b Set umask.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit 46fe0ca2a4c582563f96aa1212b440fda2dd61c4
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Nov 17 00:27:10 2010 +0100

Fix use of buildfarm global variable.

commit 3843593b074e8c70f8c76cf723ebf14f7b34628a
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Nov 17 00:15:45 2010 +0100

Split up pages a bit.

---

Summary of changes:
 buildfarm/__init__.py |   11 +++
 buildfarm/data.py |6 ++
 buildfarm/sqldb.py|   15 +++-
 buildfarm/web/__init__.py |  219 ++---
 4 files changed, 137 insertions(+), 114 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/__init__.py b/buildfarm/__init__.py
index 8d593c4..41df8d1 100644
--- a/buildfarm/__init__.py
+++ b/buildfarm/__init__.py
@@ -140,3 +140,14 @@ class BuildFarm(object):
 for build in self.upload_builds.get_new_builds():
 if build.tree in self.trees and build.compiler in self.compilers 
and build.host in hostnames:
 yield build
+
+def get_host_builds(self, host):
+from buildfarm import data
+for compiler in self.compilers:
+for tree in sorted(self.trees.keys()):
+try:
+yield self.get_build(tree, host, compiler)
+except data.NoSuchBuildError:
+pass
+
+
diff --git a/buildfarm/data.py b/buildfarm/data.py
index 36c3424..750deac 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -61,6 +61,12 @@ class BuildStatus(object):
 else:
 self.other_failures = set()
 
+@property
+def failed(self):
+if self.other_failures:
+return True
+return not all([x == 0 for x in self._status_tuple()])
+
 def __serialize__(self):
 return repr(self)
 
diff --git a/buildfarm/sqldb.py b/buildfarm/sqldb.py
index 95529ed..f7eb9e7 100644
--- a/buildfarm/sqldb.py
+++ b/buildfarm/sqldb.py
@@ -108,7 +108,9 @@ class StormHostDatabase(HostDatabase):
 else:
 self.store = store
 
-def createhost(self, name, platform=None, owner=None, owner_email=None, 
password=None, permission=None):
+def createhost(self, name, platform=None, owner=None, owner_email=None,
+password=None, permission=None):
+See `HostDatabase.createhost`.
 newhost = StormHost(unicode(name), owner=owner, 
owner_email=owner_email, password=password, permission=permission, 
platform=platform)
 try:
 self.store.add(newhost)
@@ -183,7 +185,9 @@ class StormCachingBuildResultStore(BuildResultStore):
 return build.revision
 
 def _get_by_checksum(self, build):
-return self.store.find(StormBuild, StormBuild.checksum == 
build.log_checksum()).one()
+result = self.store.find(StormBuild,
+StormBuild.checksum == build.log_checksum())
+return result.one()
 
 def upload_build(self, build):
 existing_build = self._get_by_checksum(build)
@@ -196,7 +200,8 @@ class StormCachingBuildResultStore(BuildResultStore):
 rev, timestamp = build.revision_details()
 super(StormCachingBuildResultStore, self).upload_build(build)
 new_basename = self.build_fname(build.tree, build.host, 
build.compiler, rev)
-new_build = StormBuild(new_basename, unicode(build.tree), 
unicode(build.host), unicode(build.compiler), rev)
+new_build = StormBuild(new_basename, unicode(build.tree), 
unicode(build.host),
+unicode(build.compiler), rev)
 new_build.checksum = build.log_checksum()
 new_build.age = build.age_mtime()
 new_build.status_str = unicode(build.status().__serialize__())
@@ -237,6 +242,10 @@ class StormCachingBuildFarm(BuildFarm):
 return StormCachingBuildResultStore(os.path.join(self.path, data, 
oldrevs),
 self._get_store())
 
+def get_host_builds(self, host):
+return self._get_store().find(StormBuild,
+StormBuild.host == host).group_by(StormBuild.compiler, 
StormBuild.tree)
+
 def commit(self):
 self.store.commit()
 
diff --git a/buildfarm/web/__init__.py b/buildfarm/web/__init__.py
index f584a21..ceb019a 100755
--- a/buildfarm/web/__init__.py
+++ b/buildfarm/web/__init__.py
@@ -490,7 +490,7 @@ class ViewBuildPage(BuildFarmPage):
 uname = 
 cflags = 
 config = 
-build = buildfarm.get_build(tree, host, compiler, rev)
+build = self.buildfarm.get_build(tree, host, compiler, rev)
 age_mtime = build.age_mtime()
 try:
 (revision, revision_time) = 

[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  8f059d0 Fix host finding with older versions of storm.
  from  46fe0ca Fix use of buildfarm global variable.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit 8f059d0818f0d339a7e2025266d5dfa7b14efe26
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Nov 17 00:43:49 2010 +0100

Fix host finding with older versions of storm.

---

Summary of changes:
 buildfarm/sqldb.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/sqldb.py b/buildfarm/sqldb.py
index f7eb9e7..cac733e 100644
--- a/buildfarm/sqldb.py
+++ b/buildfarm/sqldb.py
@@ -129,7 +129,7 @@ class StormHostDatabase(HostDatabase):
 return self.store.find(StormHost).order_by(StormHost.name)
 
 def host(self, name):
-ret = self.hosts().find(StormHost.name==name).one()
+ret = self.store.find(StormHost, StormHost.name==name).one()
 if ret is None:
 raise NoSuchHost(name)
 return ret


-- 
build.samba.org


[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  707823c Avoid unnecessary host lookup.
  from  8f059d0 Fix host finding with older versions of storm.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit 707823cebcffadb8ad87df3643be70ab574c7b25
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Nov 17 00:57:39 2010 +0100

Avoid unnecessary host lookup.

---

Summary of changes:
 buildfarm/web/__init__.py |4 
 1 files changed, 0 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/web/__init__.py b/buildfarm/web/__init__.py
index ceb019a..2db0d05 100755
--- a/buildfarm/web/__init__.py
+++ b/buildfarm/web/__init__.py
@@ -482,10 +482,6 @@ class ViewBuildPage(BuildFarmPage):
 
 def render(self, myself, tree, host, compiler, rev, plain_logs=False):
 view one build in detail
-# ensure the params are valid before using them
-self.buildfarm.hostdb.host(host)
-assert compiler in self.buildfarm.compilers, unknown compiler %s % 
compiler
-assert tree in self.buildfarm.trees, not a build tree %s % tree
 
 uname = 
 cflags = 


-- 
build.samba.org


[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  a54c867 Store more as plain strings.
  from  707823c Avoid unnecessary host lookup.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit a54c867c7c2b85a4872c40427c240f5ba75905d6
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Nov 17 01:11:37 2010 +0100

Store more as plain strings.

---

Summary of changes:
 admin.py   |   10 +-
 buildfarm/sqldb.py |   36 ++--
 buildfarm/tests/test_hostdb.py |   28 ++--
 buildfarm/web/__init__.py  |   14 +++---
 4 files changed, 44 insertions(+), 44 deletions(-)


Changeset truncated at 500 lines:

diff --git a/admin.py b/admin.py
index 79c6ce7..cc8edf9 100755
--- a/admin.py
+++ b/admin.py
@@ -70,7 +70,7 @@ else:
 if op == remove:
 hostname = raw_input(Please enter hostname to delete: )
 try:
-db.deletehost(hostname.decode(utf-8))
+db.deletehost(hostname)
 except hostdb.NoSuchHost, e:
 print No such host '%s' % e.name
 sys.exit(1)
@@ -81,7 +81,7 @@ if op == remove:
 elif op == modify:
 hostname = raw_input(Please enter hostname to modify: )
 try:
-host = db.host(hostname.decode(utf-8))
+host = db.host(hostname)
 except hostdb.NoSuchHost, e:
 print No such host '%s' % e.name
 sys.exit(1)
@@ -108,7 +108,7 @@ elif op == modify:
 elif op == add:
 hostname = raw_input(Machine hostname: )
 try:
-db.host(hostname.decode(utf-8))
+db.host(hostname)
 except hostdb.NoSuchHost, e:
 pass
 else:
@@ -129,7 +129,7 @@ elif op == add:
 line = raw_input()
 
 try:
-db.createhost(hostname.decode(utf-8), platform.decode(utf-8),
+db.createhost(hostname, platform.decode(utf-8),
 owner.decode(utf-8), owner_email.decode(utf-8),
 password.decode(utf-8),
 .join(permission).decode(utf-8, replace))
@@ -192,7 +192,7 @@ Thanks, your friendly Samba build farm administrator 
bu...@samba.org % owne
 elif op == info:
 hostname = raw_input(Hostname: )
 try:
-host = db.host(hostname.decode(utf-8))
+host = db.host(hostname)
 except hostdb.NoSuchHost, e:
 print No such host '%s' % e.name
 sys.exit(1)
diff --git a/buildfarm/sqldb.py b/buildfarm/sqldb.py
index cac733e..25347cb 100644
--- a/buildfarm/sqldb.py
+++ b/buildfarm/sqldb.py
@@ -47,13 +47,13 @@ class StormBuild(Build):
 __storm_table__ = build
 
 id = Int(primary=True)
-tree = Unicode()
+tree = RawStr()
 revision = RawStr()
-host = Unicode()
-compiler = Unicode()
+host = RawStr()
+compiler = RawStr()
 checksum = RawStr()
 age = Int()
-status_str = Unicode(name=status)
+status_str = RawStr(name=status)
 commit_revision = RawStr()
 
 def status(self):
@@ -73,7 +73,7 @@ class StormBuild(Build):
 class StormHost(Host):
 __storm_table__ = host
 
-name = Unicode(primary=True)
+name = RawStr(primary=True)
 owner_name = Unicode(name=owner)
 owner_email = Unicode()
 password = Unicode()
@@ -111,7 +111,7 @@ class StormHostDatabase(HostDatabase):
 def createhost(self, name, platform=None, owner=None, owner_email=None,
 password=None, permission=None):
 See `HostDatabase.createhost`.
-newhost = StormHost(unicode(name), owner=owner, 
owner_email=owner_email, password=password, permission=permission, 
platform=platform)
+newhost = StormHost(name, owner=owner, owner_email=owner_email, 
password=password, permission=permission, platform=platform)
 try:
 self.store.add(newhost)
 self.store.flush()
@@ -153,18 +153,18 @@ class StormCachingBuildResultStore(BuildResultStore):
 
 def get_previous_revision(self, tree, host, compiler, revision):
 result = self.store.find(StormBuild,
-StormBuild.tree == unicode(tree),
-StormBuild.host == unicode(host),
-StormBuild.compiler == unicode(compiler),
+StormBuild.tree == tree,
+StormBuild.host == host,
+StormBuild.compiler == compiler,
 StormBuild.commit_revision == revision)
 cur_build = result.any()
 if cur_build is None:
 raise NoSuchBuildError(tree, host, compiler, revision)
 
 result = self.store.find(StormBuild,
-StormBuild.tree == unicode(tree),
-StormBuild.host == unicode(host),
-StormBuild.compiler == unicode(compiler),
+StormBuild.tree == tree,
+StormBuild.host == host,
+StormBuild.compiler == compiler,
 StormBuild.commit_revision != revision,
 StormBuild.id  cur_build.id)
 result = 

[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  149f80f Don't unicode encode name.
  from  a54c867 Store more as plain strings.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit 149f80fa8e2961b131daf8d18207b6a30d6eb4d2
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Nov 17 01:12:59 2010 +0100

Don't unicode encode name.

---

Summary of changes:
 buildfarm/hostdb.py |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/hostdb.py b/buildfarm/hostdb.py
index ed4e753..24186c2 100644
--- a/buildfarm/hostdb.py
+++ b/buildfarm/hostdb.py
@@ -125,7 +125,7 @@ class HostDatabase(object):
 Write out the web/
 
 for host in self.hosts():
-yield %s: %s\n % (host.name.encode(utf-8), 
host.platform.encode(utf-8))
+yield %s: %s\n % (host.name, host.platform.encode(utf-8))
 
 def commit(self):
 pass
@@ -143,7 +143,7 @@ class PlainTextHostDatabase(HostDatabase):
 try:
 for l in f:
 (host, platform) = l.split(:, 1)
-ret[host.decode(utf-8)] = platform.strip().decode(utf-8)
+ret[host] = platform.strip().decode(utf-8)
 finally:
 f.close()
 return cls(ret)


-- 
build.samba.org


[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  c28ce63 Re-enable unicode encoding (required for storm).
  from  149f80f Don't unicode encode name.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit c28ce631c5288e9ba3c8cbe8a7d8aca1c30a6988
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Nov 17 01:18:32 2010 +0100

Re-enable unicode encoding (required for storm).

---

Summary of changes:
 buildfarm/hostdb.py |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/hostdb.py b/buildfarm/hostdb.py
index 24186c2..ed4e753 100644
--- a/buildfarm/hostdb.py
+++ b/buildfarm/hostdb.py
@@ -125,7 +125,7 @@ class HostDatabase(object):
 Write out the web/
 
 for host in self.hosts():
-yield %s: %s\n % (host.name, host.platform.encode(utf-8))
+yield %s: %s\n % (host.name.encode(utf-8), 
host.platform.encode(utf-8))
 
 def commit(self):
 pass
@@ -143,7 +143,7 @@ class PlainTextHostDatabase(HostDatabase):
 try:
 for l in f:
 (host, platform) = l.split(:, 1)
-ret[host] = platform.strip().decode(utf-8)
+ret[host.decode(utf-8)] = platform.strip().decode(utf-8)
 finally:
 f.close()
 return cls(ret)


-- 
build.samba.org


[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  6d5e8cb Remove more unicode decoding.
  from  c28ce63 Re-enable unicode encoding (required for storm).

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit 6d5e8cbb2863c6f984206c3bd1a9e517b326f9e7
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Nov 17 01:19:48 2010 +0100

Remove more unicode decoding.

---

Summary of changes:
 admin.py   |   10 +-
 buildfarm/sqldb.py |   36 ++--
 buildfarm/tests/test_hostdb.py |   28 ++--
 buildfarm/web/__init__.py  |   14 +++---
 4 files changed, 44 insertions(+), 44 deletions(-)


Changeset truncated at 500 lines:

diff --git a/admin.py b/admin.py
index cc8edf9..79c6ce7 100755
--- a/admin.py
+++ b/admin.py
@@ -70,7 +70,7 @@ else:
 if op == remove:
 hostname = raw_input(Please enter hostname to delete: )
 try:
-db.deletehost(hostname)
+db.deletehost(hostname.decode(utf-8))
 except hostdb.NoSuchHost, e:
 print No such host '%s' % e.name
 sys.exit(1)
@@ -81,7 +81,7 @@ if op == remove:
 elif op == modify:
 hostname = raw_input(Please enter hostname to modify: )
 try:
-host = db.host(hostname)
+host = db.host(hostname.decode(utf-8))
 except hostdb.NoSuchHost, e:
 print No such host '%s' % e.name
 sys.exit(1)
@@ -108,7 +108,7 @@ elif op == modify:
 elif op == add:
 hostname = raw_input(Machine hostname: )
 try:
-db.host(hostname)
+db.host(hostname.decode(utf-8))
 except hostdb.NoSuchHost, e:
 pass
 else:
@@ -129,7 +129,7 @@ elif op == add:
 line = raw_input()
 
 try:
-db.createhost(hostname, platform.decode(utf-8),
+db.createhost(hostname.decode(utf-8), platform.decode(utf-8),
 owner.decode(utf-8), owner_email.decode(utf-8),
 password.decode(utf-8),
 .join(permission).decode(utf-8, replace))
@@ -192,7 +192,7 @@ Thanks, your friendly Samba build farm administrator 
bu...@samba.org % owne
 elif op == info:
 hostname = raw_input(Hostname: )
 try:
-host = db.host(hostname)
+host = db.host(hostname.decode(utf-8))
 except hostdb.NoSuchHost, e:
 print No such host '%s' % e.name
 sys.exit(1)
diff --git a/buildfarm/sqldb.py b/buildfarm/sqldb.py
index 25347cb..cac733e 100644
--- a/buildfarm/sqldb.py
+++ b/buildfarm/sqldb.py
@@ -47,13 +47,13 @@ class StormBuild(Build):
 __storm_table__ = build
 
 id = Int(primary=True)
-tree = RawStr()
+tree = Unicode()
 revision = RawStr()
-host = RawStr()
-compiler = RawStr()
+host = Unicode()
+compiler = Unicode()
 checksum = RawStr()
 age = Int()
-status_str = RawStr(name=status)
+status_str = Unicode(name=status)
 commit_revision = RawStr()
 
 def status(self):
@@ -73,7 +73,7 @@ class StormBuild(Build):
 class StormHost(Host):
 __storm_table__ = host
 
-name = RawStr(primary=True)
+name = Unicode(primary=True)
 owner_name = Unicode(name=owner)
 owner_email = Unicode()
 password = Unicode()
@@ -111,7 +111,7 @@ class StormHostDatabase(HostDatabase):
 def createhost(self, name, platform=None, owner=None, owner_email=None,
 password=None, permission=None):
 See `HostDatabase.createhost`.
-newhost = StormHost(name, owner=owner, owner_email=owner_email, 
password=password, permission=permission, platform=platform)
+newhost = StormHost(unicode(name), owner=owner, 
owner_email=owner_email, password=password, permission=permission, 
platform=platform)
 try:
 self.store.add(newhost)
 self.store.flush()
@@ -153,18 +153,18 @@ class StormCachingBuildResultStore(BuildResultStore):
 
 def get_previous_revision(self, tree, host, compiler, revision):
 result = self.store.find(StormBuild,
-StormBuild.tree == tree,
-StormBuild.host == host,
-StormBuild.compiler == compiler,
+StormBuild.tree == unicode(tree),
+StormBuild.host == unicode(host),
+StormBuild.compiler == unicode(compiler),
 StormBuild.commit_revision == revision)
 cur_build = result.any()
 if cur_build is None:
 raise NoSuchBuildError(tree, host, compiler, revision)
 
 result = self.store.find(StormBuild,
-StormBuild.tree == tree,
-StormBuild.host == host,
-StormBuild.compiler == compiler,
+StormBuild.tree == unicode(tree),
+StormBuild.host == unicode(host),
+StormBuild.compiler == unicode(compiler),
 StormBuild.commit_revision != revision,
 StormBuild.id  cur_build.id)
 

[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  3250896 Unicode encoding hostname if necessary.
  from  6d5e8cb Remove more unicode decoding.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit 3250896b368cd839b1fa65fffdd0c1f168016cf3
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Nov 17 01:20:45 2010 +0100

Unicode encoding hostname if necessary.

---

Summary of changes:
 buildfarm/sqldb.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/sqldb.py b/buildfarm/sqldb.py
index cac733e..b452e42 100644
--- a/buildfarm/sqldb.py
+++ b/buildfarm/sqldb.py
@@ -129,7 +129,7 @@ class StormHostDatabase(HostDatabase):
 return self.store.find(StormHost).order_by(StormHost.name)
 
 def host(self, name):
-ret = self.store.find(StormHost, StormHost.name==name).one()
+ret = self.store.find(StormHost, StormHost.name==unicode(name)).one()
 if ret is None:
 raise NoSuchHost(name)
 return ret


-- 
build.samba.org


[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  f53728a Unicode encoding hostname if necessary.
  from  3250896 Unicode encoding hostname if necessary.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit f53728a8f2d615246751e272f3697203602baadc
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Nov 17 01:21:48 2010 +0100

Unicode encoding hostname if necessary.

---

Summary of changes:
 buildfarm/sqldb.py |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/sqldb.py b/buildfarm/sqldb.py
index b452e42..fdee2dd 100644
--- a/buildfarm/sqldb.py
+++ b/buildfarm/sqldb.py
@@ -210,9 +210,9 @@ class StormCachingBuildResultStore(BuildResultStore):
 
 def get_old_revs(self, tree, host, compiler):
 return self.store.find(StormBuild,
-StormBuild.tree == tree,
-StormBuild.host == host,
-StormBuild.compiler == compiler).order_by(Desc(StormBuild.age))
+StormBuild.tree == unicode(tree),
+StormBuild.host == unicode(host),
+StormBuild.compiler == 
unicode(compiler)).order_by(Desc(StormBuild.age))
 
 
 class StormCachingBuildFarm(BuildFarm):


-- 
build.samba.org


[SCM] build.samba.org - branch master updated

2010-11-16 Thread Jelmer Vernooij
The branch, master has been updated
   via  2f13a56 Merge tests.
   via  c6dfd79 add tests for get_old_revs.
   via  d1e63ac Add hostdb.host() test. Improve unicode handling in web ui.
  from  f53728a Unicode encoding hostname if necessary.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -
commit 2f13a563d49e4fd48c264850beadea43d4874be9
Merge: f53728a8f2d615246751e272f3697203602baadc 
c6dfd79f0f75c261e25ebf3692e25ff6c72f515c
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Nov 17 01:28:40 2010 +0100

Merge tests.

commit c6dfd79f0f75c261e25ebf3692e25ff6c72f515c
Author: Jelmer Vernooij jel...@samba.org
Date:   Mon Nov 15 02:29:36 2010 +0100

add tests for get_old_revs.

commit d1e63ac9f7a11aead688103a9e6fb4f98d4de482
Author: Jelmer Vernooij jel...@samba.org
Date:   Mon Nov 15 02:11:04 2010 +0100

Add hostdb.host() test.
Improve unicode handling in web ui.

---

Summary of changes:
 buildfarm/data.py  |3 +++
 buildfarm/tests/test_data.py   |   24 
 buildfarm/tests/test_hostdb.py |5 +
 3 files changed, 32 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index 750deac..5c7fe7f 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -209,6 +209,9 @@ class Build(object):
 self.compiler = compiler
 self.commit_revision = self.revision = rev
 
+def __eq__(self, other):
+return (self.log_checksum() == other.log_checksum())
+
 def __repr__(self):
 if self.revision is not None:
 return %s: revision %s of %s on %s using %s % 
(self.__class__.__name__, self.revision, self.tree, self.host, self.compiler)
diff --git a/buildfarm/tests/test_data.py b/buildfarm/tests/test_data.py
index e79224b..c8d50f4 100755
--- a/buildfarm/tests/test_data.py
+++ b/buildfarm/tests/test_data.py
@@ -140,6 +140,30 @@ BUILD COMMIT REVISION: myrev
 def test_get_latest_revision_none(self):
 self.assertRaises(data.NoSuchBuildError, self.x.get_latest_revision, 
tdb, charis, cc)
 
+def test_get_old_revs_none(self):
+self.assertEquals([],
+list(self.x.get_old_revs(utdb, ucharis, ugcc)))
+
+def test_get_old_revs(self):
+path = self.create_mock_logfile(tdb, charis, cc,
+contents=
+BUILD COMMIT REVISION: 12
+)
+build = data.Build(path[:-4], tdb, charis, cc)
+b1 = self.x.upload_build(build)
+path = self.create_mock_logfile(tdb, charis, cc,
+contents=
+BUILD COMMIT REVISION: 15
+)
+build = data.Build(path[:-4], tdb, charis, cc)
+b2 = self.x.upload_build(build)
+path = self.create_mock_logfile(tdb, charis, cc,
+contents=
+BUILD COMMIT REVISION: 15
+)
+self.assertEquals([b1, b2],
+list(self.x.get_old_revs(utdb, ucharis, ucc)))
+
 
 class BuildResultStoreTests(BuildFarmTestCase,BuildResultStoreTestBase):
 
diff --git a/buildfarm/tests/test_hostdb.py b/buildfarm/tests/test_hostdb.py
index f50c568..ca406f4 100644
--- a/buildfarm/tests/test_hostdb.py
+++ b/buildfarm/tests/test_hostdb.py
@@ -41,6 +41,11 @@ class HostDatabaseTests(object):
 self.assertEquals(1, len(hosts))
 self.assertEquals(charis, hosts[0].name)
 
+def test_host(self):
+newhost = self.db.createhost(ucharis, ulinux, uJelmer, 
ujel...@samba.org, ubla, uPemrission?)
+samehost = self.db.host(ucharis)
+self.assertEquals(samehost, newhost)
+
 def test_create_already_exists(self):
 host = self.db.createhost(name=ufoo, owner=uJelmer, 
owner_email=ujel...@samba.org)
 self.assertRaises(hostdb.HostAlreadyExists,  self.db.createhost, 
name=ufoo,


-- 
build.samba.org


[SCM] CTDB repository - branch 1.2 updated - ctdb-1.9.1-239-g62179c8

2010-11-16 Thread Ronnie Sahlberg
The branch, 1.2 has been updated
   via  62179c80701cd4f773afaba54cde577de234f72d (commit)
   via  2d772b7354699fabd06fa0b5b89ddbd6bdd5826d (commit)
   via  b717cf7e4f40457df0063e08122eeafd9c339168 (commit)
   via  e7a89ac55fc0f6ff91ee9e7ee1c4d42f6baa2b77 (commit)
   via  fc93ba5eb93746a91099c9fd28ff5dfe043415a9 (commit)
   via  c39d7d12a22ce1f8a63618ebc05a7a07ed586675 (commit)
   via  c14359b56f9dde3d7e30e3af5b7fc71a3acefd97 (commit)
   via  9092deb2976f175a12243587d92416c860b42929 (commit)
  from  6b21c95236a07a656af0e110eb3f9d833aea71dd (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2


- Log -
commit 62179c80701cd4f773afaba54cde577de234f72d
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Aug 31 17:40:40 2010 +1000

Eventscripts: make loadconfig() function hookable by the test suite.

Rename loadconfig() to _loadconfig().  Add a new loadconfig() that
simply calls _loadconfig().

This makes it easy for the test suite to override loadconfig().

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 2d772b7354699fabd06fa0b5b89ddbd6bdd5826d
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Nov 16 19:42:31 2010 +1100

Make a time comparison in 60.nfs eventscript more readable.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit b717cf7e4f40457df0063e08122eeafd9c339168
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Nov 16 19:31:18 2010 +1100

60.nfs only fails or warns after 10 consecutive nfsd/statd failures.

These failures are sometimes the result of slow restarts so we want to
avoid dirtying the logs or marking a node unhealthy because of them,
unless they are excessive.

For these 2 cases we use the existing fail counting code but hack a
temporary service_name in a subshell to allow separate fail counts.

We also update ctdb_check_rpc() so that it captures the error output
from rpcinfo and we add a message including the service name to the
beginning.  The error is printed to stdout but is also stored in
ctdb_check_rpc_out to allow it to be conditionally used by the caller.
This function also now returns non-zero rather than exiting on
failure.

Other direct rpcinfo calls are relaced by called to ctdb_check_rpc()
for consistency.

Option handling code for service restarts is cleaned up so that fits
in 80 columns.  A more informative restart messageis now used in all
cases, printing the exact command being used to start a service.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit e7a89ac55fc0f6ff91ee9e7ee1c4d42f6baa2b77
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Oct 12 11:10:38 2010 +1100

Test suite: fix typo in ctdb ping test grep pattern.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit fc93ba5eb93746a91099c9fd28ff5dfe043415a9
Author: Martin Schwenke mar...@meltin.net
Date:   Wed Oct 6 16:32:22 2010 +1100

Test suite: match changed output for ctdb ping to disconnected node.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit c39d7d12a22ce1f8a63618ebc05a7a07ed586675
Author: Martin Schwenke mar...@meltin.net
Date:   Fri Oct 15 15:09:08 2010 +1100

Test suite: make statistics test cope with changes to statistics output.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit c14359b56f9dde3d7e30e3af5b7fc71a3acefd97
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Nov 15 16:47:22 2010 +1100

New version 1.2.10

* Mon Nov 15 2010 : Version 1.2.10
 - Make sure to initialize the statistics start time to current time
   instead of leaving it to point to start of epoch.
   CQ : S1020838
 - Create a new tunable DisableIPFailover that is used to tell ctdb
   to not check any ip allocation at all and never do any failover
   This can be used to stop/restart individual nodes without causing
   any ip failovers to happen.

commit 9092deb2976f175a12243587d92416c860b42929
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Nov 15 16:30:44 2010 +1100

initialize the statistics to the current time, not start of epoch
this makes ctdb statistics show correct start of starts collection

---

Summary of changes:
 config/events.d/60.nfs |   77 ++--
 config/functions   |   18 ++--
 packaging/RPM/ctdb.spec.in |   10 -
 server/ctdb_statistics.c   |1 +
 tests/simple/09_ctdb_ping.sh   |2 +-
 tests/simple/14_ctdb_statistics.sh |2 +-
 6 files changed, 72 insertions(+), 38 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs
index 57c81d3..038adbb 100755
--- a/config/events.d/60.nfs
+++ 

[SCM] CTDB repository - branch 1.2-nodeflags updated - ctdb-1.9.1-232-gea77f1b

2010-11-16 Thread Ronnie Sahlberg
The branch, 1.2-nodeflags has been updated
   via  ea77f1b2a161f194b8b152da3cd94c67cbdd7ed9 (commit)
   via  6d118faada8ffbde7f35e1a0b4d2df21ac67dec2 (commit)
   via  7b91e4fa1d00bcba860dfe502e83161a6d06de6b (commit)
   via  9f0e1e5e0b100c3ccfaa2e459b3249386ec27b44 (commit)
   via  d887c991d48f010b4512ada24b059161614bb168 (commit)
   via  10e005cd0eb5b350a22377629ecea87e876f6bfb (commit)
   via  138e2c912ae718ce024d7e342bc7808416aeec25 (commit)
  from  256b4f44d9de1b394d4f260f26fd11e2ff6adf8f (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2-nodeflags


- Log -
commit ea77f1b2a161f194b8b152da3cd94c67cbdd7ed9
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Aug 31 17:40:40 2010 +1000

Eventscripts: make loadconfig() function hookable by the test suite.

Rename loadconfig() to _loadconfig().  Add a new loadconfig() that
simply calls _loadconfig().

This makes it easy for the test suite to override loadconfig().

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 6d118faada8ffbde7f35e1a0b4d2df21ac67dec2
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Nov 16 19:42:31 2010 +1100

Make a time comparison in 60.nfs eventscript more readable.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 7b91e4fa1d00bcba860dfe502e83161a6d06de6b
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Nov 16 19:31:18 2010 +1100

60.nfs only fails or warns after 10 consecutive nfsd/statd failures.

These failures are sometimes the result of slow restarts so we want to
avoid dirtying the logs or marking a node unhealthy because of them,
unless they are excessive.

For these 2 cases we use the existing fail counting code but hack a
temporary service_name in a subshell to allow separate fail counts.

We also update ctdb_check_rpc() so that it captures the error output
from rpcinfo and we add a message including the service name to the
beginning.  The error is printed to stdout but is also stored in
ctdb_check_rpc_out to allow it to be conditionally used by the caller.
This function also now returns non-zero rather than exiting on
failure.

Other direct rpcinfo calls are relaced by called to ctdb_check_rpc()
for consistency.

Option handling code for service restarts is cleaned up so that fits
in 80 columns.  A more informative restart messageis now used in all
cases, printing the exact command being used to start a service.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 9f0e1e5e0b100c3ccfaa2e459b3249386ec27b44
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Oct 12 11:10:38 2010 +1100

Test suite: fix typo in ctdb ping test grep pattern.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit d887c991d48f010b4512ada24b059161614bb168
Author: Martin Schwenke mar...@meltin.net
Date:   Wed Oct 6 16:32:22 2010 +1100

Test suite: match changed output for ctdb ping to disconnected node.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 10e005cd0eb5b350a22377629ecea87e876f6bfb
Author: Martin Schwenke mar...@meltin.net
Date:   Fri Oct 15 15:09:08 2010 +1100

Test suite: make statistics test cope with changes to statistics output.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 138e2c912ae718ce024d7e342bc7808416aeec25
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Nov 15 16:30:44 2010 +1100

initialize the statistics to the current time, not start of epoch
this makes ctdb statistics show correct start of starts collection

---

Summary of changes:
 config/events.d/60.nfs |   77 ++--
 config/functions   |   18 ++--
 server/ctdb_statistics.c   |1 +
 tests/simple/09_ctdb_ping.sh   |2 +-
 tests/simple/14_ctdb_statistics.sh |2 +-
 5 files changed, 63 insertions(+), 37 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs
index 57c81d3..038adbb 100755
--- a/config/events.d/60.nfs
+++ b/config/events.d/60.nfs
@@ -51,24 +51,43 @@ case $1 in
 
# check that statd responds to rpc requests
# if statd is not running we try to restart it
-   rpcinfo -u localhost 100024 1  /dev/null || {
-   RPCSTATDOPTS=
-   [ -n $STATD_HOSTNAME ]  RPCSTATDOPTS=$RPCSTATDOPTS -n 
$STATD_HOSTNAME
-   [ -n $STATD_PORT ]  RPCSTATDOPTS=$RPCSTATDOPTS -p 
$STATD_PORT
-   [ -n $STATD_OUTGOING_PORT ]  RPCSTATDOPTS=$RPCSTATDOPTS -o 
$STATD_OUTGOING_PORT
-   rpc.statd $RPCSTATDOPTS 
-   echo ERROR: STATD is not responding. Trying to restart it. 
[rpc.statd $RPCSTATDOPTS]
-   }
+   if ctdb_check_rpc STATD 

[SCM] CTDB repository - branch master updated - ctdb-1.10-25-g1d77a3a

2010-11-16 Thread Ronnie Sahlberg
The branch, master has been updated
   via  1d77a3adfff893b3c01b87f791e72c0d3148425c (commit)
   via  26077e6c8eb126584af587e7416154ea4858aea2 (commit)
   via  79c25fe241cf5d8f92e23d3736823ebaf4e1769d (commit)
   via  ad18bfa398e582474afe25340368e39d4e74e3c6 (commit)
   via  a9f5ae2a548e1096c086888adc886cb604d372fa (commit)
   via  9e88466a99b5245d5f0ebab553be8d2b9b9a58e2 (commit)
   via  7303058616fdb1d7f58cce2349c034e9f611275e (commit)
  from  cf778b5aaf6356401e3985a7df9e08ab6930 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master


- Log -
commit 1d77a3adfff893b3c01b87f791e72c0d3148425c
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Aug 31 17:40:40 2010 +1000

Eventscripts: make loadconfig() function hookable by the test suite.

Rename loadconfig() to _loadconfig().  Add a new loadconfig() that
simply calls _loadconfig().

This makes it easy for the test suite to override loadconfig().

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 26077e6c8eb126584af587e7416154ea4858aea2
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Nov 16 19:42:31 2010 +1100

Make a time comparison in 60.nfs eventscript more readable.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 79c25fe241cf5d8f92e23d3736823ebaf4e1769d
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Nov 16 19:31:18 2010 +1100

60.nfs only fails or warns after 10 consecutive nfsd/statd failures.

These failures are sometimes the result of slow restarts so we want to
avoid dirtying the logs or marking a node unhealthy because of them,
unless they are excessive.

For these 2 cases we use the existing fail counting code but hack a
temporary service_name in a subshell to allow separate fail counts.

We also update ctdb_check_rpc() so that it captures the error output
from rpcinfo and we add a message including the service name to the
beginning.  The error is printed to stdout but is also stored in
ctdb_check_rpc_out to allow it to be conditionally used by the caller.
This function also now returns non-zero rather than exiting on
failure.

Other direct rpcinfo calls are relaced by called to ctdb_check_rpc()
for consistency.

Option handling code for service restarts is cleaned up so that fits
in 80 columns.  A more informative restart messageis now used in all
cases, printing the exact command being used to start a service.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit ad18bfa398e582474afe25340368e39d4e74e3c6
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Oct 12 11:10:38 2010 +1100

Test suite: fix typo in ctdb ping test grep pattern.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit a9f5ae2a548e1096c086888adc886cb604d372fa
Author: Martin Schwenke mar...@meltin.net
Date:   Wed Oct 6 16:32:22 2010 +1100

Test suite: match changed output for ctdb ping to disconnected node.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 9e88466a99b5245d5f0ebab553be8d2b9b9a58e2
Author: Martin Schwenke mar...@meltin.net
Date:   Fri Oct 15 15:09:08 2010 +1100

Test suite: make statistics test cope with changes to statistics output.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 7303058616fdb1d7f58cce2349c034e9f611275e
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Nov 15 16:30:44 2010 +1100

initialize the statistics to the current time, not start of epoch
this makes ctdb statistics show correct start of starts collection

---

Summary of changes:
 config/events.d/60.nfs |   77 ++--
 config/functions   |   18 ++--
 server/ctdb_statistics.c   |1 +
 tests/simple/09_ctdb_ping.sh   |2 +-
 tests/simple/14_ctdb_statistics.sh |2 +-
 5 files changed, 63 insertions(+), 37 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs
index 57c81d3..038adbb 100755
--- a/config/events.d/60.nfs
+++ b/config/events.d/60.nfs
@@ -51,24 +51,43 @@ case $1 in
 
# check that statd responds to rpc requests
# if statd is not running we try to restart it
-   rpcinfo -u localhost 100024 1  /dev/null || {
-   RPCSTATDOPTS=
-   [ -n $STATD_HOSTNAME ]  RPCSTATDOPTS=$RPCSTATDOPTS -n 
$STATD_HOSTNAME
-   [ -n $STATD_PORT ]  RPCSTATDOPTS=$RPCSTATDOPTS -p 
$STATD_PORT
-   [ -n $STATD_OUTGOING_PORT ]  RPCSTATDOPTS=$RPCSTATDOPTS -o 
$STATD_OUTGOING_PORT
-   rpc.statd $RPCSTATDOPTS 
-   echo ERROR: STATD is not responding. Trying to restart it. 
[rpc.statd $RPCSTATDOPTS]
-   }
+   if ctdb_check_rpc STATD 100024 1 /dev/null 

[SCM] Samba Shared Repository - branch master updated

2010-11-16 Thread Andrew Tridgell
The branch, master has been updated
   via  27df2e5 s4-test: added testing of w2k3 DC join to test-howto.py
   via  5524822 s4-join: fixed join to w2k3
   via  a82bc07 s4-join: show a reasonable error on DsAddEntry() failing
   via  3f9c97d s4-join: enable NDR printing at debug levels = 5
   via  73fae2b s4-loadparm: set debuglevel and logfile in tables
   via  f401930 s4-loadparm: fixed a memory leak in handle_realm()
  from  deed2a9 s4-kdc Rework supported encryption type logic to match 
Microsoft

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 27df2e544a64385a66e65217c6ce2474dd598829
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Nov 17 11:29:50 2010 +1100

s4-test: added testing of w2k3 DC join to test-howto.py

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Nov 17 01:16:19 UTC 2010 on sn-devel-104

commit 5524822a7280ca3356f4116d8fd4466b96d14e7f
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Nov 17 11:10:45 2010 +1100

s4-join: fixed join to w2k3

w2k3 does need msDS-Behavior-Version

commit a82bc073e2e7dd5eef13c64ad219fa1179df8aa7
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Nov 17 11:09:59 2010 +1100

s4-join: show a reasonable error on DsAddEntry() failing

DsAddEntry() gives errors in a reply container

commit 3f9c97dbc55826867d1978e09d69d365cff94643
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Nov 17 11:08:59 2010 +1100

s4-join: enable NDR printing at debug levels = 5

this is handy for debugging joins

commit 73fae2b007cdb0a6bfe5740a0d119bbde52dd1ce
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Nov 17 11:07:12 2010 +1100

s4-loadparm: set debuglevel and logfile in tables

this allows the debug level and logfile to be queried from python
using lp.get(). Otheriwse they are set only in the globals, and not in
the tables.

commit f401930546dc719a9abd5a4b28315388a247dfc6
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Nov 17 11:06:33 2010 +1100

s4-loadparm: fixed a memory leak in handle_realm()

we need to free the lowercase and uppercase varients

---

Summary of changes:
 source4/param/loadparm.c|8 ++
 source4/scripting/devel/howto/test-howto.py |  114 ++-
 source4/scripting/devel/howto/tridge.conf   |   10 +++
 source4/scripting/python/samba/join.py  |   20 -
 4 files changed, 129 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 09d4f39..f60e4eb 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -1458,6 +1458,9 @@ static bool handle_realm(struct loadparm_context *lp_ctx,
 {
string_set(lp_ctx, ptr, pszParmValue);
 
+   talloc_free(lp_ctx-globals-szRealm_upper);
+   talloc_free(lp_ctx-globals-szRealm_lower);
+
lp_ctx-globals-szRealm_upper = strupper_talloc(lp_ctx, pszParmValue);
lp_ctx-globals-szRealm_lower = strlower_talloc(lp_ctx, pszParmValue);
 
@@ -1524,6 +1527,10 @@ static bool handle_debuglevel(struct loadparm_context 
*lp_ctx,
 {
DEBUGLEVEL = atoi(pszParmValue);
 
+   /* also set in the loadparm table, so querying debug level
+  works */
+   *(int *)ptr = DEBUGLEVEL;
+
return true;
 }
 
@@ -1534,6 +1541,7 @@ static bool handle_logfile(struct loadparm_context 
*lp_ctx,
free(discard_const_p(char, logfile));
}
logfile = strdup(pszParmValue);
+   string_set(lp_ctx, ptr, pszParmValue);
return true;
 }
 
diff --git a/source4/scripting/devel/howto/test-howto.py 
b/source4/scripting/devel/howto/test-howto.py
index 48e30ab..91903b3 100755
--- a/source4/scripting/devel/howto/test-howto.py
+++ b/source4/scripting/devel/howto/test-howto.py
@@ -107,6 +107,7 @@ def pexpect_spawn(cmd, timeout=60):
 '''wrapper around pexpect spawn'''
 
 cmd = substitute(cmd)
+print($  + cmd)
 ret = pexpect.spawn(cmd, logfile=sys.stdout, timeout=timeout)
 
 def sendline_sub(line):
@@ -296,11 +297,13 @@ def test_win7():
 child.expect(C:)
 child.sendline(net use t: ${HOSTNAME}.${LCREALM}\\test)
 child.expect(The command completed successfully)
+vm_poweroff(${WINDOWS7_VM})
+
 
 def join_w2k8():
 print(Joining a w2k8 box to the domain as a DC)
-vm_poweroff(${WINDOWS_DC1}, checkfail=False)
-vm_restore(${WINDOWS_DC1}, ${WINDOWS_DC1_SNAPSHOT})
+vm_poweroff(${WINDOWS_DC1_VM}, checkfail=False)
+vm_restore(${WINDOWS_DC1_VM}, ${WINDOWS_DC1_SNAPSHOT})
 ping_wait(${WINDOWS_DC1})
 port_wait(${WINDOWS_DC1}, 23)
 child = pexpect_spawn(telnet ${WINDOWS_DC1} -l administrator)
@@ -380,7 +383,7 @@ def test_w2k8():
 retry_cmd(bin/smbclient -L ${HOSTNAME} 

[SCM] CTDB repository - branch 1.2 updated - ctdb-1.9.1-240-gd0b790d

2010-11-16 Thread Ronnie Sahlberg
The branch, 1.2 has been updated
   via  d0b790de08b9c9226ac9848b434a051d99a41dd8 (commit)
  from  62179c80701cd4f773afaba54cde577de234f72d (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2


- Log -
commit d0b790de08b9c9226ac9848b434a051d99a41dd8
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Nov 17 13:50:56 2010 +1100

add a new support function ctdb_check_counter_equal()

update nfs to try to restart the service after 10 consecutive failures
and to flag the node unhealthy after 15

add similar function to mountd

---

Summary of changes:
 config/events.d/60.nfs |   34 ++
 config/functions   |   13 +
 2 files changed, 43 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs
index 038adbb..8889cad 100755
--- a/config/events.d/60.nfs
+++ b/config/events.d/60.nfs
@@ -78,15 +78,20 @@ case $1 in
(
service_name=nfs_knfsd
ctdb_counter_incr
-   ctdb_check_counter_limit 10 quiet /dev/null
+
+   ctdb_check_counter_equal 10 || {
+   echo Trying to restart NFS service
+   startstop_nfs restart /dev/null 21 
+   exit 0
+   }
+
+   ctdb_check_counter_limit 15 quiet /dev/null
) || {
echo $ctdb_check_rpc_out
echo Trying to restart NFS service
startstop_nfs restart
exit 1
}
-   # we haven't hit the failure limit so restart quietly
-   startstop_nfs restart /dev/null 21 
fi
}
 
@@ -107,7 +112,25 @@ case $1 in
 
# mount needs special handling since it is sometimes not started
# correctly on RHEL5
-   ctdb_check_rpc MOUNTD 15 1 || {
+   if ctdb_check_rpc MOUNTD 15 1 /dev/null ; then
+   (service_name=nfs_mountd; ctdb_counter_init)
+   else
+   (
+   service_name=nfs_mountd
+   ctdb_counter_incr
+
+   ctdb_check_counter_equal 5 || {
+   p=rpc.mountd
+   cmd=${p}${MOUNTD_PORT:+ -p }${MOUNTD_PORT}
+   echo Trying to restart MOUNTD [${cmd}]
+   killall -q -9 $p
+   $cmd 
+   exit 0
+   }
+
+   ctdb_check_counter_limit 10 quiet /dev/null
+   ) || {
+   echo $ctdb_check_rpc_out
p=rpc.mountd
cmd=${p}${MOUNTD_PORT:+ -p }${MOUNTD_PORT}
echo Trying to restart MOUNTD [${cmd}]
@@ -115,6 +138,9 @@ case $1 in
$cmd 
exit 1
}
+   fi
+
+
# rquotad needs special handling since it is sometimes not started
# correctly on RHEL5
# this is not a critical service so we dont flag the node as unhealthy
diff --git a/config/functions b/config/functions
index 610085b..4acfc4f 100755
--- a/config/functions
+++ b/config/functions
@@ -571,6 +571,19 @@ ctdb_check_counter_limit () {
echo WARNING: less than $_limit consecutive failures ($_size) for 
$service_name, not unhealthy yet
 fi
 }
+ctdb_check_counter_equal () {
+_ctdb_counter_common
+
+_limit=$1
+
+# unary counting!
+_size=$(stat -c %s $_counter_file 2/dev/null || echo 0)
+if [ $_size -eq $_limit ] ; then
+   return 1
+fi
+return 0
+}
+
 
 
 ctdb_spool_dir=/var/spool/ctdb


-- 
CTDB repository


[SCM] CTDB repository - branch 1.2-nodeflags updated - ctdb-1.9.1-233-g028e2a4

2010-11-16 Thread Ronnie Sahlberg
The branch, 1.2-nodeflags has been updated
   via  028e2a43edec784b0bb871d39975bc0abc6fd7b2 (commit)
  from  ea77f1b2a161f194b8b152da3cd94c67cbdd7ed9 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2-nodeflags


- Log -
commit 028e2a43edec784b0bb871d39975bc0abc6fd7b2
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Nov 17 13:50:56 2010 +1100

add a new support function ctdb_check_counter_equal()

update nfs to try to restart the service after 10 consecutive failures
and to flag the node unhealthy after 15

add similar function to mountd

---

Summary of changes:
 config/events.d/60.nfs |   34 ++
 config/functions   |   13 +
 2 files changed, 43 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs
index 038adbb..8889cad 100755
--- a/config/events.d/60.nfs
+++ b/config/events.d/60.nfs
@@ -78,15 +78,20 @@ case $1 in
(
service_name=nfs_knfsd
ctdb_counter_incr
-   ctdb_check_counter_limit 10 quiet /dev/null
+
+   ctdb_check_counter_equal 10 || {
+   echo Trying to restart NFS service
+   startstop_nfs restart /dev/null 21 
+   exit 0
+   }
+
+   ctdb_check_counter_limit 15 quiet /dev/null
) || {
echo $ctdb_check_rpc_out
echo Trying to restart NFS service
startstop_nfs restart
exit 1
}
-   # we haven't hit the failure limit so restart quietly
-   startstop_nfs restart /dev/null 21 
fi
}
 
@@ -107,7 +112,25 @@ case $1 in
 
# mount needs special handling since it is sometimes not started
# correctly on RHEL5
-   ctdb_check_rpc MOUNTD 15 1 || {
+   if ctdb_check_rpc MOUNTD 15 1 /dev/null ; then
+   (service_name=nfs_mountd; ctdb_counter_init)
+   else
+   (
+   service_name=nfs_mountd
+   ctdb_counter_incr
+
+   ctdb_check_counter_equal 5 || {
+   p=rpc.mountd
+   cmd=${p}${MOUNTD_PORT:+ -p }${MOUNTD_PORT}
+   echo Trying to restart MOUNTD [${cmd}]
+   killall -q -9 $p
+   $cmd 
+   exit 0
+   }
+
+   ctdb_check_counter_limit 10 quiet /dev/null
+   ) || {
+   echo $ctdb_check_rpc_out
p=rpc.mountd
cmd=${p}${MOUNTD_PORT:+ -p }${MOUNTD_PORT}
echo Trying to restart MOUNTD [${cmd}]
@@ -115,6 +138,9 @@ case $1 in
$cmd 
exit 1
}
+   fi
+
+
# rquotad needs special handling since it is sometimes not started
# correctly on RHEL5
# this is not a critical service so we dont flag the node as unhealthy
diff --git a/config/functions b/config/functions
index 610085b..4acfc4f 100755
--- a/config/functions
+++ b/config/functions
@@ -571,6 +571,19 @@ ctdb_check_counter_limit () {
echo WARNING: less than $_limit consecutive failures ($_size) for 
$service_name, not unhealthy yet
 fi
 }
+ctdb_check_counter_equal () {
+_ctdb_counter_common
+
+_limit=$1
+
+# unary counting!
+_size=$(stat -c %s $_counter_file 2/dev/null || echo 0)
+if [ $_size -eq $_limit ] ; then
+   return 1
+fi
+return 0
+}
+
 
 
 ctdb_spool_dir=/var/spool/ctdb


-- 
CTDB repository


[SCM] CTDB repository - branch master updated - ctdb-1.10-26-g1569a54

2010-11-16 Thread Ronnie Sahlberg
The branch, master has been updated
   via  1569a54bb82fc433895ed68f816cf48399ad9d40 (commit)
  from  1d77a3adfff893b3c01b87f791e72c0d3148425c (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master


- Log -
commit 1569a54bb82fc433895ed68f816cf48399ad9d40
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Nov 17 13:50:56 2010 +1100

add a new support function ctdb_check_counter_equal()

update nfs to try to restart the service after 10 consecutive failures
and to flag the node unhealthy after 15

add similar function to mountd

---

Summary of changes:
 config/events.d/60.nfs |   34 ++
 config/functions   |   13 +
 2 files changed, 43 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs
index 038adbb..8889cad 100755
--- a/config/events.d/60.nfs
+++ b/config/events.d/60.nfs
@@ -78,15 +78,20 @@ case $1 in
(
service_name=nfs_knfsd
ctdb_counter_incr
-   ctdb_check_counter_limit 10 quiet /dev/null
+
+   ctdb_check_counter_equal 10 || {
+   echo Trying to restart NFS service
+   startstop_nfs restart /dev/null 21 
+   exit 0
+   }
+
+   ctdb_check_counter_limit 15 quiet /dev/null
) || {
echo $ctdb_check_rpc_out
echo Trying to restart NFS service
startstop_nfs restart
exit 1
}
-   # we haven't hit the failure limit so restart quietly
-   startstop_nfs restart /dev/null 21 
fi
}
 
@@ -107,7 +112,25 @@ case $1 in
 
# mount needs special handling since it is sometimes not started
# correctly on RHEL5
-   ctdb_check_rpc MOUNTD 15 1 || {
+   if ctdb_check_rpc MOUNTD 15 1 /dev/null ; then
+   (service_name=nfs_mountd; ctdb_counter_init)
+   else
+   (
+   service_name=nfs_mountd
+   ctdb_counter_incr
+
+   ctdb_check_counter_equal 5 || {
+   p=rpc.mountd
+   cmd=${p}${MOUNTD_PORT:+ -p }${MOUNTD_PORT}
+   echo Trying to restart MOUNTD [${cmd}]
+   killall -q -9 $p
+   $cmd 
+   exit 0
+   }
+
+   ctdb_check_counter_limit 10 quiet /dev/null
+   ) || {
+   echo $ctdb_check_rpc_out
p=rpc.mountd
cmd=${p}${MOUNTD_PORT:+ -p }${MOUNTD_PORT}
echo Trying to restart MOUNTD [${cmd}]
@@ -115,6 +138,9 @@ case $1 in
$cmd 
exit 1
}
+   fi
+
+
# rquotad needs special handling since it is sometimes not started
# correctly on RHEL5
# this is not a critical service so we dont flag the node as unhealthy
diff --git a/config/functions b/config/functions
index 610085b..4acfc4f 100755
--- a/config/functions
+++ b/config/functions
@@ -571,6 +571,19 @@ ctdb_check_counter_limit () {
echo WARNING: less than $_limit consecutive failures ($_size) for 
$service_name, not unhealthy yet
 fi
 }
+ctdb_check_counter_equal () {
+_ctdb_counter_common
+
+_limit=$1
+
+# unary counting!
+_size=$(stat -c %s $_counter_file 2/dev/null || echo 0)
+if [ $_size -eq $_limit ] ; then
+   return 1
+fi
+return 0
+}
+
 
 
 ctdb_spool_dir=/var/spool/ctdb


-- 
CTDB repository


[SCM] Samba Shared Repository - branch master updated

2010-11-16 Thread Kai Blin
The branch, master has been updated
   via  3f43b7e tevent: Fix docstring, tevent_req_is_in_progress does not 
destroy private data
  from  27df2e5 s4-test: added testing of w2k3 DC join to test-howto.py

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 3f43b7e54205298766d38f250afe0c9285ed427d
Author: Kai Blin k...@samba.org
Date:   Wed Nov 17 07:07:08 2010 +0100

tevent: Fix docstring, tevent_req_is_in_progress does not destroy private 
data

Autobuild-User: Kai Blin k...@samba.org
Autobuild-Date: Wed Nov 17 07:23:51 UTC 2010 on sn-devel-104

---

Summary of changes:
 lib/tevent/tevent.h |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index 40fbbe6..82c1483 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -924,8 +924,6 @@ struct tevent_req *tevent_req_post(struct tevent_req *req,
  *
  * It is typically used by sync wrapper functions.
  *
- * This function destroys the attached private data.
- *
  * @param[in]  req  The request to poll.
  *
  * @return  The boolean form of is in progress.


-- 
Samba Shared Repository