From owner-dev-commits-ports-all@freebsd.org Tue Jul 27 20:58:09 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 852FF669167; Tue, 27 Jul 2021 20:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GZ8Jd3NS1z52q2; Tue, 27 Jul 2021 20:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C13B11B33; Tue, 27 Jul 2021 20:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16RKw9tk006740; Tue, 27 Jul 2021 20:58:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16RKw9QW006739; Tue, 27 Jul 2021 20:58:09 GMT (envelope-from git) Date: Tue, 27 Jul 2021 20:58:09 GMT Message-Id: <202107272058.16RKw9QW006739@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 7a2b4e1ff1b7 - 2021Q3 - sysutils/azure-agent: Workaround for detecting resource disk on gen2 VM MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q3 X-Git-Reftype: branch X-Git-Commit: 7a2b4e1ff1b723022123d0c187bd072cbe1b53f6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2021 20:58:09 -0000 The branch 2021Q3 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/ports/commit/?id=7a2b4e1ff1b723022123d0c187bd072cbe1b53f6 commit 7a2b4e1ff1b723022123d0c187bd072cbe1b53f6 Author: Li-Wen Hsu AuthorDate: 2021-07-27 20:57:30 +0000 Commit: Li-Wen Hsu CommitDate: 2021-07-27 20:57:52 +0000 sysutils/azure-agent: Workaround for detecting resource disk on gen2 VM Approved by: whu (maintainer, implicitly) MFH: 2021Q3 Sponsored by: The FreeBSD Foundation (cherry picked from commit 828e370fe13f3858073666df4fe68f8188b4ad57) --- sysutils/azure-agent/Makefile | 1 + ...tch-azurelinuxagent_daemon_resourcedisk_freebsd.py | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/sysutils/azure-agent/Makefile b/sysutils/azure-agent/Makefile index 8c4b2919ca9a..db657147b9ae 100644 --- a/sysutils/azure-agent/Makefile +++ b/sysutils/azure-agent/Makefile @@ -1,6 +1,7 @@ PORTNAME= azure-agent PORTVERSION= 2.2.54.2 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= sysutils PATCH_SITES= https://github.com/Azure/WALinuxAgent/commit/ diff --git a/sysutils/azure-agent/files/patch-azurelinuxagent_daemon_resourcedisk_freebsd.py b/sysutils/azure-agent/files/patch-azurelinuxagent_daemon_resourcedisk_freebsd.py index 347ba8ab5641..e6cfe3ff726c 100644 --- a/sysutils/azure-agent/files/patch-azurelinuxagent_daemon_resourcedisk_freebsd.py +++ b/sysutils/azure-agent/files/patch-azurelinuxagent_daemon_resourcedisk_freebsd.py @@ -1,4 +1,4 @@ ---- azurelinuxagent/daemon/resourcedisk/freebsd.py.orig 2021-05-18 18:30:52 UTC +--- azurelinuxagent/daemon/resourcedisk/freebsd.py.orig 2021-06-24 22:08:50 UTC +++ azurelinuxagent/daemon/resourcedisk/freebsd.py @@ -1,6 +1,7 @@ # Microsoft Azure Linux Agent @@ -76,7 +76,22 @@ device = self.osutil.device_for_ide_port(1) if device is None or device not in disks: -@@ -90,94 +101,195 @@ class FreeBSDResourceDiskHandler(ResourceDiskHandler): +@@ -74,8 +85,12 @@ class FreeBSDResourceDiskHandler(ResourceDiskHandler): + err, output = shellutil.run_get_output( + 'camcontrol periphlist 3:1:0') + if err: +- raise ResourceDiskError( +- "Unable to detect resource disk device:{0}".format(output)) ++ # try again on "0:0:1" ++ err, output = shellutil.run_get_output( ++ 'camcontrol periphlist 0:0:1') ++ if err: ++ raise ResourceDiskError( ++ "Unable to detect resource disk device:{0}".format(output)) + + # 'da1: generation: 4 index: 1 status: MORE\npass2: generation: 4 index: 2 status: LAST\n' + for line in output.split('\n'): +@@ -90,94 +105,195 @@ class FreeBSDResourceDiskHandler(ResourceDiskHandler): raise ResourceDiskError("Unable to detect resource disk device.") logger.info('Resource disk device {0} found.', device)