[Zope-dev] Re: [Zope] range:min bug in ZCatalogs fo Zope 2.3.2

2002-03-25 Thread Johan Carlsson [Torped]

At 05:45 2002-03-22 -0500, Andreas Jung wrote:
BTrees were rewritten in 2.4.0 so I assume you will run into
problems. Please check the release notes for the latest 2.3.X
version if there were some fixes for your problem since 2.3.2.

-aj

Problem solved by replacing BTree with Z 2.5.0 version.

Thanks,
Johan Carlsson




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Re: [Zope] range:min bug in ZCatalogs fo Zope 2.3.2

2002-03-25 Thread Andreas Jung

Cool... I would not have expected this to work :-)

-aj
- Original Message - 
From: Johan Carlsson [Torped] [EMAIL PROTECTED]
To: Andreas Jung [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, March 25, 2002 05:33
Subject: [Zope-dev] Re: [Zope] range:min bug in ZCatalogs fo Zope 2.3.2


 At 05:45 2002-03-22 -0500, Andreas Jung wrote:
 BTrees were rewritten in 2.4.0 so I assume you will run into
 problems. Please check the release notes for the latest 2.3.X
 version if there were some fixes for your problem since 2.3.2.
 
 -aj
 
 Problem solved by replacing BTree with Z 2.5.0 version.
 
 Thanks,
 Johan Carlsson
 
 
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Re: [Zope] range:min bug in ZCatalogs fo Zope 2.3.2

2002-03-25 Thread Steve Alexander

Andreas Jung wrote:
 Cool... I would not have expected this to work :-)

IIRC, the range fix was one of the last maintenance tasks on the old 
Components/BTree package before it was deprecated in favour of the new 
Zope/BTrees implementation.

--
Steve Alexander





___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] OpenSSH configuration between ZEO clients storage server

2002-03-25 Thread Shane Hathaway

Eric Roby wrote:
 Anyone had any experience trying to secure the transactions between ZEO
 clients and a storage server???  Our shop is already using OpenSSH, I
 have read some introductory information about OpenSSH.  It is just not
 clear to me the level of effort required to implement this or if
 implemented, will the additional overhead further exasperate the
 potential for unresolved conflict errors???
 
 Any thoughts...

Let's say you have a host called zeoclient and zeostorage.  On 
zeostorage, start a ZEO server listening to some port, say 9673, making 
sure that it listens only on the *local* interface, usually 127.0.0.1. 
An example:

python lib/python/ZEO/start.py -p 9673 -h 127.0.0.1 \
   -S 1=/stores/fs:Storage

Then on zeoclient you set up a tunnel:

ssh -f -N -L 9673:zeostorage:9673 zeostorage

Then your Zope install on zeoclient should use port 9673 on 127.0.0.1 to 
connect to the storage.  In fact, the only piece of code that should 
know about the hostname zeostorage is the command to set up the SSH 
tunnel.

There are some disadvantages: anybody who has an account on either 
zeoclient or zeostorage has full read/write access to the database.  To 
avoid that, you'd need to use Unix domain sockets and come up with a way 
to forward one securely.  Also, ssh is not 100% stable as a tunnel; I've 
seen ssh stop just because a forwarded connection disconnected 
unexpectedly.  You might need to watch the ssh process and restart it if 
it dies.

For zope.org there is a private subnet.  The boxes each have two network 
cards AFAIK.  All ZEO communication takes place on the private subnet.

A VPN would also work, but you'd still have the local access issue.

Shane


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] FW: [Zope] Attaching multiple file to mime

2002-03-25 Thread Trevor Toenjes

I just tested dtml-boundary in the loop below and it fails.
Is this feature or bug?
Should dtml-boundary be altered to be a block-tag?

-Trevor

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Trevor Toenjes
Sent: Monday, March 25, 2002 1:01 PM
To: Maik Jablonski; Chris A. Bruce
Cc: [EMAIL PROTECTED]
Subject: RE: [Zope] Attaching multiple file to mime


I dont see why nMIME is necessary?
I consider this a bug, unless someone can point out otherwise.
It should work the way below or Zope should be modified to work this way or
add an /dtml-boundary

dtml-in objectValues('File')
dtml-boundary type_expr=content_type disposition=attachment
encode=base64
filename_expr=_['sequence-item'].getId()
dtml-var sequence-item
/dtml-in
/dtml-mime
/dtml-sendmail

