From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id YKJdMZs/WGcjLwAAqHPOHw:P1 (envelope-from ) for ; Tue, 10 Dec 2024 13:18:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id YKJdMZs/WGcjLwAAqHPOHw (envelope-from ) for ; Tue, 10 Dec 2024 14:18:19 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fastmail.com header.s=fm1 header.b=fkQWTRi+; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=RCw6wmb1; dmarc=pass (policy=none) header.from=fastmail.com; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1733836699; a=rsa-sha256; cv=none; b=ilpDvJ+Y5l8wpofouveQcmmxav/rkAiQeR3PMMOWjUVMLp5gPqwZ4iUYy6KYGj+60nHb7A RrFNoSREIbUJp6JvI8mnIznTgOBtNuvkHWHpowYDsKvRHLpWq4pFfiDfLA3OM9nBY1DrHr b7kVANHftSaJwCqDorCQH6wi4BR7PccGlCH8qIEFFX5YQpJoXyWUQTSS1inZkzVPimMx3I cbIfhvnIsybDcH3s+lbb3V7UOsAMW14y9E5I1TK8DmyxChED+NtxX8KR2ezjrWTDy5TZQf 0PH3JIqrr0OLJS1HnBxXQM3kM6xsGOex70VJ1xGovo4P2n341bU03WcEswhn1A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=fastmail.com header.s=fm1 header.b=fkQWTRi+; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=RCw6wmb1; dmarc=pass (policy=none) header.from=fastmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1733836699; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=A0P4ovdsVC5/bG08Ye7E1auVvNCQBx/QhqxcLhtPNbw=; b=IhLPUZc4+S0GNYEr7lQ0MAtY/e+4vcyPAQ03XrkbYqkcay73n9MYEZMSEskU4RlulBEld2 SdQgpwLJwj/bmz+RDE1l7zkeRwGDk7bVhw2STMto35qqF1dTwN8O3xxkirLgjs6byBbwpT RpAXVtgB2W1u5zzIfPg8RAo0QNlPAygrrf8KXu8BlI84Vz1znPgIfRbEDobh2FDDWMZgXP pkx2dluiiHUnZoz50y8Z5wMNiuOOuB1JXK5vyvClnpZVGERF/8MX8ApwkNBR5InRfgSOIG y472eNeNvT9SbK3PKSbsuVUa3ptVjFg9HzL0d30eixXj+FFvoSqdlog84nDKZQ== 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 215F61C53B for ; Tue, 10 Dec 2024 14:18:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tL07U-00047H-6e; Tue, 10 Dec 2024 08:17:44 -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 1tL07S-00046v-El for help-guix@gnu.org; Tue, 10 Dec 2024 08:17:42 -0500 Received: from fout-b3-smtp.messagingengine.com ([202.12.124.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tL07Q-0000oA-H8 for help-guix@gnu.org; Tue, 10 Dec 2024 08:17:42 -0500 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 3BD011140118 for ; Tue, 10 Dec 2024 08:17:39 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Tue, 10 Dec 2024 08:17:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1733836659; x=1733923059; bh=A0P4ovdsVC5/bG08Ye7E1auVvNCQBx/QhqxcLhtPNbw=; b= fkQWTRi+Oy2HMGSmo867ZcHnzHkExiGGZeiTU/NZ6ORN7jbopr5rLSHR+GIBf0EB BA2YIxvNZ/KMRe/sgkMbxtjM1jhoVK1g7zKtJiRXOh+la+RyfyKUvJqWp8YIgqKj eQGpaiv4NSerYbD09eiEvq4Jnr8EPYb4+yDMRLikrnvLRlHV3TeyFlnPZ5tlITnp qIy3qKGx8Xy9tbpa5vJI9ECVP6hcF6WZhZpFm9WIqBAkyybdLR+ji1NdBry4Z6ij 9jaqNLvsc1OXYoBmjCzc24IwoNqGZL5h3wR8svncfKBtSMEQRHBQFHgJfjicCvbp w6e/jo3+i7V8d8k0f4dCjQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1733836659; x=1733923059; bh=A 0P4ovdsVC5/bG08Ye7E1auVvNCQBx/QhqxcLhtPNbw=; b=RCw6wmb1U76B67eFv VDUP95XiiKitLNFhzAwTXyeC0zomI2v1Kl+nNtf0geFnicZFlsnj/cH0gPGDhcnK HJ6gSSrxX9hMNIrX1RFauCoKmbhncNBzCSJklHl3Dhu8nD/ytBPqLBgAk8wJ/dF9 AXEweJGNjtIgYfQURz8DHOzqdsLDnb8c4rKVtluJP11bbkss6hzqh+mry890nGnx /xwsVEZdIwqYQEqJIXpFDxuH/tkMPe8tsZ6CTdaV5tDCqVr3uRBGCC8KRU8XQWXM ihvaAGDZQ5uszRwpIyTTn9fm8YzjPFdAcKrx4ier3OFjGhlmkt6iaowJaNg/MLrt oGY4A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrjeekgdeglecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuf fvfhfhjggtgfesthekredttddvjeenucfhrhhomheplfgvshhsvgcuofhilhhlfihoohgu uceojhgvshhsvggpmhesfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpe ehgfeuvdevveefveevheektdduudduieetgeevteetfeeiudevvedtheehgfduhfenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjvghsshgvpg hmsehfrghsthhmrghilhdrtghomhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhht phhouhhtpdhrtghpthhtohephhgvlhhpqdhguhhigiesghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: i57f947b1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 10 Dec 2024 08:17:38 -0500 (EST) Message-ID: Date: Tue, 10 Dec 2024 08:17:38 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Debugging Shepherd Daemon. Possible escape char issue. To: help-guix@gnu.org References: From: Jesse Millwood Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=202.12.124.146; envelope-from=jesse_m@fastmail.com; helo=fout-b3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 X-Migadu-Spam-Score: -6.17 X-Spam-Score: -6.17 X-Migadu-Queue-Id: 215F61C53B X-Migadu-Scanner: mx12.migadu.com X-TUID: Mo4PB3EW7TSK Actually I'm not sure what my issue was before but I have this working as the extra arguments:    (extra-arguments     '("--label"       "traefik.http.routers.whoami.rule=Host(`whoami.geekslab`)")) Didn't have to wrap the whole thing in escaped quotes and used backticks for the go lang string literal in the rule. On 12/10/24 07:11, Jesse Millwood wrote: > For what it's worth I figured this out with help from giacomo of the > gocix project. He has a really neat herd action where you can query > the command line invocation that was used. That helped quite a bit to > figure out what the issue was. Turns out for passing labels to the > docker invocation you have to wrap the argument in escaped quotes so > that the whole thing is passed to the --label argument as a string: > >                      (oci-extra-arguments >                       '("--label" > "\"traefik.http.routers.whoami.rule=Host(`whoami.geekslab`)\"")) > > The backticks used here are because that is a string literal that is > evaluated by docker, which is written in the Go programming language. > > Jesse > > > On 11/29/24 14:08, Jesse Millwood wrote: >> Hello, >> >> I am trying to run some docker services as an >> oci-service-configuration entry. >> >> I have one simple one running fine. However the one that I am having >> trouble with, I assume is an issue with quoting and escaping. I don't >> see any issue in /var/log/messages. I'd like to be able to see the >> actual command that Shepherd is trying to run. Is there a way to do >> that? >> >> The Shepherd service I am trying to run is this: >> >> >> (service oci-container-service-type >>   (list >>    (oci-container-configuration >>     (image "traefik/whoami") >>     (network "traefik-network") >>     (extra-arguments >>      '("--label" >> "traefik.http.routers.whoami.rule=Host\(\\\"whoami.geekslab\\\")")) >>     (log-file "/var/docker.whoami.log") >>    ) >> )) >> >> The only feedback I get is this: >> >> admin@geekslab ~/geekslab/scripts$ sudo herd status docker-whoami >> Status of docker-whoami: >>  It is stopped. >>  It is enabled. >>  Provides (docker-whoami). >>  Requires (dockerd user-processes). >>  Will not be respawned. >> >> admin@geekslab ~/geekslab/scripts$ sudo herd start docker-whoami >>  Service user-homes has been started. >>  Service dockerd depends on elogind. >>  Service docker-whoami depends on dockerd. >>  herd: error: failed to start service docker-whoami >> >> As stated before, nothing in /var/log/messages. I'm not sure where >> else to look. I feel like I'm missing something when trying to debug >> Shepherd services. I've also tried a lot of different combinations of >> escapes and such. >> >> If I run the following from the shell though, it works fine: >> >> sudo docker run --rm --name whoami --label >> "traefik.http.routers.whoami.rule=Host(\"whoami.geekslab\")" >> traefik/whoami >> >> Notice the escaped quotes that need to be passed through. I am >> essentially trying to daemonize this docker run command. >> >> Any Shepherd pointers here would be appreciated! >> > >