Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Logging fix.

When we're updating the database value of VBD.currently_attached in
response to a xenopsd event, make sure we log the value we're putting
into the database.

Signed-off-by: John Else <john.else@citrix.com>
  • Loading branch information...
commit df292dc1531bfc039245dd621631c3590b8b3ddf 1 parent 127a3b6
@johnelse johnelse authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 ocaml/xapi/xapi_xenops.ml
View
5 ocaml/xapi/xapi_xenops.ml
@@ -1067,9 +1067,10 @@ let update_vbd ~__context (id: (string * string)) =
let vbd, vbd_r = List.find (fun (_, vbdr) -> vbdr.API.vBD_userdevice = linux_device || vbdr.API.vBD_userdevice = disk_number) vbdrs in
Opt.iter
(fun (vb, state) ->
- debug "xenopsd event: Updating VBD %s.%s device <- %s; currently_attached <- %b" (fst id) (snd id) linux_device state.plugged;
+ let currently_attached = state.plugged || state.active in
+ debug "xenopsd event: Updating VBD %s.%s device <- %s; currently_attached <- %b" (fst id) (snd id) linux_device currently_attached;
Db.VBD.set_device ~__context ~self:vbd ~value:linux_device;
- Db.VBD.set_currently_attached ~__context ~self:vbd ~value:(state.plugged || state.active);
+ Db.VBD.set_currently_attached ~__context ~self:vbd ~value:currently_attached;
if state.plugged then begin
match state.backend_present with
| Some (VDI x) ->

0 comments on commit df292dc

Please sign in to comment.
Something went wrong with that request. Please try again.