-Trevor


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Maik
 Jablonski
 Sent: Monday, March 25, 2002 5:52 AM
 To: Chris A. Bruce
 Cc: [EMAIL PROTECTED]
 Subject: [Zope] Attaching multiple file to mime


 hi to all,

 some weeks ago Chris Bruce and me asked:

  has anybody got any working example of how to send all of the files
  in a folder as attachments using sendmail and mime?

 This will not work with the original MIMETools. So I created a
 new Product:
 N(ew)MIMETools!

 http://www.zope.org/Members/mjablonski/NMIMETools

 With the NMIME-Product installed you can send all files of a folder for
 example like this:

 dtml-sendmail smtphost=127.0.0.1
 To: [EMAIL PROTECTED]
 From: [EMAIL PROTECTED]
 Subject: NMIME-Example with multiple attachments
 dtml-nmime type=text/plain encode=7bit

 Just a demonstration how to send multiple attachments with
 the NMIMETOOLS.

 dtml-in objectValues('File')dtml-nboundary type_expr=content_type
 disposition=attachment encode=base64
 filename_expr=_['sequence-item'].getId()dtml-var
 sequence-item/dtml-nboundary/dtml-in/dtml-nmime
 /dtml-sendmail

 Please note: the NMIMETools have the same arguments as the
 original MIMETools.
 The only difference: dtml-nboundary-tag is now a real-block-tag (with an
 open  close-statement) which allows iterating!

 Maybe someone will find this helpful for his work. Bug reports
 and comments
 are welcome...

 greetings, maik.

 --
  maik jablonski   visit www.zope.org,
  universitaet bielefeld   LET'S GET ZOPED
  zentrum fuer lehrerbildung
  didaktik des sachunterrichts
  postfach 10 01 31
  33501 bielefeld
  germany
  tel: + 49 (0) 521 106 4234

  http://www.zfl.uni-bielefeld.de/
  http://www.sachunterricht-online.de/




 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Re: more on the segfault saga

2002-03-25 Thread Leonardo Rochael Almeida


Hello segfaulters and others interested in Zope instability issues!

Our demi-god Matt Kromer from ZopeCorp has come up with a possible way
to corner the instability issue AND give you a stable, cycle-garbage
collecting Zope.

Since the problem seems, so far, to be caused by the Python Restricted
Compiler (which is used in everything from dtml expressions to python
scripts to other stuff) not completing fully collectable objects before
the Python cycle garbage collector finds them, the solution is to lock
out the gc while creating these objects. The only easy way to do this
currently is to disable the automatic gc and run manual garbage
collections only when we're pretty sure no one else is running, and at
the same time not letting anyone else run when we're running the gc.

While I can't speak for Matt but since this is a fairly urgent matter, I
believe he agrees that those experiencing segfaults are encouraged to
replace Zope/ZServer/PubCore/ZServerPublisher.py with the attached
file, which should work on 2.4.x and 2.5.x series Zopes, and report your
instability results.

This is the same file that can be found at:
http://zope.org/Members/matt/ZServerPublisher.py
with the difference that my version has some lines removed that are only
interesting for those that applied Matt's cprof patches mentioned
earlier on this list (which, I bet, means only me :-).

The file is small enough so that you can manually look and see that I've
installed no trojans in it :-) but those of a paranoid nature are
encouraged to download Matt's version and remove the two lines that
mention 'cprof'.

We're close guys, very close.

Cheers, Leo

PS: standard disclaimers: I don't speak for anyone else but me and I
won't be held responsible for anything you do to your site based on the
aforementioned intructions. If you break your site with them, you get to
keep both pieces :-)

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.



##
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
# 
##
from ZPublisher import publish_module

import ThreadLock

gc_lock = ThreadLock.allocate_lock()
active_threads = [0,]

class ZServerPublisher:
def __init__(self, accept):
   import os
   import sys
   import gc

   gc.disable()

   while 1:
   try:
   name, request, response=accept()

   gc_lock.acquire()
   active_threads[0] = active_threads[0] + 1
   gc_lock.release()

   publish_module(
   name,
   request=request,
   response=response)
   finally:
   response._finish()
   request=response=None
   gc_lock.acquire()
   a = active_threads[0] - 1

   if a == 0:
   #sys.stderr.write(Invoking gc.collect()\n)
   gc.collect()
   else:
   #sys.stderr.write(Skipping gc.collect(), %d threads active\n% a)
   pass

   active_threads[0] = a
   gc_lock.release()



[Zope-dev] Call Profiler strangeness - lots of ZODB transactions

2002-03-25 Thread Richard Jones

I'm investigating why our product ZODB is growing when it shouldn't. I've 
found that the undo log has entries in it every five minutes saying 
Installed product CallProfiler by Zope. More infrequently (not regularly) 
we also have Installed product ZOracleDA by Zope.

The Call Profiler was designed specifically not to hit the ZODB - it's 
in-memory only with. Our setup consists of seven ZEO clients talking to the 
one ZEO server - the one that's getting all these hits in the ZODB.

Does anyone else see this happening?

Anyone have any ideas why we're seeing this behaviour?


Richard

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )