[sheepdog] [PATCH v2] dog: allow vdi snapshot without snapshot tag

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Fri Sep 19 06:59:09 CEST 2014


At Fri, 19 Sep 2014 12:59:56 +0900,
Hitoshi Mitake wrote:
> 
> At Fri, 19 Sep 2014 11:17:27 +0800,
> Ruoyu wrote:
> > 
> > 
> > On 2014年09月19日 10:46, Hitoshi Mitake wrote:
> > > At Fri, 19 Sep 2014 10:40:38 +0800,
> > > Ruoyu wrote:
> > >>
> > >> On 2014年09月19日 10:30, Hitoshi Mitake wrote:
> > >>> At Fri, 19 Sep 2014 10:22:07 +0800,
> > >>> Ruoyu wrote:
> > >>>> The problem is still existed.
> > >>> Really? On my environment, I couldn't reproduce the problem. Can I see
> > >>> your command sequence?
> > >> $ dog/dog cluster format
> > >> __
> > >> ()'`;
> > >> /\|`
> > >> / | Caution! The cluster is not empty.
> > >> (/_)_|_ Are you sure you want to continue? [yes/no]: yes
> > >> using backend plain store
> > >> $ dog/dog vdi create test 4M -P
> > >> 100.0 % [=====================================================] 4.0 MB /
> > >> 4.0 MB
> > >> $ dog/dog vdi snapshot test <-- it is allowed
> > >> $ dog/dog vdi snapshot test <-- should be forbidden
> > >> $ dog/dog vdi list <-- both snapshots tagged with ""
> > >> Name Id Size Used Shared Creation time VDI id Copies Tag
> > >> s test 1 4.0 MB 4.0 MB 0.0 MB 2014-09-19 10:36 7c2b25 3
> > >> s test 2 4.0 MB 0.0 MB 4.0 MB 2014-09-19 10:36 7c2b26 3
> > >> test 0 4.0 MB 0.0 MB 4.0 MB 2014-09-19 10:36 7c2b27 3
> > > Ah, sorry. The empty snapshot tag "" is a thing which should be
> > > ignored. So the above behavior is correct. Current master forbids it
> > > and Valerio reported it as a problem.
> > >
> > > v2 patch forbids command sequence like this:
> > >
> > > $ dog/dog vdi snapshot test -s asdf
> > > $ dog/dog vdi snapshot test -s asdf
> > > Failed to create snapshot for test, maybe snapshot id (0) or tag (asdf) is existed
> > >
> > > Actually, v2 can pass 030 test which consists a test case for
> > > duplicated snapshot tags.
> > It is OK if empty snapshot tag "" is allowed.
> > I am afraid whether empty snapshot tag could cause an unexpected problem.
> 
> I believe empty tags cause no problems. Because looking up snapshots
> with "" tag isn't allowed. Actually, this rule isn't changed for a
> long time.

If you agree with the above opinion, could you give me your
Reviewed-by tag? If you can't, of course I'll answer to your questions.

Thanks,
Hitoshi



More information about the sheepdog mailing list