We’ve been doing a lot lately with getting Zope2 Products updated to function in a Zope3 world. There’s been many occasions where a placeless script errors out. Ideally we’d move them all away from placeless scripts and into browser view functions, but often times they need to be debugged quickly, so that we can get the base product working in Plone 3.
Jon ran across this situation recently, and needed to throw a debugger into the placeless script. I had not seen this litte code snippet before, so perhaps many others have not as well. In the __init_.py of your Product:
from AccessControl import allow_module
Restart Zope, and debug placeless scripts to your heart’s content.
Posted by David @ 12:35 pm
Tags: debug placeless script, pdb, Plone
One of the best references for getting started using virtual machines using XEN and CentOS can be found here. It is well written, very easy to follow and can quickly get you up and running.
Recently I had the task of revisiting a virtual machine that was provisioned with a file based file system as outlined in the tutorial. The main task I needed to achieve was to expand the size of the filesystem. Given that the tutorial has you build the virtual machine using tools that have this capability I figured it would not be that hard.
What is not obvious is that although the filesystem is made in such a way as to easily support this, that the actual practice of making it happen is a little more complicated. Having spent a lot of time googling all the various technologies and not coming up with a solution, I thought I would share what I learned, and give a recipe to perform the same operation on your own virtual server. All the usual caveats apply (use at your own risk, etc.)
If you are attempting to do something similar, or you are using a different Linux distribution it still may be useful to look at the following, and translate the steps accordingly.
Here is the recipe, feel free to let me know if it works for you:
Continue reading »
Posted by Brent @ 5:41 pm
Tags: XEN filesystem grow virtual server CentOS lvm2 fdisk