Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
30f8ae7e
Commit
30f8ae7e
authored
May 04, 2016
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better handling of failed RPCs (say, cause cluster is down).
parent
381b5e3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
apt/manage_dataset.in
apt/manage_dataset.in
+16
-0
No files found.
apt/manage_dataset.in
View file @
30f8ae7e
...
...
@@ -425,6 +425,10 @@ sub DoDelete()
uerror
("
dataset is busy, cannot lock it
");
}
my
$response
=
$dataset
->
DeleteDataset
();
if
(
!
defined
(
$response
))
{
$errmsg
=
"
RPC Error calling DeleteDataset
";
goto
failed
;
}
if
(
$response
->
code
()
!=
GENIRESPONSE_SUCCESS
&&
$response
->
code
()
!=
GENIRESPONSE_SEARCHFAILED
&&
$response
->
code
()
!=
GENIRESPONSE_BUSY
)
{
...
...
@@ -479,6 +483,10 @@ sub DoRefreshInternal($$)
my
(
$dataset
,
$pmesg
)
=
@_
;
my
$response
=
$dataset
->
DescribeDataset
();
if
(
!
defined
(
$response
))
{
$$pmesg
=
"
RPC Error calling DescribeDataset
";
return
-
1
;
}
if
(
$response
->
code
()
!=
GENIRESPONSE_SUCCESS
)
{
if
(
$response
->
code
()
==
GENIRESPONSE_SEARCHFAILED
)
{
$$pmesg
=
"
Dataset no longer exists at the remote cluster
\n
";
...
...
@@ -568,6 +576,10 @@ sub DoModify()
}
}
my
$response
=
$dataset
->
ModifyDataset
();
if
(
!
defined
(
$response
))
{
$errmsg
=
"
RPC Error calling ModifyDataset
";
goto
failed
;
}
if
(
$response
->
code
()
!=
GENIRESPONSE_SUCCESS
)
{
if
(
$response
->
code
()
==
GENIRESPONSE_SEARCHFAILED
)
{
$errmsg
=
"
Dataset no longer exists at the target
\n
";
...
...
@@ -613,6 +625,10 @@ sub DoExtend()
uerror
("
dataset is busy, cannot lock it
");
}
my
$response
=
$dataset
->
ExtendDataset
();
if
(
!
defined
(
$response
))
{
$errmsg
=
"
RPC Error calling ExtendDataset
";
goto
failed
;
}
if
(
$response
->
code
()
!=
GENIRESPONSE_SUCCESS
)
{
if
(
$response
->
code
()
==
GENIRESPONSE_SEARCHFAILED
)
{
$errmsg
=
"
Dataset no longer exists at the target
\n
";
...
...
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