From nobody Sat Oct 07 06:56:40 2023 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 4S2bgX72Vtz4w05B for ; Sat, 7 Oct 2023 06:56:40 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2bgX5jF0z4QNZ for ; Sat, 7 Oct 2023 06:56:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696661800; a=rsa-sha256; cv=none; b=bEj1aZkolj+A2BcrFY//cMPDy8lI9xgCZ2UPW0U8PJnaW0847cNQZcrfOFg4k7bYyViYJ4 +MsTjhBJG6+b9GtbgvlkP10+dSFkeiovUod5KzixN9AWJekNxlXxE8ntWSngUcdrAcIHS5 vBIb7iB+VxXAW4XCQegT3lBTwzTgt0wABd+WALa1s7FaIiXZDJonGoAc7W1SjY3mOKxBI6 QBUrn5NllAfAUDIr8srLzdYupScAU6+zEDajuVQ7fE1l9T5ASy4lWYsOeb1/NatW+JEvxY OyG4EkyYtTRhmbiZ9SSf/EgIf0K8THlY0a3HsgjPFSyLU929i3V8YTw/R1GpVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696661800; 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: in-reply-to:in-reply-to:references:references; bh=GpHefBprcHEgbOSG4vbKQczokSyhQvoHkIo7EG2fReU=; b=Ko3ZnwLMYr4WCvp7LxlmCmo2JTS5fwuhc0T3zvxvQ1+rgM6XE7h92qV+7ssABSPDmKQasR KwWm5bt5SEQhGoIJMWMP/CagRA/e9qEVpRm09qnX2iteRMSxYbyrTKQ8bOohRICRsACxfi zKefl+xYzMsGlMxcoh2YtNFdmVIgDm/e+ZoYHRveIjw4Mr9SQUEo5NIRe147ufrSKbqB3D MtHcGxgqi3/yMfiwYwEqv2Q3sX4qdIbUrZ6c2Ef8j5LjTITTvrt9pzIefgZivrywjYSjXp cX4f1ulOpL4O93FJsKZu8ev3xf7pI56SCx0PVAlAV+zRLzk2X9fY9YHh+D2uSQ== 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 4S2bgX4fV5z62G for ; Sat, 7 Oct 2023 06:56:40 +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 3976uer3085621 for ; Sat, 7 Oct 2023 06:56:40 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3976uexl085620 for ports-bugs@FreeBSD.org; Sat, 7 Oct 2023 06:56:40 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 274194] sysutils/loki: New rc.d file for promtail Date: Sat, 07 Oct 2023 06:56:40 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed 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: turkay.eren@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: 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: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274194 --- Comment #4 from Eren T=C3=BCrkay --- Created attachment 245475 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D245475&action= =3Dedit first attempt to add rc.d script for promtail Hello, The patch is ready and tested but I've came across a few issues. 2 of them = are port related (I used portfmt and portlint), and the last one is configuration/daemon behavior. SHA2 Mismatch (hashicorp-consul-v1.5.1_GH0.tar.gz) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D I got checksum error on this file. I do not think it should change but I ha= d to build the package with `NO_CHECKSUM=3Dyes` to proceed. When I manually down= load the file, the hash in `distinfo` does not match the one I download. Since I= do not know what's going on with the hash, I did not include it in the patch. ``` $ wget 'https://codeload.github.com/hashicorp/consul/tar.gz/v1.5.1?dummy=3D/hashic= orp-consul-v1.5.1_GH0.tar.gz' -O hashicorp-consul-v1.5.1_GH0.tar.gz $ sha256sum hashicorp-consul-v1.5.1_GH0.tar.gz 7d9a318ca5fe3c5f35adb950750e92dff45a67d5fe37d447f173b4f0f99c095f=20 hashicorp-consul-v1.5.1_GH0.tar.gz ``` Portlint Messages =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D I generated the patch using `make makepatch` but I still get a warning. I k= now portlint can give some false positives but I still wanted to let you know: ``` WARN: Makefile: possible use of absolute pathname "/seed". WARN: Makefile: possible use of absolute pathname "/var/db/${PORTNAME}". WARN: Makefile: possible use of absolute pathname "/var/db/promtail". WARN: /usr/home/ec2-user/ports/sysutils/loki/files/patch-cmd-loki-loki-local-conf= ig.yaml: patch was not generated using ``make makepatch''. It is recommended to use ``make makepatch'' when you need to [re-]generate a patch to ensure proper patch format. WARN: /usr/home/ec2-user/ports/sysutils/loki/files/patch-promtail-local-config.ya= ml: patch was not generated using ``make makepatch''. It is recommended to use ``make makepatch'' when you need to [re-]generate a patch to ensure proper patch format. 0 fatal errors and 5 warnings found. ``` Promtail Stop Behavior =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This one is interesting. Since we include upstream default configuration an= d I do not have loki server installed, promtail has a long retry configuration. Once it reads the file, it cannot find the loki server and starts retrying. When you want to stop the daemon, you wait on `waiting for PIDs` message. I waited for a couple of minutes at first, the daemon did not stop and I interrupted it to stop it again. I thought it was a problem with the rc.d script but it turns out it's related with retry configuration. The defaults are described here: https://grafana.com/docs/loki/latest/send-data/promtail/configuration/#clie= nts min_period: 500ms max_period: 5m max_retries: 10 This means you need to wait at least 5 minutes before promtail finishes retries. I have confirmed it by lowering those values and seeing that max_retries need to be reached before stopping the server. So, if for any reason promtail cannot reach loki and retries, it should finish first. The = sad thing is that you do not see how many retries are left in the log file, you just see `will retry` message and it can be confusing. As someone worked on this package, I know this information but daemon stop behavior can be hard to spot. Do you think it's appropriate to add a note somewhere and refer to the official documentation? Regards, Eren --=20 You are receiving this mail because: You are the assignee for the bug.=