Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
4e2cea70
Commit
4e2cea70
authored
Feb 16, 2011
by
Ryan Jackson
Browse files
Fix broken state transitions for Xen vnodes
parent
88ed83df
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/linux/xen/libvnode_xen.pm
View file @
4e2cea70
...
...
@@ -407,11 +407,17 @@ sub vnodeCreate($$$)
fatal
("
xen_vnodeCreate: cannot load image without loadinfo
\n
");
}
# Tell stated we are getting ready for a reload
libvnode::
setState
("
RELOADSETUP
");
$lvname
=
createImageDisk
(
$imagename
,
$raref
);
if
(
!
$lvname
)
{
fatal
("
xen_vnodeCreate: cannot create logical volume for
$imagename
");
}
# Tell stated via tmcd
libvnode::
setState
("
RELOADING
");
#
# Since we may have (re)loaded a new image for this vnode, check
# and make sure the vnode snapshot disk is associated with the
...
...
@@ -777,6 +783,7 @@ sub vnodeBoot($)
die
("
libvnode_xen: vnodeBoot
$vnode_id
: could not create bridges
");
}
libvnode::
setState
("
BOOTING
");
# and finally, create the VM
mysystem
("
xm create
$config
");
print
"
Created virtual machine
$vnode_id
\n
";
...
...
@@ -968,9 +975,6 @@ sub createImageDisk($$)
return
$lvname
;
}
# Tell stated we are getting ready for a reload
libvnode::
setState
("
RELOADSETUP
");
my
$size
=
$XEN_LDSIZE
;
if
(
system
("
/usr/sbin/lvcreate -n
$lvname
-L
${size}
G
$VGNAME
"))
{
print
STDERR
"
libvnode_xen: could not create disk for
$image
\n
";
...
...
@@ -978,9 +982,6 @@ sub createImageDisk($$)
return
0
;
}
# Tell stated via tmcd
libvnode::
setState
("
RELOADING
");
# Now we just download the file, then let create do its normal thing
my
$imagepath
=
lvmVolumePath
(
$lvname
);
my
$dret
=
libvnode::
downloadImage
(
$imagepath
,
1
,
$raref
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment