Merge ~paelzer/ubuntu/+source/open-vm-tools:fix-lp1791220-lp1790145-cosmic into ubuntu/+source/open-vm-tools:ubuntu/cosmic-devel

Proposed by Christian Ehrhardt 
Status: Merged
Merge reported by: Christian Ehrhardt 
Merged at revision: 51a31a08a99d8df8083b71f7929eba11d05e8da7
Proposed branch: ~paelzer/ubuntu/+source/open-vm-tools:fix-lp1791220-lp1790145-cosmic
Merge into: ubuntu/+source/open-vm-tools:ubuntu/cosmic-devel
Diff against target: 86 lines (+53/-2)
4 files modified
debian/changelog (+11/-0)
debian/patches/debian/scsi-udev-rule (+2/-2)
debian/patches/series (+1/-0)
debian/patches/ubuntu/lp-1791220-Disable-hgfsServer-not-VMware.patch (+39/-0)
Reviewer Review Type Date Requested Status
Andreas Hasenack Approve
Canonical Server packageset reviewers Pending
git-ubuntu developers Pending
Review via email: mp+354555@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Two small but important changes that eventually will also be Bionic SRU material.
Hoping to fix this in cosmic before things freeze completely

Testing PPA: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3409

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FYI - this is a pre-review.
The timeout change is sort of unclear as I have positive feedback on one side, but other reports of it working fine without the change.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

+1 for the upstream patch. I was going to test it, but cosmic cloud images are currently broken because of https://bugs.launchpad.net/cloud-images/+bug/1791691.

Regarding the timeout change, I just now saw the bug mentioned in the changelog, and I linked this MP to it. I believe you are testing this in that vsphere/esx VM, and we can talk again tomorrow.

d178e8e... by Christian Ehrhardt 

Revert "- d/p/debian/scsi-udev-rule: update to match changes in 10.3 (DEVTYPE check added upstream)"

This reverts commit dfc6c733d96e57b5aa29b46e8ba9a6fefa3fb7b3.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Yes, thanks for that vsphere access that really helped to get this resolved.
Will have an update here in a bit.

5479f4a... by Christian Ehrhardt 

- refresh patch context to match upstream version 10.3

Signed-off-by: Christian Ehrhardt <email address hidden>

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Crash fix verified. It still exits code 0 when run in something other than a vmware vm, though. Like in a lxd.

Is the scsi udev change complete and ready?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

>
> Is the scsi udev change complete and ready?
>
> yes

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Ok, I pushed the updated version.
The timeout issue is now fixed as well.

I pushed an updated ...ubuntu3~ppa1 version to the ppa (will eventually be ubuntu2 as proposed here, I just have consumed the ubuntu2 version in the ppa already)

For testing:
- timeout 10.245.205.25 has your pubkey as well.
- segfault you can use a bionic container and partially upgrade to cosmic?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

- segfault fix verified
- timeout fix verified, but I had to reboot. Is there another way? I guess not, because the timeout setting happens when the device is added. Maybe unplugging and replugging the disk via the vsphere GUI, which I don't think we should try :) I was just curious.

Maybe just update the second d/changelog entry with the name of the patch that was changed?

+1 regardless, no need to re-review if you change it (or not).

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/open-vm-tools
 * [new tag] upload/2%10.3.0-0ubuntu2 -> upload/2%10.3.0-0ubuntu2

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading open-vm-tools_10.3.0-0ubuntu2.dsc: done.
  Uploading open-vm-tools_10.3.0-0ubuntu2.debian.tar.xz: done.
  Uploading open-vm-tools_10.3.0-0ubuntu2_source.buildinfo: done.
  Uploading open-vm-tools_10.3.0-0ubuntu2_source.changes: done.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index daa14fd..bb0d66a 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,14 @@
6+open-vm-tools (2:10.3.0-0ubuntu2) cosmic; urgency=medium
7+
8+ * d/p/ubuntu/lp-1791220-Disable-hgfsServer-not-VMware.patch: avoid crashing
9+ with segfaults when force starting the service in non VMWare environments.
10+ (LP: #1791220)
11+ * fix applying of the scsi timeout (LP: #1790145)
12+ - revert "update to match changes in 10.3 (DEVTYPE checkadded upstream)"
13+ - refresh patch context to match upstream version 10.3
14+
15+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 10 Sep 2018 09:33:13 +0200
16+
17 open-vm-tools (2:10.3.0-0ubuntu1) cosmic; urgency=medium
18
19 * Merge with Upstream Tag stable-10.3.0 (LP: #1784638) from
20diff --git a/debian/patches/debian/scsi-udev-rule b/debian/patches/debian/scsi-udev-rule
21index 8c5fc64..3f8a23b 100644
22--- a/debian/patches/debian/scsi-udev-rule
23+++ b/debian/patches/debian/scsi-udev-rule
24@@ -6,6 +6,6 @@
25
26 -ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*", ATTRS{model}=="Virtual disk*", ENV{DEVTYPE}=="disk", RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'"
27 -ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*", ATTRS{model}=="VMware Virtual S", ENV{DEVTYPE}=="disk", RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'"
28-+ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*", ATTRS{model}=="Virtual disk*", ENV{DEVTYPE}=="disk", ATTR{timeout}="180"
29-+ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*", ATTRS{model}=="VMware Virtual S", ENV{DEVTYPE}=="disk", ATTR{timeout}="180"
30++ACTION=="add", SUBSYSTEMS=="scsi", ENV{DEVTYPE}=="scsi_device", ATTRS{vendor}=="VMware*" , ATTRS{model}=="Virtual disk*", ATTRS{timeout}=="?*", ATTR{timeout}="180"
31++ACTION=="add", SUBSYSTEMS=="scsi", ENV{DEVTYPE}=="scsi_device", ATTRS{vendor}=="VMware*" , ATTRS{model}=="VMware Virtual S", ATTRS{timeout}=="?*", ATTR{timeout}="180"
32
33diff --git a/debian/patches/series b/debian/patches/series
34index c4eabb2..7411f4f 100644
35--- a/debian/patches/series
36+++ b/debian/patches/series
37@@ -2,3 +2,4 @@ debian/pam-use-common-auth-account
38 debian/max_nic_count
39 debian/enable_vmhgfs-fuse_by_default
40 debian/scsi-udev-rule
41+ubuntu/lp-1791220-Disable-hgfsServer-not-VMware.patch
42diff --git a/debian/patches/ubuntu/lp-1791220-Disable-hgfsServer-not-VMware.patch b/debian/patches/ubuntu/lp-1791220-Disable-hgfsServer-not-VMware.patch
43new file mode 100644
44index 0000000..788c7b1
45--- /dev/null
46+++ b/debian/patches/ubuntu/lp-1791220-Disable-hgfsServer-not-VMware.patch
47@@ -0,0 +1,39 @@
48+From ebf08325adf874723c86aa313954492101117934 Mon Sep 17 00:00:00 2001
49+From: Oliver Kurth <okurth@vmware.com>
50+Date: Wed, 29 Aug 2018 13:29:44 -0700
51+Subject: [PATCH] Disable hgfsServer plugin when not running in a VMware VM.
52+
53+VmCheck_GetVersion() accesses Backdoor in an unsafe manner
54+which is not expected to work on non-VMware environments
55+including physical machines. So, we need to make sure that
56+VmCheck_GetVersion() is called only when we are running in
57+a VMware VM.
58+---
59+Origin: backport, https://github.com/vmware/open-vm-tools/commit/ebf08325adf874723c86aa313954492101117934
60+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1791220
61+
62+Last-Update: 2018-05-19
63+ open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c | 7 +++++++
64+ 1 file changed, 7 insertions(+)
65+
66+diff --git a/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c b/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c
67+index c5ef8726b..129fa7504 100644
68+--- a/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c
69++++ b/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c
70+@@ -1089,6 +1089,13 @@ ToolsOnLoad(ToolsAppCtx *ctx)
71+ return NULL;
72+ }
73+
74++ /*
75++ * If not running in a VMware VM, return NULL to disable the plugin.
76++ */
77++ if (!ctx->isVMware) {
78++ return NULL;
79++ }
80++
81+ /*
82+ * Check for VM is running in a hosted environment and if so initialize
83+ * the Shared Folders HGFS client redirector.
84+--
85+2.17.1
86+

Subscribers

People subscribed via source and target branches