bug report: samba 2.2.0: MACROS

Peter Byström peter.bystrom at ub.oru.se
Wed May 9 07:22:13 GMT 2001


problems with printer queues:


%U, %m are the ones I have had trouble with, I dunno about the others.

global vars I have set, is at the bottom.

1st problem:

if I create a printer queue I can't set the path variable to:

path = /home/samba/prnspool.%m/%U

this worked in the samba 2.0.x series. I consider this to be a bug.


2nd problem:

is a bit more subtle. since I can't do the above in the 2.2.x series
I created an entry that looked like this instead:

[prnspool]
   locking = yes
   comment = Används av publika utskrifts systemet
   path = /home/samba/tmp
#   printer = prnspool
   print command = /bin/mv %s `/bin/mktemp -u
../prnspool.%m/%U/%U.XXXXXX`&
   lpq command =
   lprm command =
   public = yes
   guest ok = yes
   guest only = yes
   browsable = yes
   writable = yes
   printable = yes
   printer driver = HP LaserJet 4MP


the prnspool.%m directories are actually shares on w2k servers mounted
with smbfs, so it is slow to copy files to these shares. It does not
affect the problem if I remove the & sign, if anything I believe it gets
worse. If I use the & sign it will copy several prints at the same time,
which is what I want.

the senario:

roughly 100 clients are connected to the queue, and are printing
frequently. When I start to put some load on the printer queue, at
atleast 3 nodes at the same time, the files get queued to
/home/samba/tmp, but then they are deleted. When this has happened for
one of the 3 nodes it will continue to do so, until the client
disconnects and starts a new connection.
    in one of the cases the files are moved, but to the wrong directory,
in the other case the mktemp statement doesn't seem to result in a
string, and /bin/mv is only sent one parameter, and thus fails, and the
file is deleted by samba.
    when the files are moved to the wrong directory, i.e. user pub45s
prints are moved to pub10s printer files, the %U variable points to the
wrong user identity. For the other case I have no clue.
    The servers are w2k terminal servers, and so, a lot of users are
connected to each one of them.

    If you wish to have a debug file I could create one, but it will get
large since this is a problem only seen on high loads.


global vars:

have been the same in both tests.
First, the kernel is a 2.4.x series kernel.

I have password per share, and a w2k server is holding the domain, but
since it's slow to ask the server about rights I have choosen to # the
line with the password server.

    in both cases I got max mux set to 3000, and oplock contention limit
= 100, if I don't, the queue will stop to function, prints will be cut,
and the queue will stop responding. Atleast in the 2.0.x series I need
the oplock contention limit raised, I am not sure if it has any effect
on the 2.2.0 release or not.

in the 2.2.0 version of samba I set the kernel oplocks = yes, and
oplocks = yes,.to be noted: I had them turned off to start with, but it
doesn't seem to have any effect at all on this case.


Do you have any clue? If  I can be of any further assistance please,
mail me.


Best Regards,

Peter Byström








More information about the samba mailing list