From nobody Fri Oct 11 17:32:45 2024 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XQDGj6pByz5Z9Z7 for ; Fri, 11 Oct 2024 17:32:45 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XQDGj4WdCz59L8 for ; Fri, 11 Oct 2024 17:32:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728667965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ce8Ngugihf5f8BivOMoNm3Ks5/VXEaHaOJIuYMUKTOk=; b=rGeJNyPMJqfq81iT2W72HoenVh2/QCECZ0zMP4zqiy/z/9FioRX7qGp8UQRRAMySjLk4MQ g0VZgwVBTrywVXSuv25nNskeirEE685w+IDXNBgh320NzP+EdqPBQ0brJElcv2Ul47z2Or CowqPnqxpOiEGXX48XYOcDrDqlJHhqM3tpH6T6732F1FZfHhYhLmhjOoqdkQjtg9hO3QK7 cCBrwaHjbWHlq0cWTiYVg8SVrz5CWiWwUgjrDt2Ab7ky9gXjO5lBvTl//bRH2NYoQOPVU1 YJyLaRqUO9EBWu9PTeLEl+pDTtR02/rc92pwmYkCEwbC0Z2uGAa8y7Qnbk95Mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728667965; a=rsa-sha256; cv=none; b=NXOGvBOWtr2oSEw1uqi2Pxd4zbOggDV8DxhCsaHUTMD1AeCq6iaVrf8/HsdggrcmUsDrJA KGMl1hRU4Q/cAqGMix7xNBeCrQLBIGcTOwfekQZT/7K9WbA4qOFzZeV7eYVi4eZyhduy1s lepLP0B+Wekgkqb94b2/Xtc1/RxzzaKj4zhJojQrnBf+ZwaE80oXGq0S7nAOaRuDJANwmU EBSjVUhZUwNieKTSkeIZE+20wpqhIuYbT13xdZzRIM0baQuzNnr5eY9xkA6n7dSB5cnGFs HVALI6fl+Lr6qwQpVVAOOGcVvsu0++qavAJgXuSvvjCjyyOROPNaQkY5ZPXvAA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4XQDGj2YR8zr8Y for ; Fri, 11 Oct 2024 17:32:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 49BHWjjl018157 for ; Fri, 11 Oct 2024 17:32:45 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 49BHWjmw018156 for ports-bugs@FreeBSD.org; Fri, 11 Oct 2024 17:32:45 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 282015] net-mgmt/smartctl_exporter: rc script fails to pick up some devices Date: Fri, 11 Oct 2024 17:32:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: lexi.freebsd@le-fay.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: delphij@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports-bugs@freebsd.org Sender: owner-freebsd-ports-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D282015 Bug ID: 282015 Summary: net-mgmt/smartctl_exporter: rc script fails to pick up some devices Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: delphij@FreeBSD.org Reporter: lexi.freebsd@le-fay.org Flags: maintainer-feedback?(delphij@FreeBSD.org) Assignee: delphij@FreeBSD.org patch to /usr/local/etc/rc.d/smartctl_exporter: --- smartctl_exporter.old 2024-10-11 18:28:43.712179000 +0100 +++ smartctl_exporter 2024-10-11 18:28:53.758091000 +0100 @@ -28,7 +28,7 @@ : ${smartctl_exporter_enable:=3D"NO"} : ${smartctl_exporter_user:=3D"root"} : ${smartctl_exporter_listen_address:=3D"localhost:9633"} -: ${smartctl_exporter_devices:=3D"$(geom disk status -s | cut -f1 -d\ | se= d -e s,^,/dev/,g)"} +: ${smartctl_exporter_devices:=3D"$(geom disk status -s | awk '{print $1}'= | sed -e s,^,/dev/,g)"} : ${smartctl_exporter_log_level:=3D""} : ${smartctl_exporter_log_format:=3D""} rationale: 'geom disk status -s' produces this output: --o<-- # geom disk status -s ada0 N/A N/A ada1 N/A N/A cd0 N/A N/A da4 N/A N/A da6 N/A N/A da0 N/A N/A da7 N/A N/A da5 N/A N/A da3 N/A N/A da2 N/A N/A da1 N/A N/A --o<-- with the current script, that turns into this: --o<-- # geom disk status -s | cut -f1 -d\=20 ada0 ada1 --o<-- in other words, it's replaced all the 'da' entries with blank lines. with awk, this works correctly: --o<-- # geom disk status -s | awk '{print $1}' ada0 ada1 cd0 da4 da6 da0 da7 da5 da3 da2 da1 --o<-- tested with smartctl_exporter 0.12.0_6, FreeBSD 15.0-CURRENT #43 lf/main-n269060-ffd494371643: Tue Sep 17 05:59:59 BST 2024 --=20 You are receiving this mail because: You are the assignee for the bug.=