• R/O
  • HTTP
  • SSH
  • HTTPS

karesansui: Commit

Git repository of Karesansui.


Commit MetaInfo

Revision0d08ffbc7d6a129e789f91a010f26bad5ab52df3 (tree)
Time2010-07-22 21:10:40
AuthorJunichi Shinohara <junichi@kare...>
CommiterJunichi Shinohara

Log Message

Merge branch 'dev' of ssh://raid.local.hde.co.jp/hde/karesansui/karesansui into dev

Change Summary

Incremental Difference

--- a/bin/create_guest.py
+++ b/bin/create_guest.py
@@ -169,9 +169,10 @@ class CreateGuest(KssCommand):
169169 if not (opts.storage_pool in active_storage_pools or opts.storage_pool in inactive_storage_pools):
170170 raise KssCommandException('Storage pool does not exist. - pool=%s' % (opts.storage_pool))
171171
172- if conn.get_storage_volume(opts.storage_pool, opts.storage_volume) is None:
173- raise KssCommandException('Specified storage volume does not exist. - pool=%s, vol=%s'
174- % (opts.pool_name, opts.name))
172+ # TODO
173+ #if conn.get_storage_volume(opts.storage_pool, opts.uuid) is None:
174+ # raise KssCommandException('Specified storage volume does not exist. - pool=%s, vol=%s'
175+ # % (opts.storage_pool, opts.uuid))
175176
176177 try:
177178 self.up_progress(10)
@@ -193,7 +194,7 @@ class CreateGuest(KssCommand):
193194 disk_format=opts.disk_format,
194195 storage_pool=opts.storage_pool,
195196 storage_volume=opts.storage_volume,
196- ):
197+ ) is True:
197198 raise KssCommandException('Failed to create guest. - dom=%s' % (opts.name))
198199
199200 except Exception, e:
--- a/installer/installer/install.py
+++ b/installer/installer/install.py
@@ -726,6 +726,14 @@ def process_start_service(opts,p_callback=None):
726726 except:
727727 pass
728728
729+ """touch files
730+ You should add path of file that is expected to be touched to following list
731+ """
732+ touch_files = ["/var/log/hde-collectd/alert.log"]
733+ touch_files = []
734+ for _file in touch_files:
735+ if not os.path.exists(_file) and os.path.exists(os.path.dirname(_file)):
736+ open(_file, 'w').close()
729737
730738 time.sleep(1)
731739 write_log(_("Leaving '%s'") % sys._getframe(0).f_code.co_name)
--- a/karesansui/lib/virt/virt.py
+++ b/karesansui/lib/virt/virt.py
@@ -857,6 +857,8 @@ class KaresansuiVirtConnection:
857857 except:
858858 pass
859859
860+ return True
861+
860862 def start_guest(self,name=None):
861863 """
862864 <comment-ja>
--- a/karesansui/templates/default/guest/guest.input
+++ b/karesansui/templates/default/guest/guest.input
@@ -239,7 +239,7 @@ function set_pool_name(name){
239239 if(disk_type == 'iscsi'){
240240 var vol_name = null;
241241 if(parts.length > 1){
242- var vol_name = parts[1];
242+ vol_name = parts[1];
243243 }
244244 var disk_capacity = view_megaunit(vols_info[vol_name]['capacity'], 'B');
245245 var view_disk_capacity = view_autounit(vols_info[vol_name]['capacity'], null, DEFAULT_DECIMAL_POINT, true);
@@ -253,6 +253,7 @@ function set_pool_name(name){
253253 $("#disk_realpath_value_box").html(vols_info[vol_name]['realpath']);
254254 $("#disk_path_box").show();
255255 $("#disk_realpath_box").show();
256+ $("#pool_type").val("block");
256257 } else { // type is 'dir' or 'fs'
257258 var disk_available = view_megaunit(pools_info[pool_name]['available'], 'B');
258259 var disk_capacity = view_megaunit(pools_info[pool_name]['capacity'], 'B');
@@ -263,7 +264,7 @@ function set_pool_name(name){
263264 var view_start_disk_size = default_view_start_disk_size;
264265 if(disk_available < default_start_disk_size){
265266 start_disk_size = disk_available;
266- view_start_disk_size = view_autounit(start_disk_size, ['MB','GB','TB', 'PB', 'EB'], DEFAULT_DECIMAL_POINT, true)
267+ view_start_disk_size = view_autounit(start_disk_size, ['MB','GB','TB', 'PB', 'EB'], DEFAULT_DECIMAL_POINT, true);
267268 }
268269 $("#disk_size_box").show();
269270 set_simple_slider(
@@ -287,6 +288,7 @@ function set_pool_name(name){
287288 $("#disk_format_box").show();
288289 $("#disk_path_box").hide();
289290 $("#disk_realpath_box").hide();
291+ $("#pool_type").val(disk_type);
290292 }
291293 }
292294
@@ -313,7 +315,6 @@ $(document).ready(function(){
313315 $("#vm_mem_size_autounit").text('(' + view_value + ')');
314316 });
315317
316-
317318 var pool_name = $('#pool_dir option:selected').val();
318319 set_pool_name(pool_name);
319320 $("#pool_dir").change(function(){
Show on old repository browser