Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Elijah Grubb
emulab-devel
Commits
b23eb46c
Commit
b23eb46c
authored
Mar 22, 2014
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add user to slice name. Print out urn/logurl in email.
parent
6cde8593
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
protogeni/scripts/quickvm.in
protogeni/scripts/quickvm.in
+23
-6
No files found.
protogeni/scripts/quickvm.in
View file @
b23eb46c
...
@@ -387,10 +387,15 @@ if ($geniuser->GetKeyBundle(\@sshkeys, 1) < 0 || !@sshkeys) {
...
@@ -387,10 +387,15 @@ if ($geniuser->GetKeyBundle(\@sshkeys, 1) < 0 || !@sshkeys) {
#
#
# Now generate a slice registration and credential
# Now generate a slice registration and credential
#
#
my
$slice_id
=
"
QV
"
.
TBGetUniqueIndex
('
next_quickvm
',
1
);
my
$slice_id
=
$user_uid
.
"
-
QV
"
.
TBGetUniqueIndex
('
next_quickvm
',
1
);
my
$slice_urn
=
GeniHRN::
Generate
(
$OURDOMAIN
,
"
slice
",
$slice_id
);
my
$slice_urn
=
GeniHRN::
Generate
(
$OURDOMAIN
,
"
slice
",
$slice_id
);
my
$slice_hrn
=
"
${PGENIDOMAIN}
.
${slice_id}
";
my
$slice_hrn
=
"
${PGENIDOMAIN}
.
${slice_id}
";
print
STDERR
"
\n
";
print
STDERR
"
$user_urn
\n
";
print
STDERR
"
$slice_urn
\n\n\n
";
print
STDERR
"
$rspecstr
\n
";
#
#
# Make sure slice is unique. Probably retry here at some point.
# Make sure slice is unique. Probably retry here at some point.
#
#
...
@@ -515,9 +520,6 @@ if (!defined($manifest)) {
...
@@ -515,9 +520,6 @@ if (!defined($manifest)) {
$instance
->
SetStatus
("
provisioned
");
$instance
->
SetStatus
("
provisioned
");
$instance
->
SetManifest
(
$manifest
);
$instance
->
SetManifest
(
$manifest
);
print
STDERR
"
\n
";
print
STDERR
"
$manifest
\n\n
";
#
#
# but have to wait for the sliver to be ready, which means polling.
# but have to wait for the sliver to be ready, which means polling.
#
#
...
@@ -525,6 +527,7 @@ my $seconds = 600;
...
@@ -525,6 +527,7 @@ my $seconds = 600;
my
$interval
=
15
;
my
$interval
=
15
;
my
$ready
=
0
;
my
$ready
=
0
;
my
$failed
=
0
;
my
$failed
=
0
;
my
$public_url
;
while
(
$seconds
>
0
)
{
while
(
$seconds
>
0
)
{
sleep
(
$interval
);
sleep
(
$interval
);
...
@@ -541,13 +544,21 @@ while ($seconds > 0) {
...
@@ -541,13 +544,21 @@ while ($seconds > 0) {
if
(
!
defined
(
$response
)
||
!
defined
(
$response
->
value
())
||
if
(
!
defined
(
$response
)
||
!
defined
(
$response
->
value
())
||
(
$response
->
code
()
!=
GENIRESPONSE_SUCCESS
&&
(
$response
->
code
()
!=
GENIRESPONSE_SUCCESS
&&
$response
->
code
()
!=
GENIRESPONSE_BUSY
))
{
$response
->
code
()
!=
GENIRESPONSE_BUSY
))
{
fatal
("
SliverStatus failed:
"
.
print
STDERR
"
SliverStatus failed
";
(
defined
(
$response
)
?
$response
->
output
()
:
"")
.
"
\n
");
if
(
defined
(
$response
))
{
print
STDERR
"
:
"
.
$response
->
output
();
}
print
STDERR
"
\n
";
$failed
=
1
;
last
;
}
}
next
next
if
(
$response
->
code
()
==
GENIRESPONSE_BUSY
);
if
(
$response
->
code
()
==
GENIRESPONSE_BUSY
);
my
$blob
=
$response
->
value
();
my
$blob
=
$response
->
value
();
if
(
exists
(
$blob
->
{'
public_url
'}))
{
$public_url
=
$blob
->
{'
public_url
'};
}
if
(
$blob
->
{'
status
'}
eq
"
ready
")
{
if
(
$blob
->
{'
status
'}
eq
"
ready
")
{
$ready
=
1
;
$ready
=
1
;
last
;
last
;
...
@@ -558,6 +569,12 @@ while ($seconds > 0) {
...
@@ -558,6 +569,12 @@ while ($seconds > 0) {
last
;
last
;
}
}
}
}
print
STDERR
"
$slice_urn
\n
";
print
STDERR
"
$public_url
\n
"
if
(
defined
(
$public_url
));
print
STDERR
"
\n
";
print
STDERR
"
$manifest
\n\n
";
if
(
$failed
)
{
if
(
$failed
)
{
fatal
("
$slice_urn
failed.
");
fatal
("
$slice_urn
failed.
");
}
}
...
...
Write
Preview
Markdown
is supported
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