diff options
author | Ross Lagerwall <ross.lagerwall@citrix.com> | 2016-06-29 10:54:08 +0100 |
---|---|---|
committer | Ross Lagerwall <ross.lagerwall@citrix.com> | 2016-07-14 12:02:55 +0100 |
commit | b0091d3dad6a1dae7874ed33906ac0d64eb6c25b (patch) | |
tree | aa6aa5cae4a4aa7119a73a771b5d0ee842918625 /xe-daemon | |
parent | 2e0e2cbdb9022b9b2bd2555ee12eec0d1abf8667 (diff) | |
download | vyos-xe-guest-utilities-b0091d3dad6a1dae7874ed33906ac0d64eb6c25b.tar.gz vyos-xe-guest-utilities-b0091d3dad6a1dae7874ed33906ac0d64eb6c25b.zip |
CA-202608: Trigger refresh after system resume
If the guest is suspended and then resumed or migrated, trigger a
refresh to repopulate the xenstore entries (since the guest will have a
new domid).
Without doing this, XAPI thinks that the guest does not have PV drivers
installed and will refuse to do a vbd-plug operation until then next
refresh by the guest agent.
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Diffstat (limited to 'xe-daemon')
-rw-r--r-- | xe-daemon/xe-daemon.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xe-daemon/xe-daemon.go b/xe-daemon/xe-daemon.go index 839e454..17c4bfd 100644 --- a/xe-daemon/xe-daemon.go +++ b/xe-daemon/xe-daemon.go @@ -3,6 +3,7 @@ package main import ( guestmetric "../guestmetric" syslog "../syslog" + system "../system" xenstoreclient "../xenstoreclient" "flag" "fmt" @@ -52,6 +53,9 @@ func main() { exitChannel := make(chan os.Signal, 1) signal.Notify(exitChannel, syscall.SIGTERM, syscall.SIGINT) + resumedChannel := make(chan int) + go system.NotifyResumed(resumedChannel) + xs, err := xenstoreclient.NewCachedXenstore(0) if err != nil { message := fmt.Sprintf("NewCachedXenstore error: %v\n", err) @@ -135,6 +139,10 @@ func main() { } return + case <-resumedChannel: + logger.Printf("Trigger refresh after system resume\n") + continue + case <-time.After(time.Duration(*sleepInterval) * time.Second): continue } |