[Sheepdog] [PATCH] sheep: use the first vdi id for vdi attribute objects

Chris Webb chris at arachsys.com
Mon Aug 1 17:06:04 CEST 2011


MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp> writes:

> The vdi id can change if we get the snapshot, so there is a problem
> that vdi attributes vanish after taking snapshots.
> 
> This patch uses the first vdi id, whose snapid equals 1, for a vdi
> attribute object id.

Hi Kazutaka. This doesn't work as an approach unless I'm missing something,
because the snapshot with vid 1 can end up being deleted:

  # qemu-img create sheepdog:foo 1      
  Formatting 'sheepdog:foo', fmt=raw size=1 
  # collie vdi setattr foo bar wibble 
  # qemu-img snapshot -c '' sheepdog:foo
  # collie vdi list foo               
    name        id    size    used  shared    creation time   vdi id
  ------------------------------------------------------------------
  s foo          1  0.0 MB  0.0 MB  0.0 MB 2011-08-01 15:02   d9d577
    foo          2  0.0 MB  0.0 MB  0.0 MB 2011-08-01 15:02   d9d57a
  # collie vdi getattr foo bar && echo  
  wibble
  # collie vdi delete -s 1 foo
  # collie vdi list foo               
    name        id    size    used  shared    creation time   vdi id
  ------------------------------------------------------------------
    foo          2  0.0 MB  0.0 MB  0.0 MB 2011-08-01 15:02   d9d57a
  # collie vdi getattr foo bar && echo
  failed to find attr oid, Failed to find the requested tag

Also, once this has happened:

  # collie vdi setattr foo bar wibble
  failed to find attr oid, Failed to find the requested tag

Best wishes,

Chris.



More information about the sheepdog mailing list