-Delay clone master template status until after snapshot

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9440 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2011-04-30 17:23:56 +00:00
parent df60cd4ba9
commit 0eb5073dcc

View File

@ -2183,7 +2183,7 @@ sub promote_vm_to_master {
);
my $clonespec = VirtualMachineCloneSpec->new(
location=>$relocatespec,
template=>1,
#template=>1, #can't go straight to template, need to clone, then snap, then templatify
powerOn=>0
);
@ -2210,6 +2210,7 @@ sub promote_task_callback {
}
my $masterview = $masterviews->[0];
my $task = $masterview->CreateSnapshot_Task(name=>"xcatsnap",memory=>"false",quiesce=>"false");
$parms->{masterview}=$masterview;
$running_tasks{$task}->{data} = $parms;
$running_tasks{$task}->{task} = $task;
$running_tasks{$task}->{callback} = \&promotesnap_task_callback;
@ -2227,6 +2228,7 @@ sub promotesnap_task_callback {
my $node = $parms->{node};
my $intent = $parms->{successtext};
if ($state eq 'success') {
$parms->{masterview}->MarkAsTemplate; #time to be a template
xCAT::SvrUtils::sendmsg($intent, $output_handler,$node);
my $mastertabentry = {
originator=>$requester,