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
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
0d661d9b
Commit
0d661d9b
authored
Jan 05, 2014
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When we move a lease to the locked state, make a note as to why.
The note is actually a lease attribute called 'why'.
parent
595a118c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
tbsetup/lease_daemon.in
tbsetup/lease_daemon.in
+7
-0
No files found.
tbsetup/lease_daemon.in
View file @
0d661d9b
...
...
@@ -385,6 +385,9 @@ while (1) {
}
if
(
lockify
(
$lease
))
{
logit
("
WARNING:
$lease
: could not lockdown, skipping
");
}
else
{
# XXX make a note of why it is locked
$lease
->
SetAttribute
("
why
",
"
lease_daemon_no_autodestroy
");
}
}
$lease
->
BumpLastChecked
();
...
...
@@ -550,6 +553,8 @@ sub destroy($)
# If Dealloc fails, we put the lease in the locked state instead
if
(
$lease
->
DeallocResources
())
{
$lease
->
UpdateState
(
LEASE_STATE_LOCKED
());
# XXX make a note of why it is locked
$lease
->
SetAttribute
("
why
",
"
lease_daemon_dealloc_failed
");
$lease
->
Unlock
();
notify
("
$lease
: resource dealloc failed during destruction. Manual cleanup required.
");
return
4
;
...
...
@@ -561,6 +566,8 @@ sub destroy($)
# If Delete fails, we are left in the unapproved state
if
(
$lease
->
Delete
())
{
# XXX make a note of why it is here
$lease
->
SetAttribute
("
why
",
"
lease_daemon_delete_failed
");
$lease
->
Unlock
();
notify
("
$lease
: could not destroy lease, left in unapproved state. Manual cleanup required.
");
return
5
;
...
...
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