From 0828342e93bc93d13b9b29315e0f5a48fc4f02e341685bb7ff6d4277963d1f82 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 17 Dec 2014 09:16:59 +0000 Subject: [PATCH 1/2] - Start hv_kvp_daemon after network-online.target (bnc#910353) - ignore ENOBUFS and ENOMEM in the KVP daemon - vssdaemon: skip all filesystems mounted readonly (bnc#909864) - vssdaemon: report freeze errors OBS-URL: https://build.opensuse.org/package/show/Virtualization/hyper-v?expand=0&rev=104 --- hyper-v.changes | 8 ++++++++ hyper-v.spec | 11 +++++------ hyper-v.tools.hv.hv_kvp_daemon.c | 14 ++++++++++++++ hyper-v.tools.hv.hv_vss_daemon.c | 18 +++++++++++++----- 4 files changed, 40 insertions(+), 11 deletions(-) diff --git a/hyper-v.changes b/hyper-v.changes index 9b39c73..efa5e6d 100644 --- a/hyper-v.changes +++ b/hyper-v.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Dec 17 09:06:33 UTC 2014 - ohering@suse.de + +- Start hv_kvp_daemon after network-online.target (bnc#910353) +- ignore ENOBUFS and ENOMEM in the KVP daemon +- vssdaemon: skip all filesystems mounted readonly (bnc#909864) +- vssdaemon: report freeze errors + ------------------------------------------------------------------- Tue Nov 25 17:46:30 UTC 2014 - ohering@suse.de diff --git a/hyper-v.spec b/hyper-v.spec index 7955d28..2126329 100644 --- a/hyper-v.spec +++ b/hyper-v.spec @@ -129,15 +129,16 @@ cat > ${d}/%{hv_kvp_daemon}.service <mnt_fsname, match, strlen(match))) continue; - if (strcmp(ent->mnt_type, "iso9660") == 0) + if (hasmntopt(ent, MNTOPT_RO) != NULL) continue; if (strcmp(ent->mnt_type, "vfat") == 0) continue; @@ -115,7 +115,6 @@ static int vss_operate(int operation) if (error && operation == VSS_OP_FREEZE) goto err; } - endmntent(mounts); if (root_seen) { error |= vss_do_freeze("/", cmd); @@ -123,10 +122,19 @@ static int vss_operate(int operation) goto err; } - return error; + goto out; err: - endmntent(mounts); + save_errno = errno; vss_operate(VSS_OP_THAW); + /* Call syslog after we thaw all filesystems */ + if (ent) + syslog(LOG_ERR, "FREEZE of %s failed; error:%d %s", + ent->mnt_dir, save_errno, strerror(save_errno)); + else + syslog(LOG_ERR, "FREEZE of / failed; error:%d %s", save_errno, + strerror(save_errno)); +out: + endmntent(mounts); return error; } From 7b2647052e45366ca7d1d84fd077d2b0a3eec34ec34cb4285c5c12d1222426d8 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 17 Dec 2014 09:43:44 +0000 Subject: [PATCH 2/2] Also Require network-online.target because its not available by its own. OBS-URL: https://build.opensuse.org/package/show/Virtualization/hyper-v?expand=0&rev=105 --- hyper-v.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/hyper-v.spec b/hyper-v.spec index 2126329..85c5d51 100644 --- a/hyper-v.spec +++ b/hyper-v.spec @@ -130,6 +130,7 @@ cat > ${d}/%{hv_kvp_daemon}.service <