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

add hypervisor volume example for runtime #133

Closed
wants to merge 1 commit into from

Conversation

gao-feng
Copy link
Contributor

@gao-feng gao-feng commented Sep 1, 2015

For hypervisor runtime, mount hypervisor volume for
container is useful.

Signed-off-by: Gao feng omarapazanadi@gmail.com

@@ -3,7 +3,7 @@
Additional filesystems can be declared as "mounts", specified in the *mounts* array. The parameters are similar to the ones in Linux mount system call. [http://linux.die.net/man/2/mount](http://linux.die.net/man/2/mount)

* **type** (string, required) Linux, *filesystemtype* argument supported by the kernel are listed in */proc/filesystems* (e.g., "minix", "ext2", "ext3", "jfs", "xfs", "reiserfs", "msdos", "proc", "nfs", "iso9660"). Windows: ntfs
* **source** (string, required) a device name, but can also be a directory name or a dummy. Windows, the volume name that is the target of the mount point. \\?\Volume\{GUID}\ (on Windows source is called target)
* **source** (string, required) a device name, but can also be a directory name or a dummy. Windows, the volume name that is the target of the mount point. \\?\Volume\{GUID}\ (on Windows source is called target). Hypervisor Runtime, source can be the volume type (e.g., "qcow2", "raw", "vdi", "rbd") and the path of volume.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to know the type of the volume? If so, then it would make sense to have something like a source type and a destination type. Or some altogether separate option.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. in order to emulate volume file to the block device of guest os, hypervisor need to know the type of volume, the destination type must be a block disk device, container in guest os can mount it directly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use a a separate source_type field for this then rather than having to interpret the source string?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There aren't any magic headers that can be relied on to figure out the block device type?!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@philips the source is not only the device path, but also the RADOS Block Devices (RBD) or something eles. had better to specify the volume type, this makes things simple.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrunalp I don't know if other people want this field, since it't useless for container...

@gao-feng
Copy link
Contributor Author

gao-feng commented Sep 3, 2015

@wking patch updated. thanks.

@wking
Copy link
Contributor

wking commented Sep 3, 2015

On Wed, Sep 02, 2015 at 11:36:36PM -0700, Gao feng wrote:

@wking patch updated. thanks.

Looks good to me, thanks :).

@philips
Copy link
Contributor

philips commented Sep 4, 2015

@gao-feng Is there existing prior art for this stuff? For example kvm or something? I am not ecstatic about making up a serialization format like qcow2:/volumes/data.qcow2

@gao-feng
Copy link
Contributor Author

gao-feng commented Sep 4, 2015

@philips qemu uses samilar format qemu -m 1024 -drive format=rbd,file=rbd:{pool-name}/{image-name},cache=writeback http://docs.ceph.com/docs/cuttlefish/rbd/qemu-rbd/#running-qemu-with-rbd,
If you think adding an extra source type field or even source option field(for configure rbd user, keyring, hosts so on) and renaming the type filed to filesystem are good idea, I agree with you.

@mrunalp
Copy link
Contributor

mrunalp commented Sep 4, 2015

@gao-feng

[mrunal@dhcp-16-188 Images]$ file docker.qcow2 
docker.qcow2: QEMU QCOW Image (v3), 12884901888 bytes

Does this not work for other types of hypervisor volumes?

@gao-feng
Copy link
Contributor Author

gao-feng commented Sep 4, 2015

@mrunalp the source is not only the device path, but also the RADOS Block Devices (RBD) or something eles. had better to specify the volume type, this makes things simple.

For hypervisor runtime, mount hypervisor volume for
container is useful.

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
@gao-feng
Copy link
Contributor Author

@philips @wking @mrunalp rebased, please check.

@wking
Copy link
Contributor

wking commented Sep 10, 2015

On Wed, Sep 09, 2015 at 11:20:51PM -0700, Gao feng wrote:

@philips @wking @mrunalp rebased, please check.

What changed with 25c9f33e90fa6f? It looks like your rebase picked
up #136 and #165, but didn't address whether or not we should be
overloading the ‘source’ field 1.

@gao-feng
Copy link
Contributor Author

@wking Only rebase, you can regard this as ping. :)

@wking
Copy link
Contributor

wking commented Sep 10, 2015

On Thu, Sep 10, 2015 at 07:28:05AM -0700, Gao feng wrote:

@wking Only rebase…

Ok. e90fa6f still looks good to me (I'm agnostic on overloading
‘source’ vs. adding a ‘sourceType’ field).

"mounts": {
"data": {
"type": "ext3",
"source": "qcow2:/volumes/data.qcow2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm really not sure this is needed. It seems too much like a runtime specific item.

@vbatts
Copy link
Member

vbatts commented Oct 5, 2015

I really like that virtual devices can suffice here, but this is so specific for VM and not kernel containers that it feels a bit like a one-off. I think something like this could be an annoations and use of life-cycle hooks.

I'm going to close this for the time being, until all minimal options are determined to not solve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants