[one-users] Does the SOURCE make no sense when creating an image in opennebula-2.2.0

junjie.ma at cs2c.com.cn junjie.ma at cs2c.com.cn
Tue Apr 26 17:41:20 PDT 2011



Hello, 

When creating an image by sunstone-server, I find that
the
SOURCE makes no sense. So I go to the source code both in Ruby
and
opennebula, the SOURCE is only valid when using the PATH or
SIZE(with
FSTYPE). 

In my opinion, the whole image creation consists of
four steps:

1. Sunstone-server sends "one.image.allocate" by using Ruby
to
opennebula. The opennebula receives the calls and checks if the
SOURCE
exists in parameters of the image template. If it does not
exists,
opennebula assign a string to the SOURCE with the SHA1 digesting
of
"uid:name", otherwise do nothing to the SOURCE. Then, inserts a
image
record into the DB. 

2. Then sunstone-server sends "one.image.info"
to
opennebula to retrieve the initialized infomation by step 1, mainly
the
value of SOURCE. 

3. Suntone-server starts to judge the branches by
PATH,
SOURCE, SIZE, FSTYPE and TYPE. When there only exists the SOURCE, it
will
do nothing. (For example, if the PATH exists and SOURCE not exists, it
will
do copy the PATH file to the SOURCE file path, and etc.) 

4. If
former
steps have no errors, sunstone-server sends "one.image.enable"
to
opennebula, it just update the record in DB and do nothing about
the
SOURCE. Otherwise, it sends "one.image.delete" to opennebula and delete
the
record in DB. 

So, if just specify the SOURCE to create an image,
the
operation make no sense. So, I think the SOURCE input should be removed
in
web pages of sunstone-server . 

If I have mistakes, please send me
the
error correction. Thanks. :-) 

  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110427/a7c5adb4/attachment-0002.htm>


More information about the Users mailing list