Changeset 768 for devel/pb/bin/pb


Ignore:
Timestamp:
May 3, 2009, 1:05:58 PM (11 years ago)
Author:
bruno
Message:
  • No snapshot needed if creating the VM
  • Remove the VE befor recreating it if snapshot
  • Force yum update
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r767 r768  
    13891389            if ((($vmtype->{$ENV{'PBPROJ'}}) eq "kvm") || (($vmtype->{$ENV{'PBPROJ'}}) eq "qemu")) {
    13901390                use Net::Telnet;
    1391                 my $t = new Net::Telnet (Host => "localhost", Port => $vmmonport->{$ENV{'PBPROJ'}}) || die "Unable to dialog on the monitor";
     1391                my $t = new Net::Telnet (Timeout => 10, Host => "localhost", Port => $vmmonport->{$ENV{'PBPROJ'}}) || die "Unable to dialog on the monitor";
    13921392                # move to monitor mode
    13931393                my @lines = $t->cmd("c");
     
    15111511                # Configure the monitoring to automize the creation of the 'pb' snapshot
    15121512                $ENV{'PBVMOPT'} .= "-serial mon:telnet::$vmmonport->{$ENV{'PBPROJ'}},server,nowait ";
     1513                # In that case no snapshot needed
     1514                $ENV{'PBVMOPT'} =~ s/-snapshot //;
    15131515            }
    15141516        }
     
    16611663                    ($pbsnap eq 1) ||
    16621664                    (! -d "$vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch"))) {
    1663                         pb_system("sudo mkdir -p $vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch ; sudo tar xz  -C $vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch -f $vepath->{$ENV{'PBPROJ'}}/$ddir-$dver-$darch.tar.gz","Extracting snapshot of $ddir-$dver-$darch.tar.gz under $vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch");
     1665                        pb_system("sudo sudo rm -rf $vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch ; mkdir -p $vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch ; sudo tar xz  -C $vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch -f $vepath->{$ENV{'PBPROJ'}}/$ddir-$dver-$darch.tar.gz","Extracting snapshot of $ddir-$dver-$darch.tar.gz under $vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch");
    16641666            }
    16651667            # Nothing more to do for VE. No real launch
     
    22752277EOF
    22762278    if ($vtype eq "vm") {
    2277         print SCRIPT "sleep 3600\n";
     2279        print SCRIPT "sleep 120\n";
    22782280    } else {
    22792281        print SCRIPT "sleep 1\n";
Note: See TracChangeset for help on using the changeset viewer.