Changeset 1540 in ProjectBuilder for devel/pb/bin


Ignore:
Timestamp:
May 13, 2012, 1:03:52 PM (12 years ago)
Author:
Bruno Cornec
Message:
  • vmmonport is now optional
  • vmmem is also now really optional (wasn't working before as wasn't correctly tested)
  • We are allowed to kill the sleep during VMs wait without it aborting the process
  • newv(e|m) doesn't require execution of cms2build before being available
  • Fix another git support error introduced earlier
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r1539 r1540  
    23142314        die "-i iso parameter needed" if (((not defined $iso) || ($iso eq "")) && ($create != 0));
    23152315
    2316         # TODO: vmmonport should be optional
    2317         my ($ptr,$ptr2,$vmpath,$vmport,$vms,$vmmonport) = pb_conf_get("vmtype","vmcmd","vmpath","vmport","vmsize","vmmonport");
    2318         my ($vmopt,$vmmm,$vmtmout,$vmsnap,$vmbuildtm) = pb_conf_get_if("vmopt","vmmem","vmtmout","vmsnap","vmbuildtm");
     2316        my ($ptr,$ptr2,$vmpath,$vmport,$vms) = pb_conf_get("vmtype","vmcmd","vmpath","vmport","vmsize");
     2317        my ($vmopt,$vmmm,$vmtmout,$vmsnap,$vmbuildtm,$vmmonport) = pb_conf_get_if("vmopt","vmmem","vmtmout","vmsnap","vmbuildtm","vmmonport");
    23192318        my $vmsize = pb_distro_get_param($pbos,$vms);
    23202319
     
    23432342
    23442343        # How much memory to allocate for VMs
    2345         my $vmmem = pb_distro_get_param($pbos,$vmmm);
    2346         if (defined $vmmem) {
    2347             $ENV{'PBVMOPT'} .= " -m $vmmem";
     2344        if (defined $vmmm) {
     2345            my $vmmem = pb_distro_get_param($pbos,$vmmm);
     2346            if (defined $vmmem) {
     2347                $ENV{'PBVMOPT'} .= " -m $vmmem";
     2348            }
    23482349        }
    23492350
     
    23612362            if (($vmtype eq "kvm") || ($vmtype eq "qemu")) {
    23622363                # Configure the monitoring to automate the creation of the 'pb' snapshot
    2363                 $ENV{'PBVMOPT'} .= " -serial mon:telnet::$vmmonport->{$ENV{'PBPROJ'}},server,nowait";
     2364                $ENV{'PBVMOPT'} .= " -serial mon:telnet::$vmmonport->{$ENV{'PBPROJ'}},server,nowait" if ((defined $vmmonport) && (defined $vmmonport->{$ENV{'PBPROJ'}}));
    23642365                # In that case no snapshot call needed
    23652366                $ENV{'PBVMOPT'} =~ s/ -snapshot//;
     
    24242425                }
    24252426                pb_system("$cmd &","Launching the VM $vmm");
    2426                 # Using system allows to kill it externaly if needed
    2427                 pb_system("sleep $ENV{'PBVMTMOUT'}","Waiting $ENV{'PBVMTMOUT'} s for VM $v to come up");
     2427                # Using system allows to kill it externaly if needed,sosupport that in the call
     2428                pb_system("sleep $ENV{'PBVMTMOUT'}","Waiting $ENV{'PBVMTMOUT'} s for VM $v to come up",undef,1);
    24282429                $vmpid = pb_check_ps($tmpcmd,$vmm);
    24292430                pb_log(0,"VM $vmm launched (pid $vmpid)\n");
Note: See TracChangeset for help on using the changeset viewer.