From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0GzUB0G3d2NiXAAAbAwnHQ (envelope-from ) for ; Fri, 18 Nov 2022 17:48:01 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id +DG6B0G3d2MaXwAA9RJhRA (envelope-from ) for ; Fri, 18 Nov 2022 17:48:01 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C9B0D3FECE for ; Fri, 18 Nov 2022 17:48:00 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ow4Wf-0005Wp-Od; Fri, 18 Nov 2022 11:47:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ow4Wd-0005WM-2S for help-guix@gnu.org; Fri, 18 Nov 2022 11:47:35 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ow4Wc-0002Tn-FB; Fri, 18 Nov 2022 11:47:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=gbk/rBEy5t2+KWkIx3k1AzguVlAyXTnDocTgv0Yy8Jk=; b=HdJdyWgYcgkE65T5MBNQ MzJeXRkMY83j/i1o8eu4fv6RAgzQFwWWpA4pW74INlJPBDIS0+sfRVxO+ez5qA5w4n8VyVoAw58G4 Y/+uy0ckswo63pvPxgl1JsCCetb2nii6/FOUH3XpU2UqGoddiS0nYwHZ3hQneAF1rXb6tJDOLF3+g P8b2gTMowpf3tcXBTtwPATMVS7CHZKLjzkw9FfGareIhDr6B3cvBpFV3wdCYeO6RKqRrmUuWIHwYw gHp5uU7a+qsjVAjSVRQnExzRKeaksBVcDdaOM0SC7m3nY56++PLwjefSN2RuXchVvaOBTi9PWNU8F jqNh75m3mp5A7Q==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ow4Wc-0004yU-1T; Fri, 18 Nov 2022 11:47:34 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Trevor Vallender Cc: help-guix@gnu.org Subject: Re: Configuring nscd cache for mDNS References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Octidi 28 Brumaire an 231 de la =?utf-8?Q?R=C3=A9vol?= =?utf-8?Q?ution=2C?= jour du Coing X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 18 Nov 2022 17:47:31 +0100 In-Reply-To: (Trevor Vallender's message of "Mon, 07 Nov 2022 17:33:44 +0000 (UTC)") Message-ID: <87leo89plo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668790080; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=gbk/rBEy5t2+KWkIx3k1AzguVlAyXTnDocTgv0Yy8Jk=; b=Pb8ljF57NTqvN0ZnM7mr+8R7b0+4zMPHBxQXmGI9kG7qEayldFi51YSXl40d5HPcxKfWme 24x1enWEmFcjWTypvnh1KvtUAbR3lx88KxAEfZ6RaCBvsNFMGn+VJmUCvuqilw61sOZBbp gnS/LPbjcBLJpcWn+w97/hgU4YxadlGF/W5qEz1ag9a3LcuAJLbYWUx27EdaxszcKSszv8 4hP69pWowK09XBM7p5CXedXDzLtYEHfRgR51uC9Ku7LofuYKYCezBhfkEIN7hku0eDl88T BpJ3o9dEf4uv4dWgBFznt9rzwfiXuGBqbuAMVNtfIcazso0oOV3fToCEVF2vpQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668790080; a=rsa-sha256; cv=none; b=ulZPVWaJ2wuyljCoZ7NybenT5h0f8C4POnFZ1UCsHhR35/BP8defpuT8hngdkoLpP/JefL VuXpNQOfzf58lEuY6My1gbjkvkBhLeflUD2OVL1m/FgzsVu3JVK5aVDOPqB/L59Fti+AAJ 8FeZzD0lX/rgmpmkZQTd/If4whi7DtsjHRS+vcy8VozrV3VlpDWn+buQDHyxTx+uXrPWnh lQhsxRuWsMf8OGQXYtEeDD06OnsUgZUqWkYGaC6IQCQWR9jV7biLFtBHyffoytoUxP00io eGGBlPSmfURO6YLLw8q7Bz2Yuf9dugnvO0NSKrKjxPq2MUAcZeUaGKZBCkmbIw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=HdJdyWgY; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -7.72 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=HdJdyWgY; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C9B0D3FECE X-Spam-Score: -7.72 X-Migadu-Scanner: scn0.migadu.com X-TUID: IwuiMEp4US6l Hi Trevor, Trevor Vallender skribis: > I have a Docker container which advertises its name using mDNS, > e.g. hostname.local. However, when I restart the container, > Docker assigns the container a new IP (not sure why, doesn't > happen on other distros but that's probably not the point > here). nscd has the old IP cached and doesn't refresh even though > the container is advertising the new IP. I'm not sure why this > behaviour is occurring, or if it is the expected behaviour? I think so. > I'm don't know the correct fix here but am open to suggestions. I > presume one of the following: > > - Configure nscd not to cache mDNS addresses > - Shorten the length of time these addresses are cached for > > If someone could suggest why this is occurring, or provide an > example of how to do one of the above, that would be brilliant. You can clear nscd=E2=80=99s host name cache with: sudo herd invalidate nscd hosts Better, you can configure nscd to disable caching along these lines: (operating-system ;; =E2=80=A6 (services (modify-services %base-services ;or =E2=80=98%desktop-services=E2=80= =99, etc. (nscd-service-type config =3D> (nscd-configuration (inherit config) (caches '())))))) ;zero caches More details here: https://guix.gnu.org/manual/devel/en/html_node/Base-Services.html#index-n= scd_002dconfiguration HTH! Ludo=E2=80=99.