Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

portlayer: lazy disk detach operations #5677

Open
hickeng opened this issue Jul 10, 2017 · 0 comments
Open

portlayer: lazy disk detach operations #5677

hickeng opened this issue Jul 10, 2017 · 0 comments

Comments

@hickeng
Copy link
Member

hickeng commented Jul 10, 2017

Story
As a VIC developer I want to have clean separation between functional interfaces
As a VIC developer and viadmin I want VIC to perform as few VMOMI calls as possible for a given function

Detail
We have two orthogonal disk interfaces, one for IO interaction and another for lifecycle operations:

type Archiver interface {
   // Import data into a specific storage object
   Import(...)
   // Export data from a specific storage object
   Export(...)

The lifecycle operations are basically pure CRUD:

type Store interface {
   // Create a storage object in the implementing store
   Create(...)
   // Inspect details of a specific storage object
   Read(...)
   // Modify core details of a specific storage object, e.g. max size,
   Update(...)
   // Delete a specific storage object
   Delete(...)
}

For Image stores there is a single entry point for manipulating disk contents in the shape of the WriteImage function. This was done to provide a single call that, on completion, would have created and populated a disk. Currently the WriteImage call is not implemented using the orthogonal interfaces described above.
To support an efficient implementation of the existing WriteImage call using this interface separation we need to move to a deferred detach of disks from the endpointVM - this means that a detach call doesn't necessarily take immediate effect. The detach should take effect when:

  1. a reconfigure is invoked for another operation - the easy opportunistic path - or
  2. a VM that references the disk has an event or operation performed on it - avoid locking a disk that may now be needed by a different VM - or
  3. a given delay has lapsed - avoid a disk being held indefinitely and to support dual mode management

To support (1) in conjunction with a pull operation we confirmed via #5565 that a single reconfigure operation can:

  • detach disk A
  • create and attach disk B where B is a child of A

This should:

  1. implement the Archiver and Store interfaces (names are placeholders)
  2. implement the deferred detach behaviour described
  3. refactor the Write Image call to use Create followed by Import
@hickeng hickeng changed the title portlayer: investigate composite reconfigure for lazy disk detach operations portlayer: lazy disk detach operations Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant