Commit 3027b03f authored by Leigh B Stoller's avatar Leigh B Stoller

When importing images, set the ready/released bits.

parent 50b9ffde
#!/usr/bin/perl -w
#
# Copyright (c) 2003-2013 University of Utah and the Flux Group.
# Copyright (c) 2003-2014 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -252,10 +252,13 @@ foreach my $imageid (keys(%{ $xmlparse->{'image'} })) {
# Do this as admin cause of admin only options in the descriptor.
system("$SUDO -u $PROTOUSER $WAP $NEWIMAGE_EZ -a $metafilename") == 0
or fatal("Could not create descriptor for $imageid");
}
$image = Image->Lookup(TBOPSPID(), $imageid);
if (!defined($image)) {
fatal("Could not lookup newly created descriptor for $imageid");
$image = Image->Lookup(TBOPSPID(), $imageid);
if (!defined($image)) {
fatal("Could not lookup newly created descriptor for $imageid");
}
$image->MarkReady();
$image->MarkReleased();
}
my $imagefilename = "$TB/images/${imageid}.ndz";
......
......@@ -389,6 +389,8 @@ sub CreateImage($$$$)
if (!defined($image)) {
fatal("Could not lookup new image for $url");
}
$image->MarkReady();
$image->MarkReleased();
return $image;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment