From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 14 15:17:40 2025 Received: (at submit) by debbugs.gnu.org; 14 Mar 2025 19:17:40 +0000 Received: from localhost ([127.0.0.1]:36296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ttAXM-0000Xm-23 for submit@debbugs.gnu.org; Fri, 14 Mar 2025 15:17:40 -0400 Received: from lists.gnu.org ([2001:470:142::17]:58244) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ttAXJ-0000XS-B3 for submit@debbugs.gnu.org; Fri, 14 Mar 2025 15:17:38 -0400 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 1ttAXA-0007pS-RW for guix-patches@gnu.org; Fri, 14 Mar 2025 15:17:29 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ttAX5-0004D3-7m for guix-patches@gnu.org; Fri, 14 Mar 2025 15:17:28 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5e66407963fso4224194a12.2 for ; Fri, 14 Mar 2025 12:17:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1741979837; x=1742584637; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/WZ5FbNcS4Ul1fW9a8yiecJaNl4rqku+Bd5wjtV6KUo=; b=LMN605d4dNXOLjR+dj69tZlqd0r9lqQlWuROmjbixd5IW4iDUiT4pfXfElf9r00V9R Y1Y6rDgP6n/oCr47jnCYloyBpRHprZ5u5+r9dvyByW3l6RrDCi3oE+3U2c7RxiBg/SBG uAieVOtl/sCLnpXm+ZNKaTD8h9JXZdqlEGfq0MII/Dr9XMTQp7F/4rcYmxdaYb0nnjxr ZOWpErF762iLaM9wCkouqo4vTJmgCTS+DwwtJjfpBp9oOpcdEUqJC25fZ17um9avB3u6 oka60/xCWqITZa+0F69+KdCApAxsYcVULOgCGLPz0VlV1ridFg/YlDzkBRUR19iGgUa+ N4Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741979837; x=1742584637; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/WZ5FbNcS4Ul1fW9a8yiecJaNl4rqku+Bd5wjtV6KUo=; b=R3CWvEnpgguemz4YWxv3zxysatYEUNJ3Nire8Tc/oSNpIT1O5SSLgVU7hZBPK3JcjU SJ7azaP3nCXGkh7XRp8sZFWPSpL80PlcIlehzPh1PaTNrsoS74zOWpnWElMoKOHFH1z5 4aUTJmX+ZoA2WXKHSszFTodRfaeRdtENB7TVgJ1KRlKrQDcESdg4QRFga7yKP0lYIA70 Gt4N85lmUZZ47FBV1idtqFrrAEYS9FLwQYf7Mz2vQanm7m8skO0lJMIGkmhhZusbWBrk BlTtUowH5r1tHroZ4cknu/M2WuryRKdf6gg6f2VrliyodihZDwdbVDenqA0S1RT5CUIV Zvfw== X-Gm-Message-State: AOJu0YxuXzaQm8Cyvjca3o32q++wo4zoE5/sDS6b7DO+u6hZ+6HpYvXO jnvVoBbYyFD0IvSXJ2o49Q963hmbpiFmwemzkk0nIqbvC+EM1c2ZeM0zmc/pluYq3xBydrZU+BU YveE= X-Gm-Gg: ASbGncuBrLj4UdEJU0vmHmR464API/1y9mga/VGULjbglu/OeswFL2GNntcbEFZyy+Z ipINXZKwz5Ggp3W6JxDSYzuuvQJyWDH7ZRwLvdl4lVBHSw6K+oc1z9ag9+4TKxgb3TFnQkDghHT 1QTv+oIKbXmFiXOGTgJjMGW5Ky5Tiv0Md7KwAJdSbkh1RbBqBl7acvpLC7hEJju+s5x2GGGfPLS zm9TKPbkgpaadOB/5UXxP1cE7u3eq2bwRVXXcw8k8wt16MTkbmL0xw1b5qvdwxRoGNEsk6kPOEa yK4vKQDGxa15ASxDhJiJtB7BScrHGEoK64Hb5eldUA== X-Google-Smtp-Source: AGHT+IGQRU5orZqnVQB4LBHimFPWTqg39jW0WbzK3OJ0c80QIRlX5hyH7+13CzUtUEAbY//uU5Dcuw== X-Received: by 2002:a05:6402:3550:b0:5dc:cfc5:9305 with SMTP id 4fb4d7f45d1cf-5e8a04269acmr4201365a12.25.1741979836230; Fri, 14 Mar 2025 12:17:16 -0700 (PDT) Received: from localhost ([2a02:2454:a0a5:2400:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5e816afdfdbsm2256540a12.74.2025.03.14.12.17.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 12:17:15 -0700 (PDT) From: Sergey Trofimov To: guix-patches@gnu.org Subject: [PATCH 0/1] machine: hetzner: Allow attaching existing public IPs. Date: Fri, 14 Mar 2025 20:17:11 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 X-Debbugs-Cc: Ludovic Courtès , Maxim Cournoyer , Roman Scherer Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=sarg@sarg.org.ru; helo=mail-ed1-x535.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This patch allows attaching existing IP addresses to hetzner VMs. Use it when a static IP address is necessary on the VM. While testing it I've found out that `guile-json` doesn't support nullable fields, so it is not possible to disable v4 or v6 addresses currently (e.g. `(ipv4 #f)`). See https://github.com/aconchillo/g [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.1 URIBL_SBL_A Contains URL's A record listed in the Spamhaus SBL blocklist [URIs: sarg.org.ru] 0.6 URIBL_SBL Contains an URL's NS IP listed in the Spamhaus SBL blocklist [URIs: sarg.org.ru] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Debbugs-Envelope-To: submit Cc: Sergey Trofimov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) This patch allows attaching existing IP addresses to hetzner VMs. Use it when a static IP address is necessary on the VM. While testing it I've found out that `guile-json` doesn't support nullable fields, so it is not possible to disable v4 or v6 addresses currently (e.g. `(ipv4 #f)`). See https://github.com/aconchillo/guile-json/issues/87 for details. Sergey Trofimov (1): machine: hetzner: Allow attaching existing public IPs. doc/guix.texi | 10 ++++++++++ gnu/machine/hetzner.scm | 25 +++++++++++++++++++++++++ gnu/machine/hetzner/http.scm | 35 +++++++++++++++++++++++++++++------ 3 files changed, 64 insertions(+), 6 deletions(-) base-commit: 9449ab3c2025820d2e6fd679fa7e34832b667ea7 -- 2.48.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 14 15:46:38 2025 Received: (at 77019) by debbugs.gnu.org; 14 Mar 2025 19:46:39 +0000 Received: from localhost ([127.0.0.1]:36351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ttAzK-00024q-D6 for submit@debbugs.gnu.org; Fri, 14 Mar 2025 15:46:38 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:43098) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1ttAzG-00024T-6H for 77019@debbugs.gnu.org; Fri, 14 Mar 2025 15:46:32 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-ac297cbe017so644989866b.0 for <77019@debbugs.gnu.org>; Fri, 14 Mar 2025 12:46:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1741981583; x=1742586383; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Hg1xQj8MfgZXpcXeoqwM5WTGx071dplv/GKTJxlYHZg=; b=pWnoTaStN+WaN3B50qQi0wY8wsZv9QNl0UzhZZhxXLRMggfMBWJ95u33iDvh82zMtw s+0fkYY1aFD44hzPIzX2bmBKJkff+OOaWvCmPHfy/aJ9FsyhOwqrsUmgw2rg17n2shFo DQzte66NT/FOU7wNpEFyZDNPPzUEVIXuRa/5cMlZLn5tteqOe677AWo2e9XPo8Q/rVQS xsAfII79HRHEwsXfIbMI7PEKYMjUMFR7ErQwJqoSWnUHC5sAWLluWewwzgzKxjlBcxNC Nbz2BCiiKqGYIprXalThffJAvxXKC/kZ7mtK4AcaImq1NW1f0zoumDmSg27PEvhMpLiY lUCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741981583; x=1742586383; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Hg1xQj8MfgZXpcXeoqwM5WTGx071dplv/GKTJxlYHZg=; b=G/o59vm7Iun/PFkTZDQ8opVTETgpRFBjcBM5a5y3UqKH7Rmpw7AZG8nz3s1qon/7ms +Y1GuHiFWpGw62hR3fGedU/qC5ZQEsToMp5CG3BycFWYhq7kQfvqaLpOK3Wbt6/RMA5A HXrdGxw5DU6Xy4gLTfomQl17T0Z0xJlEJO2ejGTtx1ebhGkwaXpbWkDtMK+ZivsWEhcI 3UEJdXY1wtlc3+gIp7DN/PYXdagm/NhErsfAoJpnfdYVWvROtJrmZ2kFs6KZ+7xLyeE8 z9c3bVvEFX47dDFHVkIH/vX/pqYksYYCcuVUya59gNa6FS8zpLuTryvlvku3tdXjcGzO fg0Q== X-Gm-Message-State: AOJu0YzoEKRWgpOq1tnf+yzJ2Ojj31uq3LKpw6E+Ego61evtA0d/qNL3 We/Sue6LrjIwQ5EqNEg8lTD1oIIB1AhoaDcF9T5lagnzUjX3HwIC2KCtiFjkbUknxodnnYr/ig9 oc58= X-Gm-Gg: ASbGncvY7D/UqtDgJPYqJWNM1ljpCQv7eEU0PfdDlxpP9SG9fYuxp3tZpKuwjOaML/D BP5ZM9PxTHdmkJGPlhLNwfXaGIyNa7yk5X0P9cznLbwjvVz6P0AOCkARbjtVa/75JI0TpQGet5i 9bpTahP51uxqmY+XpeJ4+13hrQ8wojEZQ8/wt5XPeVEThZGu5+UbLEU0pnqnyLI/Xkp5FDhxiA8 vgHXyzk5Hwnh20BX5u26nVj0isTeoKJ9tf8x/9qF9z4ne+JXe/D+udn8pLrr3+sQ0VMaxVWIFUy BnLedZzsvyFF5kDPEf4y0WYeDwyWx9dVb3M/Z/Mu/YJjn/42b92A X-Google-Smtp-Source: AGHT+IFT5FSz7nP3N4wMGmVSUE9x4qVvYzqO/PvDs/p9ijwf86VCZJ3X8ZSvmEBKhKXH4qMV4oOwHA== X-Received: by 2002:a17:907:7fa6:b0:abf:742e:1fde with SMTP id a640c23a62f3a-ac331377bf4mr431426966b.14.1741981582690; Fri, 14 Mar 2025 12:46:22 -0700 (PDT) Received: from localhost ([2a02:2454:a0a5:2400:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ac3147f142fsm266414266b.64.2025.03.14.12.46.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 12:46:22 -0700 (PDT) From: Sergey Trofimov To: 77019@debbugs.gnu.org Subject: [PATCH] machine: hetzner: Allow attaching existing public IPs. Date: Fri, 14 Mar 2025 20:46:16 +0100 Message-ID: <9f04c5e5955ef1115effce2f3b332091ec149b2a.1741981547.git.sarg@sarg.org.ru> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 X-Debbugs-Cc: Sergey Trofimov , Ludovic Courtès , Maxim Cournoyer , Roman Scherer Content-Transfer-Encoding: 8bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 77019 Cc: Sergey Trofimov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) * gnu/machine/hetzner.scm (hetzner-configuration): Add ipv4 and ipv6 fields. Export accessors. * gnu/machine/hetzner/http.scm (hetnzer-api-primary-ips): New function. (): New json mapping. (hetzner-api-server-create): Pass IP addresses in request. * doc/guix.texi: Document it. --- doc/guix.texi | 10 ++++++++++ gnu/machine/hetzner.scm | 25 +++++++++++++++++++++++++ gnu/machine/hetzner/http.scm | 35 +++++++++++++++++++++++++++++------ 3 files changed, 64 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 49ac018913..4a35f3ea13 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -45919,6 +45919,16 @@ Invoking guix deploy provisioning phase. If false, the server will be kept in order to debug any issues. +@item @code{ipv4} (default: @code{'create}) +When false, no public IPv4 address is going to be attached. Specify the +name of an existing primary ip to attach it to the machine. Other values +would create a new address automatically. + +@item @code{ipv6} (default: @code{'create}) +When false, no public IPv6 address is going to be attached. Specify the +name of an existing primary ip to attach it to the machine. Other values +would create a new address automatically. + @item @code{labels} (default: @code{'()}) A user defined alist of key/value pairs attached to the SSH key and the server on the Hetzner API. Keys and values must be strings, diff --git a/gnu/machine/hetzner.scm b/gnu/machine/hetzner.scm index e8484e4d51..c1ccab54ae 100644 --- a/gnu/machine/hetzner.scm +++ b/gnu/machine/hetzner.scm @@ -73,6 +73,8 @@ (define-module (gnu machine hetzner) hetzner-configuration-authorize? hetzner-configuration-build-locally? hetzner-configuration-delete? + hetzner-configuration-ipv4 + hetzner-configuration-ipv6 hetzner-configuration-labels hetzner-configuration-location hetzner-configuration-server-type @@ -205,6 +207,10 @@ (define-record-type* hetzner-configuration (default "fsn1")) (server-type hetzner-configuration-server-type ; string (default "cx42")) + (ipv4 hetzner-configuration-ipv4 + (default 'create)) + (ipv6 hetzner-configuration-ipv6 + (default 'create)) (ssh-public-key hetzner-configuration-ssh-public-key ; public-key | string (thunked) (default (public-key-from-file (hetzner-configuration-ssh-key this-hetzner-configuration))) @@ -445,6 +451,17 @@ (define (hetzner-machine-server machine) (hetzner-configuration-api config) #:params `(("name" . ,(machine-display-name machine))))))) +(define (hetzner-resolve-ip api name) + "Find the NAME IP address on the Hetzner API." + (or + (find (lambda (primary-ip) + (equal? name (hetzner-primary-ip-name primary-ip))) + (hetzner-api-primary-ips api #:params `(("name" . ,name)))) + + (raise-exception + (formatted-message (G_ "primary ip '~a' does not exist.") + name)))) + (define (hetzner-machine-create-server machine) "Create the Hetzner server for MACHINE." (let* ((config (machine-configuration machine)) @@ -452,11 +469,19 @@ (define (hetzner-machine-create-server machine) (server-type (hetzner-configuration-server-type config))) (format #t "creating '~a' server for '~a'...\n" server-type name) (let* ((ssh-key (hetzner-machine-ssh-key machine)) + (ipv4 (hetzner-configuration-ipv4 config)) + (ipv6 (hetzner-configuration-ipv6 config)) (api (hetzner-configuration-api config)) (server (hetzner-api-server-create api (machine-display-name machine) (list ssh-key) + #:ipv4 (if (string? ipv4) + (hetzner-primary-ip-id (hetzner-resolve-ip api ipv4)) + ipv4) + #:ipv6 (if (string? ipv6) + (hetzner-primary-ip-id (hetzner-resolve-ip api ipv6)) + ipv4) #:labels (hetzner-configuration-labels config) #:location (hetzner-configuration-location config) #:server-type (hetzner-configuration-server-type config))) diff --git a/gnu/machine/hetzner/http.scm b/gnu/machine/hetzner/http.scm index 51b4bff984..6a82558fbe 100644 --- a/gnu/machine/hetzner/http.scm +++ b/gnu/machine/hetzner/http.scm @@ -52,6 +52,7 @@ (define-module (gnu machine hetzner http) hetzner-api-actions hetzner-api-create-ssh-key hetzner-api-locations + hetzner-api-primary-ips hetzner-api-request-body hetzner-api-request-headers hetzner-api-request-method @@ -100,6 +101,13 @@ (define-module (gnu machine hetzner http) hetzner-location-name hetzner-location-network-zone hetzner-location? + hetzner-primary-ip + hetzner-primary-ip-created + hetzner-primary-ip-id + hetzner-primary-ip-ip + hetzner-primary-ip-labels + hetzner-primary-ip-name + hetzner-primary-ip-type hetzner-public-net hetzner-public-net-ipv4 hetzner-public-net-ipv6 @@ -296,6 +304,15 @@ (define-json-mapping (name hetzner-server-type-name) ; string (storage-type hetzner-server-type-storage-type "storage_type")) ; string +(define-json-mapping + make-hetzner-primary-ip hetzner-primary-ip? json->hetzner-primary-ip + (created hetzner-primary-ip-created "created" string->time) ; time + (id hetzner-primary-ip-id) ; integer + (ip hetzner-primary-ip-ip) ; string + (labels hetzner-primary-ip-labels) ; alist of string/string + (name hetzner-primary-ip-name) ; string + (type hetzner-primary-ip-type)) ; string + (define-json-mapping make-hetzner-ssh-key hetzner-ssh-key? json->hetzner-ssh-key (created hetzner-ssh-key-created "created" string->time) ; time @@ -581,12 +598,11 @@ (define* (hetzner-api-locations api . options) (define* (hetzner-api-server-create api name ssh-keys #:key - (enable-ipv4? #t) - (enable-ipv6? #t) + (ipv4 #f) + (ipv6 #f) (image %hetzner-default-server-image) (labels '()) (location %hetzner-default-server-location) - (public-net #f) (server-type %hetzner-default-server-type) (start-after-create? #f)) "Create a server with the Hetzner API." @@ -595,9 +611,11 @@ (define* (hetzner-api-server-create #:body `(("image" . ,image) ("labels" . ,labels) ("name" . ,name) - ("public_net" - . (("enable_ipv4" . ,enable-ipv4?) - ("enable_ipv6" . ,enable-ipv6?))) + ("public_net" . + (("enable_ipv4" . ,(and ipv4 #t)) + ("enable_ipv6" . ,(and ipv6 #t)) + ,@(if (integer? ipv4) `(("ipv4" . ,ipv4)) '()) + ,@(if (integer? ipv6) `(("ipv6" . ,ipv6)) '()))) ("location" . ,location) ("server_type" . ,server-type) ("ssh_keys" . ,(apply vector (map hetzner-ssh-key-id ssh-keys))) @@ -658,6 +676,11 @@ (define* (hetzner-api-ssh-keys api . options) (apply hetzner-api-list api "/ssh_keys" "ssh_keys" json->hetzner-ssh-key options)) +(define* (hetzner-api-primary-ips api . options) + "Get Primary IPs from the Hetzner API." + (apply hetzner-api-list api "/primary_ips" "primary_ips" + json->hetzner-primary-ip options)) + (define* (hetzner-api-server-types api . options) "Get server types from the Hetzner API." (apply hetzner-api-list api "/server_types" "server_types" base-commit: 412f411d4f8780e6b60b448caae17f01c09be0eb -- 2.48.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 20 02:50:34 2025 Received: (at 77019) by debbugs.gnu.org; 20 Mar 2025 06:50:34 +0000 Received: from localhost ([127.0.0.1]:54978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tv9jd-0001lt-8v for submit@debbugs.gnu.org; Thu, 20 Mar 2025 02:50:33 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:44112) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tv9jZ-0001lb-N8 for 77019@debbugs.gnu.org; Thu, 20 Mar 2025 02:50:31 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-ac2ed007aacso108278066b.0 for <77019@debbugs.gnu.org>; Wed, 19 Mar 2025 23:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1742453423; x=1743058223; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Kw81YzkTPQHFS9zHq7GpiX0BN4jLBIUnXyxgxrW4Kgg=; b=t7lwk7X54q6ZPtS53BdKr3srZFjkbtdLTssa6HPlMcjdW1fk4gc1s/9LciNoA3LVQp d3D4SzJtW/xAd4jN334P4RnNIhcg+O3wfzDKEy5NTngN3Gei4hLwB/Z8nlyCD1u4MZ7Z vS8BXUegCsqf5d2GY8Y11lzr5wFsjqU7sCfNPSbuQEG/OzW7bmpjpgVnBq59WuPYIMoQ qdlC1Ofjr1yx0h6RZXUwJYy1CmucMW907k0JjQuigr58k/1G/FD59XOdkJle4Oa7d57M csXwveqBP6I3y2mt7sNT4hBxvB7wQtenoRHyQQunslQkjqYGp8EtYL4aSibD8SchANr5 lvbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742453423; x=1743058223; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Kw81YzkTPQHFS9zHq7GpiX0BN4jLBIUnXyxgxrW4Kgg=; b=Q+u5vbxAGiYvSSnjKgv2DN3itnWNVQTU0HHSqU8hypofrz/IN0d3M2CQRr96w7ukMS 4I8TgQ0eTkpIUaGtng3jLv8oY7SrnkKtNG3ZXXxbiLYRmhkf1pdNkpFXN4beDKgv/vAE N6/6sZF5fK+qthdcozd1W7BhEPXs6jzJP8YAEf0CFuyB6QqayL4wIS9xbWIzFF3ECd2f gZDBK2R8fC482uH25Q8bAtG7kZ1LpC/xb9iGG6zkXtgnptFK/n8ffnFMUZV3zmFURjEY 0kyHh1ikhfHCq5i/VS4KQJSqKhI+Imh1lv4jy/ywdBgDI/F/72c77y1hu+sDSIV/Fbok v4LQ== X-Gm-Message-State: AOJu0YxB4qaVzI1lkTx62qEizBN2WeDvJTdyl6NhDfCykHZQMGSR2XwW 3eo+R1EnyqEEAzGVGXHqoYtoiiTwz183onDFxbmrKMgXMtyT/Pej6XDXmUcag1LqguXhHI72ar0 zQhI= X-Gm-Gg: ASbGncvCW9xj7oolIUGypNZFX61ggZXXZuVVot6Ez01Rgs3uM91LvoiKYpS3mD73k4k EGmKrzSXx36ZJcQNnEefzmSmDFZxV2kni+jIULbAB4U5AbE0ND/AWZI3lb2z1tb3Q0ZhsddHAOk RZrsuj7JZFnymxlXeNeODgOFXwyVcolgHQhYsjhOY8DYijXfIPWRJYaTcK07hRp7fr0kdtnVpKC +KqtPJVpVS4bCHYxA7ZMr+s8MdfpEm57I041+SC4bz82apely8zXHaPYAzOA3PGHYgMuvkc8jkh 10H+zVZW9yocTcjLABFAEAR+lA4yAEB9hvq2n1MvtQ== X-Google-Smtp-Source: AGHT+IERm/7ba5lXQbpJbq0VogoTgjyCzlUtgBf+Pbv1sBA3i7hS7beqizMBCiuswLB7qBp0UnAtnQ== X-Received: by 2002:a17:907:6ea9:b0:ac2:dc00:b34d with SMTP id a640c23a62f3a-ac3b7ff500cmr588956066b.53.1742453422880; Wed, 19 Mar 2025 23:50:22 -0700 (PDT) Received: from localhost ([2a02:2454:a0a5:2400:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ac3b2b94da0sm240170066b.148.2025.03.19.23.50.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Mar 2025 23:50:22 -0700 (PDT) From: Sergey Trofimov To: 77019@debbugs.gnu.org Subject: [PATCH v1] machine: hetzner: Allow attaching existing public IPs. Date: Thu, 20 Mar 2025 07:50:18 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 X-Debbugs-Cc: Sergey Trofimov , Ludovic Courtès , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 77019 Cc: Sergey Trofimov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) * gnu/machine/hetzner.scm (hetzner-configuration): Add ipv4 and ipv6 fields. Export accessors. * gnu/machine/hetzner/http.scm (hetnzer-api-primary-ips): New function. (): New json mapping. (hetzner-api-server-create): Pass IP addresses in request. * doc/guix.texi: Document it. --- doc/guix.texi | 10 +++++++++ gnu/machine/hetzner.scm | 25 ++++++++++++++++++++++ gnu/machine/hetzner/http.scm | 36 ++++++++++++++++++++++++++------ tests/machine/hetzner/http.scm | 38 ++++++++++++++++++++++++++++++++++ 4 files changed, 103 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e5894931ff..9352c56563 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -45962,6 +45962,16 @@ Invoking guix deploy provisioning phase. If false, the server will be kept in order to debug any issues. +@item @code{ipv4} (default: @code{'create}) +When false, no public IPv4 address is going to be attached. Specify the +name of an existing primary ip to attach it to the machine. Other values +would create a new address automatically. + +@item @code{ipv6} (default: @code{'create}) +When false, no public IPv6 address is going to be attached. Specify the +name of an existing primary ip to attach it to the machine. Other values +would create a new address automatically. + @item @code{labels} (default: @code{'()}) A user defined alist of key/value pairs attached to the SSH key and the server on the Hetzner API. Keys and values must be strings, diff --git a/gnu/machine/hetzner.scm b/gnu/machine/hetzner.scm index e8484e4d51..c1ccab54ae 100644 --- a/gnu/machine/hetzner.scm +++ b/gnu/machine/hetzner.scm @@ -73,6 +73,8 @@ (define-module (gnu machine hetzner) hetzner-configuration-authorize? hetzner-configuration-build-locally? hetzner-configuration-delete? + hetzner-configuration-ipv4 + hetzner-configuration-ipv6 hetzner-configuration-labels hetzner-configuration-location hetzner-configuration-server-type @@ -205,6 +207,10 @@ (define-record-type* hetzner-configuration (default "fsn1")) (server-type hetzner-configuration-server-type ; string (default "cx42")) + (ipv4 hetzner-configuration-ipv4 + (default 'create)) + (ipv6 hetzner-configuration-ipv6 + (default 'create)) (ssh-public-key hetzner-configuration-ssh-public-key ; public-key | string (thunked) (default (public-key-from-file (hetzner-configuration-ssh-key this-hetzner-configuration))) @@ -445,6 +451,17 @@ (define (hetzner-machine-server machine) (hetzner-configuration-api config) #:params `(("name" . ,(machine-display-name machine))))))) +(define (hetzner-resolve-ip api name) + "Find the NAME IP address on the Hetzner API." + (or + (find (lambda (primary-ip) + (equal? name (hetzner-primary-ip-name primary-ip))) + (hetzner-api-primary-ips api #:params `(("name" . ,name)))) + + (raise-exception + (formatted-message (G_ "primary ip '~a' does not exist.") + name)))) + (define (hetzner-machine-create-server machine) "Create the Hetzner server for MACHINE." (let* ((config (machine-configuration machine)) @@ -452,11 +469,19 @@ (define (hetzner-machine-create-server machine) (server-type (hetzner-configuration-server-type config))) (format #t "creating '~a' server for '~a'...\n" server-type name) (let* ((ssh-key (hetzner-machine-ssh-key machine)) + (ipv4 (hetzner-configuration-ipv4 config)) + (ipv6 (hetzner-configuration-ipv6 config)) (api (hetzner-configuration-api config)) (server (hetzner-api-server-create api (machine-display-name machine) (list ssh-key) + #:ipv4 (if (string? ipv4) + (hetzner-primary-ip-id (hetzner-resolve-ip api ipv4)) + ipv4) + #:ipv6 (if (string? ipv6) + (hetzner-primary-ip-id (hetzner-resolve-ip api ipv6)) + ipv4) #:labels (hetzner-configuration-labels config) #:location (hetzner-configuration-location config) #:server-type (hetzner-configuration-server-type config))) diff --git a/gnu/machine/hetzner/http.scm b/gnu/machine/hetzner/http.scm index 51b4bff984..33f501f53a 100644 --- a/gnu/machine/hetzner/http.scm +++ b/gnu/machine/hetzner/http.scm @@ -52,6 +52,7 @@ (define-module (gnu machine hetzner http) hetzner-api-actions hetzner-api-create-ssh-key hetzner-api-locations + hetzner-api-primary-ips hetzner-api-request-body hetzner-api-request-headers hetzner-api-request-method @@ -100,6 +101,13 @@ (define-module (gnu machine hetzner http) hetzner-location-name hetzner-location-network-zone hetzner-location? + hetzner-primary-ip + hetzner-primary-ip-created + hetzner-primary-ip-id + hetzner-primary-ip-ip + hetzner-primary-ip-labels + hetzner-primary-ip-name + hetzner-primary-ip-type hetzner-public-net hetzner-public-net-ipv4 hetzner-public-net-ipv6 @@ -144,6 +152,7 @@ (define-module (gnu machine hetzner http) make-hetzner-ipv6 make-hetzner-location make-hetzner-public-net + make-hetzner-primary-ip make-hetzner-resource make-hetzner-server make-hetzner-server-type @@ -296,6 +305,15 @@ (define-json-mapping (name hetzner-server-type-name) ; string (storage-type hetzner-server-type-storage-type "storage_type")) ; string +(define-json-mapping + make-hetzner-primary-ip hetzner-primary-ip? json->hetzner-primary-ip + (created hetzner-primary-ip-created "created" string->time) ; time + (id hetzner-primary-ip-id) ; integer + (ip hetzner-primary-ip-ip) ; string + (labels hetzner-primary-ip-labels) ; alist of string/string + (name hetzner-primary-ip-name) ; string + (type hetzner-primary-ip-type)) ; string + (define-json-mapping make-hetzner-ssh-key hetzner-ssh-key? json->hetzner-ssh-key (created hetzner-ssh-key-created "created" string->time) ; time @@ -581,12 +599,11 @@ (define* (hetzner-api-locations api . options) (define* (hetzner-api-server-create api name ssh-keys #:key - (enable-ipv4? #t) - (enable-ipv6? #t) + (ipv4 #f) + (ipv6 #f) (image %hetzner-default-server-image) (labels '()) (location %hetzner-default-server-location) - (public-net #f) (server-type %hetzner-default-server-type) (start-after-create? #f)) "Create a server with the Hetzner API." @@ -595,9 +612,11 @@ (define* (hetzner-api-server-create #:body `(("image" . ,image) ("labels" . ,labels) ("name" . ,name) - ("public_net" - . (("enable_ipv4" . ,enable-ipv4?) - ("enable_ipv6" . ,enable-ipv6?))) + ("public_net" . + (("enable_ipv4" . ,(and ipv4 #t)) + ("enable_ipv6" . ,(and ipv6 #t)) + ,@(if (integer? ipv4) `(("ipv4" . ,ipv4)) '()) + ,@(if (integer? ipv6) `(("ipv6" . ,ipv6)) '()))) ("location" . ,location) ("server_type" . ,server-type) ("ssh_keys" . ,(apply vector (map hetzner-ssh-key-id ssh-keys))) @@ -658,6 +677,11 @@ (define* (hetzner-api-ssh-keys api . options) (apply hetzner-api-list api "/ssh_keys" "ssh_keys" json->hetzner-ssh-key options)) +(define* (hetzner-api-primary-ips api . options) + "Get Primary IPs from the Hetzner API." + (apply hetzner-api-list api "/primary_ips" "primary_ips" + json->hetzner-primary-ip options)) + (define* (hetzner-api-server-types api . options) "Get server types from the Hetzner API." (apply hetzner-api-list api "/server_types" "server_types" diff --git a/tests/machine/hetzner/http.scm b/tests/machine/hetzner/http.scm index 618d9a4c94..6c6d848a57 100644 --- a/tests/machine/hetzner/http.scm +++ b/tests/machine/hetzner/http.scm @@ -239,6 +239,30 @@ (define server-x86-alist ("status" . "running") ("volumes" . #()))) +(define primary-ip + (make-hetzner-primary-ip + #(55 2 19 28 9 123 6 300 -1 0 #f) + 42 + "131.232.99.1" + '() + "static-ip" + "ipv4")) + +(define primary-ip-alist + `(("created" . "2023-10-28T19:02:55+00:00") + ("id" . 42) + ("labels") + ("name" . "static-ip") + ("blocked" . #f) + ("ip" . "131.232.99.1") + ("datacenter") + ("dns_ptr") + ("protection" . (("delete" . #f))) + ("type" . "ipv4") + ("auto_delete" . #t) + ("assignee_type" . "server") + ("assignee_id" . 17))) + (define ssh-key-root (make-hetzner-ssh-key #(55 2 19 28 9 123 6 300 -1 0 #f) @@ -512,6 +536,20 @@ (define-syntax-rule (with-cleanup-api (api-sym api-init) body ...) ("ssh_keys" . #(,ssh-key-root-alist))))))) (hetzner-api-ssh-keys (hetzner-api)))) +(test-equal "hetzner-api-primary-ips-unit" + (list primary-ip) + (mock ((gnu machine hetzner http) hetzner-api-request-send + (lambda* (request #:key expected) + (assert (equal? 'GET (hetzner-api-request-method request))) + (assert (equal? "https://api.hetzner.cloud/v1/primary_ips" + (hetzner-api-request-url request))) + (assert (unspecified? (hetzner-api-request-body request))) + (assert (equal? '(("page" . 1)) (hetzner-api-request-params request))) + (hetzner-api-response + (body `(("meta" . ,meta-page-alist) + ("primary_ips" . #(,primary-ip-alist))))))) + (hetzner-api-primary-ips (hetzner-api)))) + ;; Integration tests (test-skip %when-no-token) base-commit: 77ff73a920759437639e8eb77601e51409fefefa prerequisite-patch-id: f9cc903b8048c8c6fde576fbf38ab110263020e3 prerequisite-patch-id: 220ddf11addf3a6c7ab3b349077bca6849241556 -- 2.48.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 17 16:53:51 2025 Received: (at 77019) by debbugs.gnu.org; 17 Apr 2025 20:53:52 +0000 Received: from localhost ([127.0.0.1]:48664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5WF4-0003xE-Ne for submit@debbugs.gnu.org; Thu, 17 Apr 2025 16:53:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52632) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u5WEW-0003qE-DA for 77019@debbugs.gnu.org; Thu, 17 Apr 2025 16:53:18 -0400 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 1u5WEP-0007RS-JE; Thu, 17 Apr 2025 16:53:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=jvLZ/hrShyP7j/U4FJvydBVAMtIIVH34ydgF5i4Jd0M=; b=BmrQGvHEpNroER0uN9t0 ek8PITKWzPRYCCp+YcZOY0xFWlqoBdUuad5O6jpm6LYOva8XXqQBEiYnPHiU4Dtd2wlGCbK6xvQqM RR85HWOKfyuxGgAjT7sWFU04vCxSFlNFlNRoU3eynyfTmDfeSu2diXm7NAOout4BlhoR28ZPUeEga 4KghsWbfkxK1Ega6R3KVe/hXOvpSOWdHPqWx8d8ESJRoLQoZ4IQRnaHHVxpfv6YGWvoA8/rOrqTGA q/gei9hK2gJVkiQxWvvC0lfLHwuiMpn8f4YtYWqL1puv0UD1RShlt6NUbp7JVSbtwexEyIs3gmqnh iRFpN5s9tTQyyA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Sergey Trofimov Subject: Re: bug#77019: [PATCH 0/1] machine: hetzner: Allow attaching existing public IPs. In-Reply-To: (Sergey Trofimov's message of "Thu, 20 Mar 2025 07:50:18 +0100") References: Date: Thu, 17 Apr 2025 22:42:04 +0200 Message-ID: <87r01qzfj7.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77019 Cc: Roman Scherer , Maxim Cournoyer , 77019@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Sergey Trofimov writes: > * gnu/machine/hetzner.scm (hetzner-configuration): Add ipv4 and ipv6 > fields. Export accessors. > * gnu/machine/hetzner/http.scm (hetnzer-api-primary-ips): New function. > (): New json mapping. > (hetzner-api-server-create): Pass IP addresses in request. > * doc/guix.texi: Document it. ^ Please specify the name of the node that is modified, for this list bullet:=20 * doc/guix.texi (Invoking guix deploy): Document it. > +@item @code{ipv4} (default: @code{'create}) > +When false, no public IPv4 address is going to be attached. Specify the > +name of an existing primary ip to attach it to the machine. Other values > +would create a new address automatically. > + > +@item @code{ipv6} (default: @code{'create}) > +When false, no public IPv6 address is going to be attached. Specify the > +name of an existing primary ip to attach it to the machine. Other values > +would create a new address automatically. To avoid repetition, use @itemx like so: @item @code{ipv4} (default: @code{'create}) @itemx @code{ipv6} (default: @code{'create}) When false, no public IPv4 (respectively IPv6) address is attached. =E2= =80=A6 Also, please leave to spaces after end-of-sentence periods and capitalize acronyms like =E2=80=9CIP=E2=80=9D. > + (ipv4 hetzner-configuration-ipv4 > + (default 'create)) > + (ipv6 hetzner-configuration-ipv6 > + (default 'create)) Am I right that 'create doesn=E2=80=99t have any special meaning? In that = case, it seems to be that it should be either #f or a string? Or #f or string or #t? This should be documented. > +(define-json-mapping Please add a short comment above explaining what this is, possibly linking to the relevant Hetzner doc. The rest LGTM at first sight but I know nothing about Hetzner so I=E2=80=99d prefer if Roman could chime in. Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 18 07:14:17 2025 Received: (at 77019) by debbugs.gnu.org; 18 Apr 2025 11:14:17 +0000 Received: from localhost ([127.0.0.1]:50132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5jfk-00085z-SG for submit@debbugs.gnu.org; Fri, 18 Apr 2025 07:14:17 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]:42427) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u5jfg-00084Z-KB for 77019@debbugs.gnu.org; Fri, 18 Apr 2025 07:14:14 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-acacb8743a7so300443266b.1 for <77019@debbugs.gnu.org>; Fri, 18 Apr 2025 04:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burningswell-com.20230601.gappssmtp.com; s=20230601; t=1744974845; x=1745579645; darn=debbugs.gnu.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=HZma5aZXVV1de/CwjMZ4LyU8vbNcCjX7x5423x/DxXI=; b=TXCSRsYqXH5v4y6NyQ4HqANgF33Utu63p/SgZ2Q5fRycIl4lTdfFQ7IBPCm6+FMglz bKbJQeI8Vr9/5Fhly+LgNhDKVMfMQ51jnmyp0uR6ZG5LFIQpnrAjA0W87V4+jqeVpmAJ +RPaoZydN+Z/JL5rG16LpeOo4lau4ZRsHOTVtvgMaBjtOZRENcSQ23Wr4TDigBtmPTa6 w/nlP6M+RLvXfJUjcXWhiGSlsQmWhgpUA9yIlhLt6YH7KYY/5dcowGYmf4FR5tyJleV/ CyXcSA/nm0woLTl3A6o+Kv3XS4GMli/B0V5OpSATMuqKiFCISPr4aTpUp7iTztU1KkeI 9BIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744974845; x=1745579645; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HZma5aZXVV1de/CwjMZ4LyU8vbNcCjX7x5423x/DxXI=; b=PCso0h/L3pXfXRHssHcGEw0+v09BsGPyJGviCfBiMxAKkJ3Q160jWRZLg4WNln9jif W9Dys7YFIgRSsm/0n7qVHMLfWunnwj6xNHbNUTTax9WQ7TUWA3rpCtgOR/D+lXIPnZlf MQMci+BGTFlS/PzK9Rw5rhGAl9/J29W4LejyNAMg8mWWo21ueCdnLtutNQZdjYY/jEdG PG06rpSirBFQjofP0m32nVxhjkdeG+Bj0+I2OAEL7WnJBeVNZ0isyxHLGjwkRC5vrA15 Ciw4UXSydyXFoWcDX0spjgCV0Xo7VHPbJKk1uiK3sGcy7SaX0WOWoLJ1UN118scPhTGU PjJg== X-Forwarded-Encrypted: i=1; AJvYcCVSy8btFEC3B2zQgRGAqD/T54cTbkZkaODnZliZmWaa3XUeh/4bbIjpAFQBh0VAudwzyC7hlg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxB0cmvx3f/mErOYUIdYd7GlY+ARu1M+4LLbzI6phOIIydPPDwp NimfPzG6EwBPNgzvsUGQfFtY93LVYyyAe3mj8XpimlSRB8L8uJ6AcBZGqpt3+lA= X-Gm-Gg: ASbGncvtKVB05xcqc8CeSeOT2GuArZKsdf6XC28X4KW9RMIEcomx2+7w1pSMKfFUXtV 9vnwfYdnAGMFW2gQBHA9+0ZtxJPGxtsqRqpbVBUvkGqf/4dRMjgpq4/UHSEnXtTtEEBbXUsk7Dh rAIHnyP4/thWdX0Vcpwlvw362ZfxBgFrZESaxGBzmLX3ArmE/PUWPSjnsGu4PSNAiWIsPnS9bxJ mg+SlETRnE70hLfd0T58UVAgazYG33/vZq5vNEiMAbY9FaEuzpHVUYWHfQRlVO9gJQisWJ4NDZd xboFaKcNooHU1DNxE+XywaBAd9x4XO7HWiKI0+MvhUGsyBYEolJz32jtum9c8ls2uw== X-Google-Smtp-Source: AGHT+IEzeIcWCdLjILoEBZ6F8ffYUZjxjegQr6ZiSTw/XX0+TfLHxwohCCjtvaRC9J/2Zu3fJUs81Q== X-Received: by 2002:a17:907:94c8:b0:acb:1165:9a93 with SMTP id a640c23a62f3a-acb6ec0f778mr289659166b.3.1744974845010; Fri, 18 Apr 2025 04:14:05 -0700 (PDT) Received: from precision ([2a01:598:ff0b:275d:7ff8:bd8f:785b:3027]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-acb6eefcfa2sm107503566b.92.2025.04.18.04.14.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Apr 2025 04:14:04 -0700 (PDT) From: Roman Scherer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#77019: [PATCH 0/1] machine: hetzner: Allow attaching existing public IPs. In-Reply-To: <87r01qzfj7.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Thu, 17 Apr 2025 22:42:04 +0200") References: <87r01qzfj7.fsf_-_@gnu.org> User-Agent: mu4e 1.12.9; emacs 29.4 Date: Fri, 18 Apr 2025 13:13:58 +0200 Message-ID: <87zfgd203t.fsf@burningswell.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77019 Cc: Roman Scherer , Sergey Trofimov , Maxim Cournoyer , 77019@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludovic and Sergey, the patch looks good to me. Thanks for adding the tests. I would have expected #t, #f or a string as the value of hetzner-configuration-ipv4 and hetzner-configuration-ipv6. It's a pitty the null issue in guile-json has no comments yet. I would say, let's merge it. The default behaviour right now is to enable ipv4 and ipv6 and this patch does the same. Once the issue in guile-json has been fixed we gain the ability to disable via #f, right? Thanks, Roman. Ludovic Court=C3=A8s writes: > Hi, > > Sergey Trofimov writes: > >> * gnu/machine/hetzner.scm (hetzner-configuration): Add ipv4 and ipv6 >> fields. Export accessors. >> * gnu/machine/hetzner/http.scm (hetnzer-api-primary-ips): New function. >> (): New json mapping. >> (hetzner-api-server-create): Pass IP addresses in request. >> * doc/guix.texi: Document it. > ^ > Please specify the name of the node that is modified, for this list > bullet: > > * doc/guix.texi (Invoking guix deploy): Document it. > >> +@item @code{ipv4} (default: @code{'create}) >> +When false, no public IPv4 address is going to be attached. Specify the >> +name of an existing primary ip to attach it to the machine. Other values >> +would create a new address automatically. >> + >> +@item @code{ipv6} (default: @code{'create}) >> +When false, no public IPv6 address is going to be attached. Specify the >> +name of an existing primary ip to attach it to the machine. Other values >> +would create a new address automatically. > > To avoid repetition, use @itemx like so: > > @item @code{ipv4} (default: @code{'create}) > @itemx @code{ipv6} (default: @code{'create}) > When false, no public IPv4 (respectively IPv6) address is attached. =E2= =80=A6 > > Also, please leave to spaces after end-of-sentence periods and > capitalize acronyms like =E2=80=9CIP=E2=80=9D. > >> + (ipv4 hetzner-configuration-ipv4 >> + (default 'create)) >> + (ipv6 hetzner-configuration-ipv6 >> + (default 'create)) > > Am I right that 'create doesn=E2=80=99t have any special meaning? In tha= t case, > it seems to be that it should be either #f or a string? Or #f or string > or #t? This should be documented. > >> +(define-json-mapping > > Please add a short comment above explaining what this is, possibly > linking to the relevant Hetzner doc. > > The rest LGTM at first sight but I know nothing about Hetzner so I=E2=80= =99d > prefer if Roman could chime in. > > Thanks! > > Ludo=E2=80=99. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFTBAEBCAA9FiEE0iajOdjfRIFd3gygPdpSUn0qwZkFAmgCM/YfHHJvbWFuLnNj aGVyZXJAYnVybmluZ3N3ZWxsLmNvbQAKCRA92lJSfSrBmRrUB/0SIXjQQc0/FsaT 78PxeMwhpKsTR71xUiiiOmJFAHwIYx0XhM23fPYE58dJG2mnIFmfK7ONOomsTf0n xZSAGzqHuoAo70NSc48wwzFyaXbIjTCOwsl9v4vYNTYrpipTONBH1m3K/Nx7GqkK Gk8h8ZiRGVm/IBfjbp6KVKuPFUAx8688f7HzJcL33gIvo4GkqWyzVQyfB7dJ0/G1 e6DCLAhKwXC1NL48pXwBfDfY0/8uqUBsknHtDul1fOd4cV4YAST2S3+NX+inGa/V TD5ZrrROJAE7vPyi3t8YykEMD5ksetB7DrDWUPEuvIR1NzR1F8/r7zv01SflU/dG vX5YodNh =ZJH2 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 18 11:08:56 2025 Received: (at 77019) by debbugs.gnu.org; 18 Apr 2025 15:08:56 +0000 Received: from localhost ([127.0.0.1]:52464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5nKk-0000RE-O0 for submit@debbugs.gnu.org; Fri, 18 Apr 2025 11:08:56 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:54321) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u5nKa-0000NS-Cp for 77019@debbugs.gnu.org; Fri, 18 Apr 2025 11:08:48 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-abbb12bea54so299364766b.0 for <77019@debbugs.gnu.org>; Fri, 18 Apr 2025 08:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1744988899; x=1745593699; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=fRE96sqXU9z0Y6d7YAa4MN/MXV3kB/LQo5nDv77V4lU=; b=BtRGpvyL4arDWDqRJee/n7w1SkeyxsBnKV9QjWjlMjRe7xJPO+jL2364HCmiGw5zyJ 5bbhkESdUjxcCv3bFZ8N46tK7Go8Sctc1uMrs4u53OS9HaPVE+KHvWKhdepyn7ZK2U3+ WpXcmwZrBNcPGEPZNp9XDAKH6OyLpxO63LmgLHoFubmE28YV5BgwlKyZ7lzVMcVlDDIy Zc4fV0HvdsWnmwDRm6xKa/unHmDyDiflqYjtGo41to9WIqaFEZ+kNfk0kAZ8FX9EP0zz cbwv8WGAi1uy+9j7p8MEf2FtS1IDJYutleMZOXbaR50rpf6JNrjQaT6VgF+H91AoYLk2 Sd4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744988899; x=1745593699; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fRE96sqXU9z0Y6d7YAa4MN/MXV3kB/LQo5nDv77V4lU=; b=m4TYvvcziVZfdptQXPEroYMD92eNEdCtswJdLEGH33jzHgg74nPe0Bqw0BRW5NfN/k LksH9Kl35lsCWBnB/5qWFBo033HqcGiw+UACvfZoFe2LCJQVw4pkQIRbNHwG9Po9eV/k EdnHv9Dh198NO9UznlAGRQ0MRQAzEdYRUThjXCfaQzOwT9BUZ394jkP9I/BuzbUl/EGA SpJzmqUbmsDV38JTTELJdfsLB45xK+xowAd7Z5wKKFljJeKsFjpK8eHNkpQYyLxt9YUj uf1m2OERGN3yrPs1xRqB2+IKQHGiwK9uuR3aqpanU3E2vrEiA5x/GzB0vrUlt7OEdkTO KYmQ== X-Gm-Message-State: AOJu0YxarR0LblYUMn+jOOKz6hOo7etCrxBqCtPa25uMvbTNbkc/oKL3 BZ63t61ZpPYQBqz0fjf75oHoqSqA9w8rQSscGFAq0ZjFU6hzpiBlRxVDXg0mOPGsreNSbYl3nqc Zvok= X-Gm-Gg: ASbGnct1/+ShvWsK/StXqAgY7Y2dcySIMDYU3xav+F6bOTnlcrQoy9KXW5uJ1+Gje/t POJ//ItmrmLzfzgYdba2a/hgBG2g+E20xXxzYgy9d4+UMD0Hm9r6PR8xKLoBUchEZTu5X5Z3eJw BU7/cJvjEOnjogLCaUhMeC61VItPTFToI8eQjs3l7MxdRt1suZcb9HC3KFdOlIe7thIDAw0YEU/ /SZuzbeZRHdYrACisTZ6TcG4A6eduVMqJyRczcRSEkMizS/0grGvoltfyAL2Noag1Urw07tTq4V i+EZT3+/t/B4mjXCfPgJuuUxFolQ9g5Q4qRmng== X-Google-Smtp-Source: AGHT+IGfn11IInMUJzTQSD1YgTCdLcO73Yttjz4tneIsVHf7FzrGK6X2SgsHKiHl5wC1puUSderQbA== X-Received: by 2002:a17:907:3f94:b0:ac8:1798:a796 with SMTP id a640c23a62f3a-acb74dd5dd2mr299484966b.54.1744988898717; Fri, 18 Apr 2025 08:08:18 -0700 (PDT) Received: from localhost ([2a02:2454:a095:5600:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-acb6eefcfa2sm130906866b.92.2025.04.18.08.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Apr 2025 08:08:18 -0700 (PDT) From: Sergey Trofimov To: 77019@debbugs.gnu.org Subject: [PATCH] machine: hetzner: Allow attaching existing public IPs. Date: Fri, 18 Apr 2025 17:08:08 +0200 Message-ID: <0739a3a367114259a24b13f16d2673eb6d63b1f1.1744988608.git.sarg@sarg.org.ru> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Debbugs-Cc: Sergey Trofimov , Ludovic Courtès , Roman Scherer , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77019 Cc: Sergey Trofimov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/machine/hetzner.scm (hetzner-configuration): Add ipv4 and ipv6 fields. Export accessors. * gnu/machine/hetzner/http.scm (hetnzer-api-primary-ips): New function. (): New json mapping. (hetzner-api-server-create): Pass IP addresses in request. * doc/guix.texi (Invoking guix deploy): Document it. Change-Id: I44509cc98e041762dc483e876566e79bde85b26a --- doc/guix.texi | 6 ++++++ gnu/machine/hetzner.scm | 25 ++++++++++++++++++++++ gnu/machine/hetzner/http.scm | 37 +++++++++++++++++++++++++++------ tests/machine/hetzner/http.scm | 38 ++++++++++++++++++++++++++++++++++ 4 files changed, 100 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 070528667fa..ddd23c4ced0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -46436,6 +46436,12 @@ Invoking guix deploy provisioning phase. If false, the server will be kept in order to debug any issues. +@item @code{ipv4} (default: @code{#t}) +@itemx @code{ipv6} (default: @code{#t}) +When false, no public IP address is attached. Specify the name of an +existing primary ip to attach it to the machine. Other values would +create a new address automatically. + @item @code{labels} (default: @code{'()}) A user defined alist of key/value pairs attached to the SSH key and the server on the Hetzner API. Keys and values must be strings, diff --git a/gnu/machine/hetzner.scm b/gnu/machine/hetzner.scm index e8484e4d51e..ddac58dda0a 100644 --- a/gnu/machine/hetzner.scm +++ b/gnu/machine/hetzner.scm @@ -73,6 +73,8 @@ (define-module (gnu machine hetzner) hetzner-configuration-authorize? hetzner-configuration-build-locally? hetzner-configuration-delete? + hetzner-configuration-ipv4 + hetzner-configuration-ipv6 hetzner-configuration-labels hetzner-configuration-location hetzner-configuration-server-type @@ -205,6 +207,10 @@ (define-record-type* hetzner-configuration (default "fsn1")) (server-type hetzner-configuration-server-type ; string (default "cx42")) + (ipv4 hetzner-configuration-ipv4 ; boolean | string + (default #t)) + (ipv6 hetzner-configuration-ipv6 ; boolean | string + (default #t)) (ssh-public-key hetzner-configuration-ssh-public-key ; public-key | string (thunked) (default (public-key-from-file (hetzner-configuration-ssh-key this-hetzner-configuration))) @@ -445,6 +451,17 @@ (define (hetzner-machine-server machine) (hetzner-configuration-api config) #:params `(("name" . ,(machine-display-name machine))))))) +(define (hetzner-resolve-ip api name) + "Find the NAME IP address on the Hetzner API." + (or + (find (lambda (primary-ip) + (equal? name (hetzner-primary-ip-name primary-ip))) + (hetzner-api-primary-ips api #:params `(("name" . ,name)))) + + (raise-exception + (formatted-message (G_ "primary ip '~a' does not exist.") + name)))) + (define (hetzner-machine-create-server machine) "Create the Hetzner server for MACHINE." (let* ((config (machine-configuration machine)) @@ -452,11 +469,19 @@ (define (hetzner-machine-create-server machine) (server-type (hetzner-configuration-server-type config))) (format #t "creating '~a' server for '~a'...\n" server-type name) (let* ((ssh-key (hetzner-machine-ssh-key machine)) + (ipv4 (hetzner-configuration-ipv4 config)) + (ipv6 (hetzner-configuration-ipv6 config)) (api (hetzner-configuration-api config)) (server (hetzner-api-server-create api (machine-display-name machine) (list ssh-key) + #:ipv4 (if (string? ipv4) + (hetzner-primary-ip-id (hetzner-resolve-ip api ipv4)) + ipv4) + #:ipv6 (if (string? ipv6) + (hetzner-primary-ip-id (hetzner-resolve-ip api ipv6)) + ipv6) #:labels (hetzner-configuration-labels config) #:location (hetzner-configuration-location config) #:server-type (hetzner-configuration-server-type config))) diff --git a/gnu/machine/hetzner/http.scm b/gnu/machine/hetzner/http.scm index 51b4bff984f..bd12e8ee5eb 100644 --- a/gnu/machine/hetzner/http.scm +++ b/gnu/machine/hetzner/http.scm @@ -52,6 +52,7 @@ (define-module (gnu machine hetzner http) hetzner-api-actions hetzner-api-create-ssh-key hetzner-api-locations + hetzner-api-primary-ips hetzner-api-request-body hetzner-api-request-headers hetzner-api-request-method @@ -100,6 +101,13 @@ (define-module (gnu machine hetzner http) hetzner-location-name hetzner-location-network-zone hetzner-location? + hetzner-primary-ip + hetzner-primary-ip-created + hetzner-primary-ip-id + hetzner-primary-ip-ip + hetzner-primary-ip-labels + hetzner-primary-ip-name + hetzner-primary-ip-type hetzner-public-net hetzner-public-net-ipv4 hetzner-public-net-ipv6 @@ -144,6 +152,7 @@ (define-module (gnu machine hetzner http) make-hetzner-ipv6 make-hetzner-location make-hetzner-public-net + make-hetzner-primary-ip make-hetzner-resource make-hetzner-server make-hetzner-server-type @@ -296,6 +305,16 @@ (define-json-mapping (name hetzner-server-type-name) ; string (storage-type hetzner-server-type-storage-type "storage_type")) ; string +;; Reserved IP address. https://docs.hetzner.cloud/#primary-ips +(define-json-mapping + make-hetzner-primary-ip hetzner-primary-ip? json->hetzner-primary-ip + (created hetzner-primary-ip-created "created" string->time) ; time + (id hetzner-primary-ip-id) ; integer + (ip hetzner-primary-ip-ip) ; string + (labels hetzner-primary-ip-labels) ; alist of string/string + (name hetzner-primary-ip-name) ; string + (type hetzner-primary-ip-type)) ; string + (define-json-mapping make-hetzner-ssh-key hetzner-ssh-key? json->hetzner-ssh-key (created hetzner-ssh-key-created "created" string->time) ; time @@ -581,12 +600,11 @@ (define* (hetzner-api-locations api . options) (define* (hetzner-api-server-create api name ssh-keys #:key - (enable-ipv4? #t) - (enable-ipv6? #t) + (ipv4 #f) + (ipv6 #f) (image %hetzner-default-server-image) (labels '()) (location %hetzner-default-server-location) - (public-net #f) (server-type %hetzner-default-server-type) (start-after-create? #f)) "Create a server with the Hetzner API." @@ -595,9 +613,11 @@ (define* (hetzner-api-server-create #:body `(("image" . ,image) ("labels" . ,labels) ("name" . ,name) - ("public_net" - . (("enable_ipv4" . ,enable-ipv4?) - ("enable_ipv6" . ,enable-ipv6?))) + ("public_net" . + (("enable_ipv4" . ,(and ipv4 #t)) + ("enable_ipv6" . ,(and ipv6 #t)) + ,@(if (integer? ipv4) `(("ipv4" . ,ipv4)) '()) + ,@(if (integer? ipv6) `(("ipv6" . ,ipv6)) '()))) ("location" . ,location) ("server_type" . ,server-type) ("ssh_keys" . ,(apply vector (map hetzner-ssh-key-id ssh-keys))) @@ -658,6 +678,11 @@ (define* (hetzner-api-ssh-keys api . options) (apply hetzner-api-list api "/ssh_keys" "ssh_keys" json->hetzner-ssh-key options)) +(define* (hetzner-api-primary-ips api . options) + "Get Primary IPs from the Hetzner API." + (apply hetzner-api-list api "/primary_ips" "primary_ips" + json->hetzner-primary-ip options)) + (define* (hetzner-api-server-types api . options) "Get server types from the Hetzner API." (apply hetzner-api-list api "/server_types" "server_types" diff --git a/tests/machine/hetzner/http.scm b/tests/machine/hetzner/http.scm index 618d9a4c94e..6c6d848a578 100644 --- a/tests/machine/hetzner/http.scm +++ b/tests/machine/hetzner/http.scm @@ -239,6 +239,30 @@ (define server-x86-alist ("status" . "running") ("volumes" . #()))) +(define primary-ip + (make-hetzner-primary-ip + #(55 2 19 28 9 123 6 300 -1 0 #f) + 42 + "131.232.99.1" + '() + "static-ip" + "ipv4")) + +(define primary-ip-alist + `(("created" . "2023-10-28T19:02:55+00:00") + ("id" . 42) + ("labels") + ("name" . "static-ip") + ("blocked" . #f) + ("ip" . "131.232.99.1") + ("datacenter") + ("dns_ptr") + ("protection" . (("delete" . #f))) + ("type" . "ipv4") + ("auto_delete" . #t) + ("assignee_type" . "server") + ("assignee_id" . 17))) + (define ssh-key-root (make-hetzner-ssh-key #(55 2 19 28 9 123 6 300 -1 0 #f) @@ -512,6 +536,20 @@ (define-syntax-rule (with-cleanup-api (api-sym api-init) body ...) ("ssh_keys" . #(,ssh-key-root-alist))))))) (hetzner-api-ssh-keys (hetzner-api)))) +(test-equal "hetzner-api-primary-ips-unit" + (list primary-ip) + (mock ((gnu machine hetzner http) hetzner-api-request-send + (lambda* (request #:key expected) + (assert (equal? 'GET (hetzner-api-request-method request))) + (assert (equal? "https://api.hetzner.cloud/v1/primary_ips" + (hetzner-api-request-url request))) + (assert (unspecified? (hetzner-api-request-body request))) + (assert (equal? '(("page" . 1)) (hetzner-api-request-params request))) + (hetzner-api-response + (body `(("meta" . ,meta-page-alist) + ("primary_ips" . #(,primary-ip-alist))))))) + (hetzner-api-primary-ips (hetzner-api)))) + ;; Integration tests (test-skip %when-no-token) base-commit: a4a7ff0319c622cd08aa7461cc88cc6608fe62cb -- 2.49.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 20 10:27:52 2025 Received: (at 77019) by debbugs.gnu.org; 20 Apr 2025 14:27:52 +0000 Received: from localhost ([127.0.0.1]:50174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u6VeC-0001WQ-0a for submit@debbugs.gnu.org; Sun, 20 Apr 2025 10:27:52 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:57622) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u6Ve9-0001Vs-49 for 77019@debbugs.gnu.org; Sun, 20 Apr 2025 10:27:49 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-7376dd56f60so2301750b3a.3 for <77019@debbugs.gnu.org>; Sun, 20 Apr 2025 07:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745159263; x=1745764063; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=2atwY6kDEtZ3DtgsVSv6seQAm+DTa6xJ3cmAfEIrKLQ=; b=VihyM7d+mWP+61kOE+qbnR4LnxwRrrzPdkTe7fFqK9i/Fso/nBCJ7jdx8/3bRPUpB2 MRVwH62DNMhLJvqnO6Y69jmVXQx4tMutAxZg/1WsD1HqBafsUlVY7nRkBoEdNgfU3H/7 +gAwUt7LH6aCk4sWjvOvPoMuVjgTWR+dva3eJXwoG+U2+7zvHNKKE2+bR4cH2qA27ecI MGQwKWJmqDsv7Cx6qBNcginO1ycsy+WqWfbH+p7Y6GPxL6vrx5Gox7lf/pz6vatBucY2 TNJojvg1454+uxpxmi1/sP5KvWmmglyTN2PBB+3m/WvYd5wp26SDrKzDoz9lXPDqICVS XYeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745159263; x=1745764063; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2atwY6kDEtZ3DtgsVSv6seQAm+DTa6xJ3cmAfEIrKLQ=; b=G6FJhuOOyly8itxHgy2ZJ4zQ+rSwB3LBxd5QDXVBpL5abtJsMZTYeaitwxREDssWn6 JPGCwuvDsgdH6QgHpaj8EE9HKLyoIJkjUySZYcbNY3J0Uhhyu4cxCpCguIpmzU03yA8m pYpEcOwPV4gOLr6I4coDyECfcb8fJQvzuTU/aYWMjYgFIwuBIBLoQk2Z73J4TJ9XQ9bC lwoUdIwXRtgD8aB5i4LH37rfUFK7U9S3L63Jyi32IjLTa89aBSwUEwEgttH3GoBAy9Cm r/UmhLOYO/F2gL8DHYZvwPQQy1rudUO89B9a12MAVUEUcAVp3lmlrwmHdE4asIqFVbfK isCw== X-Forwarded-Encrypted: i=1; AJvYcCUwB4FUC1U8WRXJm12ptaiwTotTcs6MYcWJ64584Dhv4bN7XnjyzNduuW2no+x24VvIkA26RA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yx36UeODRxXRq5aUODc++A3N0QESOegk2k9fXgrmeMSQcGQk0qj qw2ggumQhx8qRCJ3LrJ0woF8ljBdEoxPsimXTz8+X9+4RC+/fmpk X-Gm-Gg: ASbGncsbp/PrtD6RBpVRHM8Vc1/w4qbB/hzUTV/pOtG5nCqGwBAkKd6xEMtPg1I+Rc8 n/DiOAkiGq7STZijlEJrGJoi3vCdjtjVLBlM5T9BIxcQeiim7kGUQ3a+ZHsyo7rPrvrEoM0xJiL A3wvm6nCvtSsOitcYIUCAtj5B+I73ALbhqzDmQJ1XVgfw8/PPWsq3KZFRtuKI+ttzsvgdXX7yU5 x8mA4Vi/Ir1IHivvpPIP3ZE06YkSd0WUJdD6WCmwYa8a8WUvJ7EjjhJorjBQdn7uBaxnJaj3/li +L4Mrd4ymwLtqCQB7KmVblyREj5PnD4p6q43J+s= X-Google-Smtp-Source: AGHT+IHnK/B5tzGOKuAZ2aGt9Kh28okcAt5Y0cX9LtgLsEU17cqnkTdoArT0iWYltTzf7B1w1N3MHw== X-Received: by 2002:a05:6a00:2e84:b0:736:4ebd:e5a with SMTP id d2e1a72fcca58-73dc15ca18emr10088800b3a.20.1745159262998; Sun, 20 Apr 2025 07:27:42 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73dbf8ea9a4sm4775170b3a.41.2025.04.20.07.27.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Apr 2025 07:27:42 -0700 (PDT) From: Maxim Cournoyer To: Roman Scherer Subject: Re: bug#77019: [PATCH 0/1] machine: hetzner: Allow attaching existing public IPs. In-Reply-To: <87zfgd203t.fsf@burningswell.com> (Roman Scherer's message of "Fri, 18 Apr 2025 13:13:58 +0200") References: <87r01qzfj7.fsf_-_@gnu.org> <87zfgd203t.fsf@burningswell.com> Date: Sun, 20 Apr 2025 23:27:20 +0900 Message-ID: <87bjsqaoxj.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77019 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , Sergey Trofimov , Roman Scherer , 77019@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Roman Scherer writes: > Hi Ludovic and Sergey, > > the patch looks good to me. Thanks for adding the tests. > > I would have expected #t, #f or a string as the value of > hetzner-configuration-ipv4 and hetzner-configuration-ipv6. > > It's a pitty the null issue in guile-json has no comments yet. > > I would say, let's merge it. The default behaviour right now is to > enable ipv4 and ipv6 and this patch does the same. Once the issue in > guile-json has been fixed we gain the ability to disable via #f, right? nitpick: If these fields are booleans, they should be suffixed by '?', e.g. 'ipv6?' or 'ipv4?', for clarity. -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 20 10:30:16 2025 Received: (at 77019) by debbugs.gnu.org; 20 Apr 2025 14:30:16 +0000 Received: from localhost ([127.0.0.1]:50199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u6VgV-0001qH-Td for submit@debbugs.gnu.org; Sun, 20 Apr 2025 10:30:16 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:52667) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u6VgR-0001kY-W9 for 77019@debbugs.gnu.org; Sun, 20 Apr 2025 10:30:13 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5e5e8274a74so4793758a12.1 for <77019@debbugs.gnu.org>; Sun, 20 Apr 2025 07:30:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1745159406; x=1745764206; darn=debbugs.gnu.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=A2zsD+anSzBVkkjvm7eFMW9Gmn8baCJyZv2P7VeEVwQ=; b=xQa48F8o1Ws+LEAZ9trxk4TbXTbWaaX3MpAKdlVX7+mogBTpA1Kiuf/cJDALUrU+5T ATd+NvbBL085jlt2NUECbg6tmbzTwv3AmG0/5mUGTUuhhZy8VsENys/z5w0CRtOwBgTJ NdhF5VSEpI8iRKE/zg26Ih+jc+Wv1LC9KgRSFtNRsSQk9QYuoN7ffE3Xr7nTcYpEG54V 0nYo4EXsKk7sUYfVMPwWmrLwengpmMNtuvmPyiAEOFLkCCdZr2Z/3tyx45AZC6FIa5WQ rio/WiVu6jXomf2ohmpYP//cDlxNOcYYTqgJIr16UssPDktRxUpwQG+P+4tddUWlBThW CqtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745159406; x=1745764206; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=A2zsD+anSzBVkkjvm7eFMW9Gmn8baCJyZv2P7VeEVwQ=; b=l66eQrgYTAPaZNX2ZLbWXJgt4JKHaZxXyNPQNyT2lTBnzsOdo2tfrmEJpP2HIawob4 MmMxArbdlddboj7EtsAjkqNV5kam2TUextZSwGbADLzmakQgx0ExT+jfib/Wp01YRJtV SBg1E3vz6eJChMS9KIgJp0P1GaERbNq2tdiC+VEH5LkNNHq3LjfHS+5m1tojy6lBsfVX p2RqRLXhwOivyxIwbr3f+59F3mwdksClQZt+K+oNgyym76TUF12ST/LAJ+jh1ZvOtz+B 7sAISFdjfCxZ7msOxqQqweJDzW1n32JD3rU9TtUHZPw9dxkQTpUhmPlFhNE6+yj+9MQX TLVg== X-Forwarded-Encrypted: i=1; AJvYcCVaRXPH/CyG0TQOyfrXcLaHXfqhqKucXW7V6o6JJeIKkuHECN9DIXBuxE6D/RkauHK+mrWOpA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzMQDW991uz4kYeFcZpJsulgdO5fYhAt5QB+ygzgJBTRg3v2GxS XGJf+ju1mHilAaRJ4aGZJdyLDQppegUBIGSb0Dx75BtTgY0L7f2ZYyA1RybHx8g= X-Gm-Gg: ASbGnctOY6OV1gFUo8rSQ5FqxDMEaiMyG1vlqgggPl3wo5aImpAF5N4IDlzlZBk79XE 2P36Y6bW+9pY/zXrjzxkw2EH7w3C1aBLS5OipA2utZUpaEFBlVZWy/lSt18sJQLSgPQVhBfp2yz 7+TWCftccL+A6We3LrR6a3ZYrMTin+Islo7L5UWCpDkuLxUEzN4C9siSFGS2rFOXQoJdgqonL6z 61ly1tlS7qxWB2gGBfiXDbWYcQE6sqBn0NqXTMWtuT9v2tBexfvymoKq+BpB/sKRB2g8Zv/xp7v Bhoj12nwP+yQwrNjbc7xbn9T14erGLOniX/S37LvJ6Yf8kCQ X-Google-Smtp-Source: AGHT+IHMkDpvY6XiGDa+FHfxCzIL+/ycb65mNBSTQUCI7+nBeQP4oSW+SzYYZJTFnWY1q/21+J8z/g== X-Received: by 2002:a05:6402:2695:b0:5e5:c847:1a56 with SMTP id 4fb4d7f45d1cf-5f6285251eemr7909996a12.10.1745159405000; Sun, 20 Apr 2025 07:30:05 -0700 (PDT) Received: from localhost ([2a02:2454:a095:5600:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5f625a5ec5bsm3473221a12.81.2025.04.20.07.30.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Apr 2025 07:30:03 -0700 (PDT) From: Sergey Trofimov To: Maxim Cournoyer Subject: Re: bug#77019: [PATCH 0/1] machine: hetzner: Allow attaching existing public IPs. In-Reply-To: <87bjsqaoxj.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 20 Apr 2025 23:27:20 +0900") References: <87r01qzfj7.fsf_-_@gnu.org> <87zfgd203t.fsf@burningswell.com> <87bjsqaoxj.fsf@gmail.com> User-Agent: mu4e 1.12.9; emacs 30.0.92 Date: Sun, 20 Apr 2025 16:30:02 +0200 Message-ID: <87cyd6hpn9.fsf@sarg.org.ru> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77019 Cc: Ludovic =?utf-8?Q?Cou?= =?utf-8?Q?rt=C3=A8s?= , Roman Scherer , Roman Scherer , 77019@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Maxim, Maxim Cournoyer writes: > Hi, > > Roman Scherer writes: > >> Hi Ludovic and Sergey, >> >> the patch looks good to me. Thanks for adding the tests. >> >> I would have expected #t, #f or a string as the value of >> hetzner-configuration-ipv4 and hetzner-configuration-ipv6. >> >> It's a pitty the null issue in guile-json has no comments yet. >> >> I would say, let's merge it. The default behaviour right now is to >> enable ipv4 and ipv6 and this patch does the same. Once the issue in >> guile-json has been fixed we gain the ability to disable via #f, right? > > nitpick: If these fields are booleans, they should be suffixed by '?', > e.g. 'ipv6?' or 'ipv4?', for clarity. They're "boolean | string", with the values being: #t - create new, #f - don't assign an IP, a string - assign the IP under that name. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 20 21:17:38 2025 Received: (at 77019) by debbugs.gnu.org; 21 Apr 2025 01:17:39 +0000 Received: from localhost ([127.0.0.1]:57172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u6fn0-0003ZK-I9 for submit@debbugs.gnu.org; Sun, 20 Apr 2025 21:17:38 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:46100) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u6fmx-0003Z2-CK for 77019@debbugs.gnu.org; Sun, 20 Apr 2025 21:17:36 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-226185948ffso38814945ad.0 for <77019@debbugs.gnu.org>; Sun, 20 Apr 2025 18:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745198249; x=1745803049; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=mQGov0G7g01sSfXeyZxzYcPT3Pl3b2YdJ2gOpmv3vys=; b=YLtLe+SZMYso51k4usWs4jDjq0H1Dsa31Da7t8c4zb0M2FYK6yulnOS5E0Md4u8wdf J+qZCS/HYrKkgXNUGBQF4CLWzEIRZBfeAmN/X+wqWdNBaP+xYsDgeVkVFm0ofbCQbdal j8eK9WEB/TvIEtWUg7sjND2Ul+0ImKlKJnPfnntOj1zhaQkvMfEvFcVQO5VFYN0ODFCF ySzGbMCfSkibVijPgHMoo+qCxwJQPyjaw9z7Fg5Jv5tvEAfWk9Nfg9K7eGZtDXoAHryQ 6OCqQ71mBDO/3oZtSFpSCahYaLKRZhOamWp2sFUSoovETzWTC3bFTK9Ahgj8i5Kmj4KY ktHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745198249; x=1745803049; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mQGov0G7g01sSfXeyZxzYcPT3Pl3b2YdJ2gOpmv3vys=; b=vDFEw4Ut50sjzfK/5Md5J5l9FxNzb7K1h1onqcXep2tRE/+C3MUjhTs6Hc/RwC/Fy/ TR13RvWWHKzdY8DohWsxO3NtNyAQ/XlFDebPB6kOOwFhYnk5uDM/OSRkeCBUolcvAH0I mnWGRAraLZdYylwmcbFbzz9WaeW5KsH1Tn2Qa9V3bzp6Ak9ALvOsn49JMzt8nH6esOoc UaGS55mXuFm4dvCA6qd/SBbDUFMDfJbBKT8Sp28HZBvgs/9zxvHtyOTCUUUhJ6b4lsbu Qwysg+lHAF69nJXejTNGZOSqJiyhv3bbl1zEbPE+N1vLtaquczIVcQzazQ/iMYoTr7iX utmg== X-Forwarded-Encrypted: i=1; AJvYcCVv7MBFm8ezS4hK2KPjc4cYGNBasx5RJxeKzDn/UROCG3XKiHh6rvLHje0Rciw70Zkkuf6Y3Q==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy7YB4rotlmeVvvx1GPT/7cG+7ya0RQMNn3rRidPp79dB1qT205 1xBxGQvPSgkAi/gxl+AMRO5hD+o58kV2rOMo9LEImnnBuKZdt+UJ X-Gm-Gg: ASbGncu4KG7KOnxbhZ4LhpcsYvQ/WMwufO+vgVz6vBY/aFk+IuDa49pfjCIvQMwgCvZ +rJI90UobDL4J1xyLnMpjdZj1kjAmMn12CCJ7F9e+FdUHf3fkfL7Q7PsEdoDPYEGXwdtymVyGPr kojTNM8ClKItSEYR+D+Wssa3gTUfAWoRvYBq/qbpkHLBzgpdfwsq9wD8zPzn9tiAd4MbvnMAgVE FgVC+oAorwmdBXrFWWG5bQeIYISSiMjaz9pL0qRmHhG56qpeutaHMMcsnI0+Ouvq0t57I6XxCVJ JjqViAGY3g9z4hZNsqaQ+4NXSAzpso+wtCc5Yd8= X-Google-Smtp-Source: AGHT+IEHTJ32L88kqyd+wK80D8ArnBqufIXA+wL22el9lEpTS/SvPjYGLiD41KjQFit/iDkbGn+9nw== X-Received: by 2002:a17:902:cf0d:b0:220:c4e8:3b9f with SMTP id d9443c01a7336-22c530bbfa4mr158234705ad.0.1745198249071; Sun, 20 Apr 2025 18:17:29 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22c50eb48e0sm54071775ad.155.2025.04.20.18.17.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Apr 2025 18:17:28 -0700 (PDT) From: Maxim Cournoyer To: Sergey Trofimov Subject: Re: bug#77019: [PATCH 0/1] machine: hetzner: Allow attaching existing public IPs. In-Reply-To: <87cyd6hpn9.fsf@sarg.org.ru> (Sergey Trofimov's message of "Sun, 20 Apr 2025 16:30:02 +0200") References: <87r01qzfj7.fsf_-_@gnu.org> <87zfgd203t.fsf@burningswell.com> <87bjsqaoxj.fsf@gmail.com> <87cyd6hpn9.fsf@sarg.org.ru> Date: Mon, 21 Apr 2025 10:17:25 +0900 Message-ID: <87a58anwii.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77019 Cc: Ludovic =?utf-8?Q?Cou?= =?utf-8?Q?rt=C3=A8s?= , Roman Scherer , Roman Scherer , 77019@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Sergey Trofimov writes: [...] >> nitpick: If these fields are booleans, they should be suffixed by >> '?', >> e.g. 'ipv6?' or 'ipv4?', for clarity. > > They're "boolean | string", with the values being: #t - create new, #f > - > don't assign an IP, a string - assign the IP under that name. Makes sense, thanks for explaining. -- Maxim From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 21 18:17:23 2025 Received: (at 77019-done) by debbugs.gnu.org; 21 Apr 2025 22:17:23 +0000 Received: from localhost ([127.0.0.1]:40436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u6zS7-0003W1-33 for submit@debbugs.gnu.org; Mon, 21 Apr 2025 18:17:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40072) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u6zS3-0003Vd-Kf for 77019-done@debbugs.gnu.org; Mon, 21 Apr 2025 18:17:20 -0400 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 1u6zRv-00069N-Hl; Mon, 21 Apr 2025 18:17:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=RNlFhp7eJTAZJg8dIMHY+iuQ2etu3j387SAxZw6ebHg=; b=EMe9rMNLsTYmYSwCPkUM wUF2cWIYO5Ztn584RbTDLQyB1Sx+Z2LKk47KezCqSpnw7Z6pNZ1Hsw+luwziMH4woKGfFJFJMoeP8 agGtiGY5yB0XDmhvnb/MgHNlqqow2Rv9HB1BR6fkcCqvWfRmFzYG5wyzHMdx9z9UHDNr00xpeizwr +u6LRYmf2oueiTqID/14DyOFQaJZFfjoiM3bwg2wcFm37mGKzTplNPwujxPT5ywLLZy29TVVI9/Hv ycnCiWF0oAWQ/miRdkfEK1x5BQs3tjag6ebfuRnPkdWtQ8/fEjypdugEl8GA6HgmSLQrkt+wQkvyE HG36M0ZfMbQLng==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Sergey Trofimov Subject: Re: [bug#77019] [PATCH] machine: hetzner: Allow attaching existing public IPs. In-Reply-To: <0739a3a367114259a24b13f16d2673eb6d63b1f1.1744988608.git.sarg@sarg.org.ru> (Sergey Trofimov's message of "Fri, 18 Apr 2025 17:08:08 +0200") References: <0739a3a367114259a24b13f16d2673eb6d63b1f1.1744988608.git.sarg@sarg.org.ru> Date: Mon, 21 Apr 2025 23:56:50 +0200 Message-ID: <878qnt41r1.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77019-done Cc: 77019-done@debbugs.gnu.org, Maxim Cournoyer , Roman Scherer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Sergey Trofimov writes: > * gnu/machine/hetzner.scm (hetzner-configuration): Add ipv4 and ipv6 > fields. Export accessors. > * gnu/machine/hetzner/http.scm (hetnzer-api-primary-ips): New function. > (): New json mapping. > (hetzner-api-server-create): Pass IP addresses in request. > * doc/guix.texi (Invoking guix deploy): Document it. > > Change-Id: I44509cc98e041762dc483e876566e79bde85b26a Applied, thanks! From unknown Sun Jun 22 07:32:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 20 May 2025 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator