On Wed, Jul 07, 2010 at 03:17:48PM +0300, Apollon Oikonomopoulos wrote:
> On 10:20 Wed 07 Jul     , Iustin Pop wrote:
> > On Tue, Jul 06, 2010 at 03:03:27PM +0300, Apollon Oikonomopoulos wrote:
> > > +  """
> > > +  def __init__(self, unique_id, children, size):
> > > +    """Attaches to a static block device.
> > > +
> > > +    The unique_id is a path under /dev.
> > > +
> > > +    """
> > > +    super(PersistentBlockDevice, self).__init__(unique_id, children, 
> > > size)
> > > +    if not isinstance(unique_id, (tuple, list)):
> > > +      raise ValueError("Invalid configuration data %s" % str(unique_id))
> > > +    self.dev_path = unique_id[1]
> > 
> > Hmm, why unique_id[1]? What does unique_id[0] contain?
> 
> The reasoning is that unique_id is a tuple of the form (storage_driver, 
> persistent_path). I'm not sure this is the best option, perhaps the 
> storage driver could be set instance-wide, although a per-disk storage 
> driver would permit more flexibility. I'll post a follow-up message about
> storage driver design, as soon as I get something basic running.

Hmm, I'm a bit worried here. The design we have approached is that,
while one could in theory mix and match LD_* in an instance, we do
require that all disks of an instance to be of the same type (via the
disk template).

If the behaviour of the different storage drivers is different enough,
it would kind of workaround this, and instances could get (at least in
theory) in a state where one disk permits a given operation, and the
other one not.

Given this, I'd rather have all disks of an instance share the same
driver (even if it's configured per disk, some checks in the instance
creation should restrict it to be the same).

Just some thought for your design :)

iustin

Reply via email to