diff --git a/locale/mgradm/it.po b/locale/mgradm/it.po index ea7a3b7b1..b24cb8140 100644 --- a/locale/mgradm/it.po +++ b/locale/mgradm/it.po @@ -8,15 +8,16 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-05-16 10:27+0200\n" -"PO-Revision-Date: 2024-04-30 09:43+0000\n" +"PO-Revision-Date: 2024-05-16 09:23+0000\n" "Last-Translator: Marina Latini \n" -"Language-Team: Italian \n" +"Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.9.1\n" +"X-Generator: Weblate 5.5.5\n" #: mgradm/cmd/distro/detect.go:92 msgid "distribution not found in product map. Please update productmap or provide channel label" @@ -67,9 +68,9 @@ msgid "distribution with same name already exists: %s" msgstr "la distribuzione esiste già: %s" #: mgradm/cmd/distro/cp.go:96 -#, fuzzy, javascript-format +#, javascript-format msgid "cannot create %s path in container" -msgstr "impossibile creare il percorso %s nel container: %s" +msgstr "impossibile creare il percorso %s nel container" #: mgradm/cmd/distro/cp.go:99 #, javascript-format @@ -79,9 +80,9 @@ msgstr "Copia della distribuzione %s" #: mgradm/cmd/distro/cp.go:101 mgradm/shared/podman/podman.go:122 #: mgradm/shared/podman/podman.go:125 mgradm/shared/podman/podman.go:128 #: mgradm/shared/podman/podman.go:136 -#, fuzzy, javascript-format +#, javascript-format msgid "cannot copy %s" -msgstr "impossibile copiare %s: %s" +msgstr "impossibile copiare %s" #: mgradm/cmd/distro/cp.go:103 #, javascript-format @@ -345,9 +346,8 @@ msgstr "" #: mgradm/shared/kubernetes/install.go:137 mgradm/shared/kubernetes/k3s.go:47 #: mgradm/shared/kubernetes/k3s.go:52 mgradm/shared/podman/podman.go:236 #: mgradm/shared/podman/podman.go:241 mgradm/shared/podman/podman.go:335 -#, fuzzy msgid "failed to compute image URL" -msgstr "impossibile determinare l'URL dell'immagine: %s" +msgstr "impossibile determinare l'URL dell'immagine" #: mgradm/cmd/install/podman/utils.go:40 #, fuzzy @@ -1052,9 +1052,9 @@ msgid "Failed deleting secret" msgstr "" #: mgradm/cmd/uninstall/podman.go:40 -#, fuzzy, javascript-format +#, javascript-format msgid "cannot delete volume %s" -msgstr "impossible eliminare %s: %s" +msgstr "impossible eliminare il volume %s" #: mgradm/cmd/uninstall/podman.go:43 msgid "All volumes removed" @@ -1222,9 +1222,8 @@ msgid "Server Deployment:" msgstr "" #: mgradm/cmd/cmd.go:51 -#, fuzzy msgid "Server Management:" -msgstr "Gestione dell'Hub" +msgstr "Gestione del Server:" #: mgradm/cmd/cmd.go:55 #, fuzzy @@ -1380,9 +1379,9 @@ msgstr "" #: mgradm/shared/kubernetes/k3s.go:64 mgradm/shared/kubernetes/k3s.go:113 #: mgradm/shared/kubernetes/k3s.go:159 -#, fuzzy, javascript-format +#, javascript-format msgid "cannot delete %s" -msgstr "impossible eliminare %s: %s" +msgstr "impossible eliminare %s" #: mgradm/shared/kubernetes/k3s.go:93 mgradm/shared/kubernetes/k3s.go:139 #: mgradm/shared/kubernetes/k3s.go:186 diff --git a/locale/mgradm/mgradm.pot b/locale/mgradm/mgradm.pot index 95d29a7b3..3df22079e 100644 --- a/locale/mgradm/mgradm.pot +++ b/locale/mgradm/mgradm.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-16 10:27+0200\n" +"POT-Creation-Date: 2024-05-16 11:25+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/locale/mgrctl/de.po b/locale/mgrctl/de.po new file mode 100644 index 000000000..ec72076a6 --- /dev/null +++ b/locale/mgrctl/de.po @@ -0,0 +1,135 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-05-16 10:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: mgrctl/cmd/api/api.go:25 +msgid "JSON over HTTP API helper tool" +msgstr "" + +#: mgrctl/cmd/api/api.go:30 +msgid "Call API GET request" +msgstr "" + +#: mgrctl/cmd/api/api.go:31 +msgid "Takes an API path and optional parameters and then issues GET request with them. If user and password are provided, calls login before API call" +msgstr "" + +#: mgrctl/cmd/api/api.go:39 +msgid "Call API POST request" +msgstr "" + +#: mgrctl/cmd/api/api.go:40 +msgid "Takes an API path and parameters and then issues POST request with them. User and password are mandatory. Parameters can be either JSON encoded string or one or more key=value pairs." +msgstr "" + +#: mgrctl/cmd/api/get.go:26 mgrctl/cmd/api/post.go:26 +msgid "unable to login to the server" +msgstr "" + +#: mgrctl/cmd/api/get.go:33 mgrctl/cmd/api/post.go:49 +#, javascript-format +msgid "error in query %s" +msgstr "" + +#: mgrctl/cmd/cp/cp.go:29 +msgid "Copy files to and from the containers" +msgstr "" + +#: mgrctl/cmd/cp/cp.go:30 +msgid "" +"Takes a source and destination parameters.\n" +"\tOne of them can be prefixed with 'server:' to indicate the path is within the server pod." +msgstr "" + +#: mgrctl/cmd/cp/cp.go:39 +msgid "failed to unmarshall configuration" +msgstr "" + +#: mgrctl/cmd/cp/cp.go:45 +msgid "User or UID to set on the destination file" +msgstr "" + +#: mgrctl/cmd/cp/cp.go:46 +msgid "Group or GID to set on the destination file" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:37 +msgid "Execute commands inside the uyuni containers using 'sh -c'" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:43 +msgid "environment variables to pass to the command, separated by commas" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:44 +msgid "Pass stdin to the container" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:45 +msgid "Stdin is a TTY" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:98 +msgid "Command failed" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:102 +msgid "Command returned with exit code 0" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:116 +msgid "cannot write" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:132 +#, javascript-format +msgid "Running %s" +msgstr "" + +#: mgrctl/cmd/term/term.go:21 +msgid "Run a terminal inside the server container" +msgstr "" + +#: mgrctl/cmd/cmd.go:29 +msgid "Uyuni control tool" +msgstr "" + +#: mgrctl/cmd/cmd.go:30 +msgid "Tool to help managing Uyuni servers mainly through their API" +msgstr "" + +#: mgrctl/cmd/cmd.go:37 +msgid "configuration file path" +msgstr "" + +#: mgrctl/cmd/cmd.go:38 +msgid "application log level" +msgstr "" + +#: mgrctl/cmd/cmd.go:46 +#, javascript-format +msgid "Welcome to %s" +msgstr "" + +#: mgrctl/cmd/cmd.go:47 +#, javascript-format +msgid "Executing command: %s" +msgstr "" + +#: mgrctl/cmd/cmd.go:53 +msgid "Failed to create api command" +msgstr "" diff --git a/locale/mgrctl/es.po b/locale/mgrctl/es.po new file mode 100644 index 000000000..f7b166b3f --- /dev/null +++ b/locale/mgrctl/es.po @@ -0,0 +1,135 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-05-16 11:25+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: mgrctl/cmd/api/api.go:25 +msgid "JSON over HTTP API helper tool" +msgstr "" + +#: mgrctl/cmd/api/api.go:30 +msgid "Call API GET request" +msgstr "" + +#: mgrctl/cmd/api/api.go:31 +msgid "Takes an API path and optional parameters and then issues GET request with them. If user and password are provided, calls login before API call" +msgstr "" + +#: mgrctl/cmd/api/api.go:39 +msgid "Call API POST request" +msgstr "" + +#: mgrctl/cmd/api/api.go:40 +msgid "Takes an API path and parameters and then issues POST request with them. User and password are mandatory. Parameters can be either JSON encoded string or one or more key=value pairs." +msgstr "" + +#: mgrctl/cmd/api/get.go:26 mgrctl/cmd/api/post.go:26 +msgid "unable to login to the server" +msgstr "" + +#: mgrctl/cmd/api/get.go:33 mgrctl/cmd/api/post.go:49 +#, javascript-format +msgid "error in query %s" +msgstr "" + +#: mgrctl/cmd/cp/cp.go:29 +msgid "Copy files to and from the containers" +msgstr "" + +#: mgrctl/cmd/cp/cp.go:30 +msgid "" +"Takes a source and destination parameters.\n" +"\tOne of them can be prefixed with 'server:' to indicate the path is within the server pod." +msgstr "" + +#: mgrctl/cmd/cp/cp.go:39 +msgid "failed to unmarshall configuration" +msgstr "" + +#: mgrctl/cmd/cp/cp.go:45 +msgid "User or UID to set on the destination file" +msgstr "" + +#: mgrctl/cmd/cp/cp.go:46 +msgid "Group or GID to set on the destination file" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:37 +msgid "Execute commands inside the uyuni containers using 'sh -c'" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:43 +msgid "environment variables to pass to the command, separated by commas" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:44 +msgid "Pass stdin to the container" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:45 +msgid "Stdin is a TTY" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:98 +msgid "Command failed" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:102 +msgid "Command returned with exit code 0" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:116 +msgid "cannot write" +msgstr "" + +#: mgrctl/cmd/exec/exec.go:132 +#, javascript-format +msgid "Running %s" +msgstr "" + +#: mgrctl/cmd/term/term.go:21 +msgid "Run a terminal inside the server container" +msgstr "" + +#: mgrctl/cmd/cmd.go:29 +msgid "Uyuni control tool" +msgstr "" + +#: mgrctl/cmd/cmd.go:30 +msgid "Tool to help managing Uyuni servers mainly through their API" +msgstr "" + +#: mgrctl/cmd/cmd.go:37 +msgid "configuration file path" +msgstr "" + +#: mgrctl/cmd/cmd.go:38 +msgid "application log level" +msgstr "" + +#: mgrctl/cmd/cmd.go:46 +#, javascript-format +msgid "Welcome to %s" +msgstr "" + +#: mgrctl/cmd/cmd.go:47 +#, javascript-format +msgid "Executing command: %s" +msgstr "" + +#: mgrctl/cmd/cmd.go:53 +msgid "Failed to create api command" +msgstr "" diff --git a/locale/mgrctl/it.po b/locale/mgrctl/it.po index cc512a85b..92aa85bf9 100644 --- a/locale/mgrctl/it.po +++ b/locale/mgrctl/it.po @@ -8,15 +8,16 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-05-16 10:27+0200\n" -"PO-Revision-Date: 2024-04-26 19:43+0000\n" +"PO-Revision-Date: 2024-05-16 09:49+0000\n" "Last-Translator: Marina Latini \n" -"Language-Team: Italian \n" +"Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.9.1\n" +"X-Generator: Weblate 5.5.5\n" #: mgrctl/cmd/api/api.go:25 msgid "JSON over HTTP API helper tool" @@ -39,9 +40,8 @@ msgid "Takes an API path and parameters and then issues POST request with them. msgstr "" #: mgrctl/cmd/api/get.go:26 mgrctl/cmd/api/post.go:26 -#, fuzzy msgid "unable to login to the server" -msgstr "impossibile effettuare il login al server: %s" +msgstr "impossibile effettuare il login al server" #: mgrctl/cmd/api/get.go:33 mgrctl/cmd/api/post.go:49 #, javascript-format diff --git a/locale/mgrctl/mgrctl.pot b/locale/mgrctl/mgrctl.pot index 9c88833fc..20b798462 100644 --- a/locale/mgrctl/mgrctl.pot +++ b/locale/mgrctl/mgrctl.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-16 10:27+0200\n" +"POT-Creation-Date: 2024-05-16 11:25+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/locale/mgrpxy/de.po b/locale/mgrpxy/de.po new file mode 100644 index 000000000..0e0fdebe5 --- /dev/null +++ b/locale/mgrpxy/de.po @@ -0,0 +1,408 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-05-16 11:25+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: mgrpxy/cmd/install/install.go:19 mgrpxy/cmd/install/install.go:20 +msgid "Install a new proxy from scratch" +msgstr "" + +#: mgrpxy/cmd/install/kubernetes/kubernetes.go:25 +msgid "Install a new proxy on a running kubernetes cluster" +msgstr "" + +#: mgrpxy/cmd/install/kubernetes/kubernetes.go:26 +msgid "" +"Install a new proxy on a running kubernetes cluster.\n" +"\n" +"It only takes the path to the configuration tarball generated by the server\n" +"as parameter.\n" +"\n" +"The install kubernetes command assumes kubectl is installed locally.\n" +"\n" +"NOTE: for now installing on a remote kubernetes cluster is not supported!\n" +msgstr "" + +#: mgrpxy/cmd/install/kubernetes/utils.go:26 +#: mgrpxy/shared/kubernetes/deploy.go:137 +#, javascript-format +msgid "install %s before running this command" +msgstr "" + +#: mgrpxy/cmd/install/kubernetes/utils.go:35 +#: mgrpxy/shared/kubernetes/deploy.go:143 +msgid "failed to create temporary directory" +msgstr "" + +#: mgrpxy/cmd/install/kubernetes/utils.go:40 +msgid "failed to extract configuration" +msgstr "" + +#: mgrpxy/cmd/install/kubernetes/utils.go:62 +#: mgrpxy/shared/kubernetes/deploy.go:168 +msgid "cannot deploy proxy helm chart" +msgstr "" + +#: mgrpxy/cmd/install/podman/podman.go:25 +msgid "Install a new proxy on podman" +msgstr "" + +#: mgrpxy/cmd/install/podman/podman.go:26 +msgid "" +"Install a new proxy on podman\n" +"\n" +"It only takes the path to the configuration tarball generated by the server\n" +"as parameter.\n" +"\n" +"The install podman command assumes podman is installed locally.\n" +"\n" +"NOTE: for now installing on a remote podman is not supported!\n" +msgstr "" + +#: mgrpxy/cmd/install/podman/utils.go:32 mgrpxy/shared/podman/podman.go:168 +msgid "install podman before running this command" +msgstr "" + +#: mgrpxy/cmd/install/podman/utils.go:37 +#, javascript-format +msgid "failed to extract proxy config from %s file" +msgstr "" + +#: mgrpxy/cmd/restart/restart.go:23 mgrpxy/cmd/restart/restart.go:24 +msgid "Restart the proxy" +msgstr "" + +#: mgrpxy/cmd/start/start.go:23 mgrpxy/cmd/start/start.go:24 +msgid "Start the proxy" +msgstr "" + +#: mgrpxy/cmd/status/status.go:24 mgrpxy/cmd/status/status.go:25 +msgid "Get the proxy status" +msgstr "" + +#: mgrpxy/cmd/status/status.go:46 +msgid "no installed proxy detected" +msgstr "" + +#: mgrpxy/cmd/status/podman.go:30 +#, javascript-format +msgid "Failed to get status of the %s service" +msgstr "" + +#: mgrpxy/cmd/status/podman.go:31 +msgid "failed to get the status of at least one service" +msgstr "" + +#: mgrpxy/cmd/status/kubernetes.go:27 +msgid "failed to discover the cluster type" +msgstr "" + +#: mgrpxy/cmd/status/kubernetes.go:32 +msgid "no uyuni-proxy helm release installed on the cluster" +msgstr "" + +#: mgrpxy/cmd/status/kubernetes.go:37 +msgid "failed to find the uyuni-proxy deployment namespace" +msgstr "" + +#: mgrpxy/cmd/status/kubernetes.go:43 +msgid "failed to get deployment status" +msgstr "" + +#: mgrpxy/cmd/status/kubernetes.go:46 +msgid "Some replicas are not ready: %[1]d / %[2]d" +msgstr "" + +#: mgrpxy/cmd/status/kubernetes.go:50 +msgid "the pod is not running" +msgstr "" + +#: mgrpxy/cmd/status/kubernetes.go:53 +msgid "Proxy containers up and running" +msgstr "" + +#: mgrpxy/cmd/stop/stop.go:23 mgrpxy/cmd/stop/stop.go:24 +msgid "Stop the proxy" +msgstr "" + +#: mgrpxy/cmd/uninstall/podman.go:46 +#, javascript-format +msgid "cannot delete volume %s" +msgstr "" + +#: mgrpxy/cmd/uninstall/podman.go:49 +msgid "All volumes removed" +msgstr "" + +#: mgrpxy/cmd/uninstall/uninstall.go:21 +msgid "Uninstall a proxy" +msgstr "" + +#: mgrpxy/cmd/uninstall/uninstall.go:22 +msgid "" +"Uninstall a proxy and optionally the corresponding volumes.\n" +"By default it will only print what would be done, use --force to actually remove." +msgstr "" + +#: mgrpxy/cmd/uninstall/uninstall.go:34 +msgid "failed to determine suitable backend" +msgstr "" + +#: mgrpxy/cmd/uninstall/uninstall.go:49 +msgid "Actually remove the proxy" +msgstr "" + +#: mgrpxy/cmd/uninstall/uninstall.go:50 +msgid "Also remove the volumes" +msgstr "" + +#: mgrpxy/cmd/cmd.go:33 +msgid "Uyuni proxy administration tool" +msgstr "" + +#: mgrpxy/cmd/cmd.go:34 +msgid "Tool to help administering Uyuni proxies in containers" +msgstr "" + +#: mgrpxy/cmd/cmd.go:47 +#, javascript-format +msgid "Welcome to %s" +msgstr "" + +#: mgrpxy/cmd/cmd.go:48 +#, javascript-format +msgid "Executing command: %s" +msgstr "" + +#: mgrpxy/cmd/cmd.go:52 +msgid "configuration file path" +msgstr "" + +#: mgrpxy/cmd/cmd.go:53 +msgid "application log level" +msgstr "" + +#: mgrpxy/cmd/support/ptf/kubernetes/kubernetes.go:25 +msgid "Install a PTF or Test package on a kubernetes cluster" +msgstr "" + +#: mgrpxy/cmd/support/ptf/kubernetes/kubernetes.go:26 +msgid "" +"Install a PTR of Test package on a kubernetes cluster\n" +"\n" +"The support ptf command assumes the following:\n" +" * kubectl and helm are installed locally\n" +" * a working kubectl configuration should be set to connect to the cluster to deploy to\n" +"\n" +"The helm values file will be overridden with the values from the command parameters or configuration.\n" +"\n" +"NOTE: installing on a remote cluster is not supported yet!\n" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/podman.go:30 +msgid "Install a PTF or Test package on podman" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/podman.go:31 +msgid "" +"Install a PTF or Test package on podman\n" +"\n" +"The support ptf podman command assumes podman is installed locally and\n" +"the host machine is register to SCC.\n" +"\n" +"NOTE: for now installing on a remote podman is not supported!\n" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:34 +msgid "ptf and test flags cannot be set simultaneously " +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:37 +msgid "ptf and test flags cannot be empty simultaneously " +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:40 +msgid "user flag cannot be empty" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:54 +#, javascript-format +msgid "The httpd ptf image computed is: %s" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:64 +#, javascript-format +msgid "The ssh ptf image computed is: %s" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:74 +#, javascript-format +msgid "The tftpd ptf image computed is: %s" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:84 +#, javascript-format +msgid "The salt-broker ptf image computed is: %s" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:94 +#, javascript-format +msgid "The squid ptf image computed is: %s" +msgstr "" + +#: mgrpxy/cmd/support/ptf/ptf.go:20 +msgid "Install a PTF" +msgstr "" + +#: mgrpxy/cmd/support/support.go:18 mgrpxy/cmd/support/support.go:19 +msgid "Commands for support operations" +msgstr "" + +#: mgrpxy/cmd/upgrade/kubernetes/kubernetes.go:20 +msgid "Upgrade a proxy on a running kubernetes cluster" +msgstr "" + +#: mgrpxy/cmd/upgrade/kubernetes/kubernetes.go:21 +msgid "" +"Upgrade a proxy on a running kubernetes cluster.\n" +"\n" +"The upgrade kubernetes command assumes kubectl is installed locally.\n" +"\n" +"NOTE: for now upgrading on a remote kubernetes cluster is not supported!\n" +msgstr "" + +#: mgrpxy/cmd/upgrade/podman/podman.go:20 +msgid "Upgrade a proxy on podman" +msgstr "" + +#: mgrpxy/cmd/upgrade/podman/podman.go:21 +msgid "" +"Upgrade a proxy on podman\n" +"\n" +"The upgrade podman command assumes podman is upgraded locally.\n" +"\n" +"NOTE: for now upgrading on a remote podman is not supported!\n" +msgstr "" + +#: mgrpxy/cmd/upgrade/upgrade.go:19 mgrpxy/cmd/upgrade/upgrade.go:20 +msgid "Upgrade a proxy" +msgstr "" + +#: mgrpxy/shared/kubernetes/cmd.go:25 +msgid "Kubernetes namespace where to install the proxy" +msgstr "" + +#: mgrpxy/shared/kubernetes/cmd.go:26 +msgid "URL to the proxy helm chart" +msgstr "" + +#: mgrpxy/shared/kubernetes/cmd.go:27 +msgid "Version of the proxy helm chart" +msgstr "" + +#: mgrpxy/shared/kubernetes/cmd.go:28 +msgid "Path to a values YAML file to use for proxy helm install" +msgstr "" + +#: mgrpxy/shared/kubernetes/deploy.go:34 +msgid "Installing Uyuni proxy" +msgstr "" + +#: mgrpxy/shared/kubernetes/deploy.go:80 +msgid "cannot run helm upgrade" +msgstr "" + +#: mgrpxy/shared/kubernetes/deploy.go:96 mgrpxy/shared/kubernetes/deploy.go:111 +#: mgrpxy/shared/kubernetes/deploy.go:126 +#, javascript-format +msgid "failed to write in file %s" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:34 +msgid "cannot setup network" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:37 +msgid "Generating systemd services" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:113 +#, javascript-format +msgid "failed to generate systemd file '%s'" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:133 mgrpxy/shared/podman/podman.go:204 +msgid "cannot inspect host values" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:153 +#, javascript-format +msgid "Setting up proxy with configuration %s" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:173 +msgid "cannot find httpd image: it will no be upgraded" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:177 +msgid "cannot find salt-broker image: it will no be upgraded" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:181 +msgid "cannot find squid image: it will no be upgraded" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:185 +msgid "cannot find ssh image: it will no be upgraded" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:189 +msgid "cannot find tftpd image: it will no be upgraded" +msgstr "" + +#: mgrpxy/shared/utils/cmd.go:17 +#, javascript-format +msgid "argument is not an existing file: %s" +msgstr "" + +#: mgrpxy/shared/utils/flags.go:48 +#, javascript-format +msgid "Invalid proxy container name: %s" +msgstr "" + +#: mgrpxy/shared/utils/flags.go:62 +msgid "failed to compute image URL" +msgstr "" + +#: mgrpxy/shared/utils/flags.go:70 mgrpxy/shared/utils/flags.go:84 +#: mgrpxy/shared/utils/flags.go:98 +msgid "registry URL prefix containing the all the container images" +msgstr "" + +#: mgrpxy/shared/utils/flags.go:71 mgrpxy/shared/utils/flags.go:85 +#: mgrpxy/shared/utils/flags.go:99 +msgid "image tag" +msgstr "" + +#: mgrpxy/shared/utils/flags.go:111 +#, javascript-format +msgid "Image for %s container, overrides the namespace if set" +msgstr "" + +#: mgrpxy/shared/utils/flags.go:113 +#, javascript-format +msgid "Tag for %s container, overrides the global value if set" +msgstr "" diff --git a/locale/mgrpxy/es.po b/locale/mgrpxy/es.po new file mode 100644 index 000000000..b8fa1b672 --- /dev/null +++ b/locale/mgrpxy/es.po @@ -0,0 +1,408 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-05-16 11:25+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: mgrpxy/cmd/install/install.go:19 mgrpxy/cmd/install/install.go:20 +msgid "Install a new proxy from scratch" +msgstr "" + +#: mgrpxy/cmd/install/kubernetes/kubernetes.go:25 +msgid "Install a new proxy on a running kubernetes cluster" +msgstr "" + +#: mgrpxy/cmd/install/kubernetes/kubernetes.go:26 +msgid "" +"Install a new proxy on a running kubernetes cluster.\n" +"\n" +"It only takes the path to the configuration tarball generated by the server\n" +"as parameter.\n" +"\n" +"The install kubernetes command assumes kubectl is installed locally.\n" +"\n" +"NOTE: for now installing on a remote kubernetes cluster is not supported!\n" +msgstr "" + +#: mgrpxy/cmd/install/kubernetes/utils.go:26 +#: mgrpxy/shared/kubernetes/deploy.go:137 +#, javascript-format +msgid "install %s before running this command" +msgstr "" + +#: mgrpxy/cmd/install/kubernetes/utils.go:35 +#: mgrpxy/shared/kubernetes/deploy.go:143 +msgid "failed to create temporary directory" +msgstr "" + +#: mgrpxy/cmd/install/kubernetes/utils.go:40 +msgid "failed to extract configuration" +msgstr "" + +#: mgrpxy/cmd/install/kubernetes/utils.go:62 +#: mgrpxy/shared/kubernetes/deploy.go:168 +msgid "cannot deploy proxy helm chart" +msgstr "" + +#: mgrpxy/cmd/install/podman/podman.go:25 +msgid "Install a new proxy on podman" +msgstr "" + +#: mgrpxy/cmd/install/podman/podman.go:26 +msgid "" +"Install a new proxy on podman\n" +"\n" +"It only takes the path to the configuration tarball generated by the server\n" +"as parameter.\n" +"\n" +"The install podman command assumes podman is installed locally.\n" +"\n" +"NOTE: for now installing on a remote podman is not supported!\n" +msgstr "" + +#: mgrpxy/cmd/install/podman/utils.go:32 mgrpxy/shared/podman/podman.go:168 +msgid "install podman before running this command" +msgstr "" + +#: mgrpxy/cmd/install/podman/utils.go:37 +#, javascript-format +msgid "failed to extract proxy config from %s file" +msgstr "" + +#: mgrpxy/cmd/restart/restart.go:23 mgrpxy/cmd/restart/restart.go:24 +msgid "Restart the proxy" +msgstr "" + +#: mgrpxy/cmd/start/start.go:23 mgrpxy/cmd/start/start.go:24 +msgid "Start the proxy" +msgstr "" + +#: mgrpxy/cmd/status/status.go:24 mgrpxy/cmd/status/status.go:25 +msgid "Get the proxy status" +msgstr "" + +#: mgrpxy/cmd/status/status.go:46 +msgid "no installed proxy detected" +msgstr "" + +#: mgrpxy/cmd/status/podman.go:30 +#, javascript-format +msgid "Failed to get status of the %s service" +msgstr "" + +#: mgrpxy/cmd/status/podman.go:31 +msgid "failed to get the status of at least one service" +msgstr "" + +#: mgrpxy/cmd/status/kubernetes.go:27 +msgid "failed to discover the cluster type" +msgstr "" + +#: mgrpxy/cmd/status/kubernetes.go:32 +msgid "no uyuni-proxy helm release installed on the cluster" +msgstr "" + +#: mgrpxy/cmd/status/kubernetes.go:37 +msgid "failed to find the uyuni-proxy deployment namespace" +msgstr "" + +#: mgrpxy/cmd/status/kubernetes.go:43 +msgid "failed to get deployment status" +msgstr "" + +#: mgrpxy/cmd/status/kubernetes.go:46 +msgid "Some replicas are not ready: %[1]d / %[2]d" +msgstr "" + +#: mgrpxy/cmd/status/kubernetes.go:50 +msgid "the pod is not running" +msgstr "" + +#: mgrpxy/cmd/status/kubernetes.go:53 +msgid "Proxy containers up and running" +msgstr "" + +#: mgrpxy/cmd/stop/stop.go:23 mgrpxy/cmd/stop/stop.go:24 +msgid "Stop the proxy" +msgstr "" + +#: mgrpxy/cmd/uninstall/podman.go:46 +#, javascript-format +msgid "cannot delete volume %s" +msgstr "" + +#: mgrpxy/cmd/uninstall/podman.go:49 +msgid "All volumes removed" +msgstr "" + +#: mgrpxy/cmd/uninstall/uninstall.go:21 +msgid "Uninstall a proxy" +msgstr "" + +#: mgrpxy/cmd/uninstall/uninstall.go:22 +msgid "" +"Uninstall a proxy and optionally the corresponding volumes.\n" +"By default it will only print what would be done, use --force to actually remove." +msgstr "" + +#: mgrpxy/cmd/uninstall/uninstall.go:34 +msgid "failed to determine suitable backend" +msgstr "" + +#: mgrpxy/cmd/uninstall/uninstall.go:49 +msgid "Actually remove the proxy" +msgstr "" + +#: mgrpxy/cmd/uninstall/uninstall.go:50 +msgid "Also remove the volumes" +msgstr "" + +#: mgrpxy/cmd/cmd.go:33 +msgid "Uyuni proxy administration tool" +msgstr "" + +#: mgrpxy/cmd/cmd.go:34 +msgid "Tool to help administering Uyuni proxies in containers" +msgstr "" + +#: mgrpxy/cmd/cmd.go:47 +#, javascript-format +msgid "Welcome to %s" +msgstr "" + +#: mgrpxy/cmd/cmd.go:48 +#, javascript-format +msgid "Executing command: %s" +msgstr "" + +#: mgrpxy/cmd/cmd.go:52 +msgid "configuration file path" +msgstr "" + +#: mgrpxy/cmd/cmd.go:53 +msgid "application log level" +msgstr "" + +#: mgrpxy/cmd/support/ptf/kubernetes/kubernetes.go:25 +msgid "Install a PTF or Test package on a kubernetes cluster" +msgstr "" + +#: mgrpxy/cmd/support/ptf/kubernetes/kubernetes.go:26 +msgid "" +"Install a PTR of Test package on a kubernetes cluster\n" +"\n" +"The support ptf command assumes the following:\n" +" * kubectl and helm are installed locally\n" +" * a working kubectl configuration should be set to connect to the cluster to deploy to\n" +"\n" +"The helm values file will be overridden with the values from the command parameters or configuration.\n" +"\n" +"NOTE: installing on a remote cluster is not supported yet!\n" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/podman.go:30 +msgid "Install a PTF or Test package on podman" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/podman.go:31 +msgid "" +"Install a PTF or Test package on podman\n" +"\n" +"The support ptf podman command assumes podman is installed locally and\n" +"the host machine is register to SCC.\n" +"\n" +"NOTE: for now installing on a remote podman is not supported!\n" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:34 +msgid "ptf and test flags cannot be set simultaneously " +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:37 +msgid "ptf and test flags cannot be empty simultaneously " +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:40 +msgid "user flag cannot be empty" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:54 +#, javascript-format +msgid "The httpd ptf image computed is: %s" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:64 +#, javascript-format +msgid "The ssh ptf image computed is: %s" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:74 +#, javascript-format +msgid "The tftpd ptf image computed is: %s" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:84 +#, javascript-format +msgid "The salt-broker ptf image computed is: %s" +msgstr "" + +#: mgrpxy/cmd/support/ptf/podman/utils.go:94 +#, javascript-format +msgid "The squid ptf image computed is: %s" +msgstr "" + +#: mgrpxy/cmd/support/ptf/ptf.go:20 +msgid "Install a PTF" +msgstr "" + +#: mgrpxy/cmd/support/support.go:18 mgrpxy/cmd/support/support.go:19 +msgid "Commands for support operations" +msgstr "" + +#: mgrpxy/cmd/upgrade/kubernetes/kubernetes.go:20 +msgid "Upgrade a proxy on a running kubernetes cluster" +msgstr "" + +#: mgrpxy/cmd/upgrade/kubernetes/kubernetes.go:21 +msgid "" +"Upgrade a proxy on a running kubernetes cluster.\n" +"\n" +"The upgrade kubernetes command assumes kubectl is installed locally.\n" +"\n" +"NOTE: for now upgrading on a remote kubernetes cluster is not supported!\n" +msgstr "" + +#: mgrpxy/cmd/upgrade/podman/podman.go:20 +msgid "Upgrade a proxy on podman" +msgstr "" + +#: mgrpxy/cmd/upgrade/podman/podman.go:21 +msgid "" +"Upgrade a proxy on podman\n" +"\n" +"The upgrade podman command assumes podman is upgraded locally.\n" +"\n" +"NOTE: for now upgrading on a remote podman is not supported!\n" +msgstr "" + +#: mgrpxy/cmd/upgrade/upgrade.go:19 mgrpxy/cmd/upgrade/upgrade.go:20 +msgid "Upgrade a proxy" +msgstr "" + +#: mgrpxy/shared/kubernetes/cmd.go:25 +msgid "Kubernetes namespace where to install the proxy" +msgstr "" + +#: mgrpxy/shared/kubernetes/cmd.go:26 +msgid "URL to the proxy helm chart" +msgstr "" + +#: mgrpxy/shared/kubernetes/cmd.go:27 +msgid "Version of the proxy helm chart" +msgstr "" + +#: mgrpxy/shared/kubernetes/cmd.go:28 +msgid "Path to a values YAML file to use for proxy helm install" +msgstr "" + +#: mgrpxy/shared/kubernetes/deploy.go:34 +msgid "Installing Uyuni proxy" +msgstr "" + +#: mgrpxy/shared/kubernetes/deploy.go:80 +msgid "cannot run helm upgrade" +msgstr "" + +#: mgrpxy/shared/kubernetes/deploy.go:96 mgrpxy/shared/kubernetes/deploy.go:111 +#: mgrpxy/shared/kubernetes/deploy.go:126 +#, javascript-format +msgid "failed to write in file %s" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:34 +msgid "cannot setup network" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:37 +msgid "Generating systemd services" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:113 +#, javascript-format +msgid "failed to generate systemd file '%s'" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:133 mgrpxy/shared/podman/podman.go:204 +msgid "cannot inspect host values" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:153 +#, javascript-format +msgid "Setting up proxy with configuration %s" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:173 +msgid "cannot find httpd image: it will no be upgraded" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:177 +msgid "cannot find salt-broker image: it will no be upgraded" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:181 +msgid "cannot find squid image: it will no be upgraded" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:185 +msgid "cannot find ssh image: it will no be upgraded" +msgstr "" + +#: mgrpxy/shared/podman/podman.go:189 +msgid "cannot find tftpd image: it will no be upgraded" +msgstr "" + +#: mgrpxy/shared/utils/cmd.go:17 +#, javascript-format +msgid "argument is not an existing file: %s" +msgstr "" + +#: mgrpxy/shared/utils/flags.go:48 +#, javascript-format +msgid "Invalid proxy container name: %s" +msgstr "" + +#: mgrpxy/shared/utils/flags.go:62 +msgid "failed to compute image URL" +msgstr "" + +#: mgrpxy/shared/utils/flags.go:70 mgrpxy/shared/utils/flags.go:84 +#: mgrpxy/shared/utils/flags.go:98 +msgid "registry URL prefix containing the all the container images" +msgstr "" + +#: mgrpxy/shared/utils/flags.go:71 mgrpxy/shared/utils/flags.go:85 +#: mgrpxy/shared/utils/flags.go:99 +msgid "image tag" +msgstr "" + +#: mgrpxy/shared/utils/flags.go:111 +#, javascript-format +msgid "Image for %s container, overrides the namespace if set" +msgstr "" + +#: mgrpxy/shared/utils/flags.go:113 +#, javascript-format +msgid "Tag for %s container, overrides the global value if set" +msgstr "" diff --git a/locale/mgrpxy/fr.po b/locale/mgrpxy/fr.po index d31196ffa..c185932a7 100644 --- a/locale/mgrpxy/fr.po +++ b/locale/mgrpxy/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-16 10:27+0200\n" +"POT-Creation-Date: 2024-05-16 11:25+0200\n" "PO-Revision-Date: 2024-04-08 11:17+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -18,6 +18,10 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4.2\n" +#: mgrpxy/cmd/install/install.go:19 mgrpxy/cmd/install/install.go:20 +msgid "Install a new proxy from scratch" +msgstr "Installer un nouveau proxy" + #: mgrpxy/cmd/install/kubernetes/kubernetes.go:25 msgid "Install a new proxy on a running kubernetes cluster" msgstr "Installer un nouveau proxy sur un cluster kubernetes existant" @@ -97,10 +101,6 @@ msgstr "installer podman avant d'exécuter cette commande" msgid "failed to extract proxy config from %s file" msgstr "impossible d'extraire la configuration du proxy du fichier %s: %s" -#: mgrpxy/cmd/install/install.go:19 mgrpxy/cmd/install/install.go:20 -msgid "Install a new proxy from scratch" -msgstr "Installer un nouveau proxy" - #: mgrpxy/cmd/restart/restart.go:23 mgrpxy/cmd/restart/restart.go:24 msgid "Restart the proxy" msgstr "Redémarrer le proxy" diff --git a/locale/mgrpxy/it.po b/locale/mgrpxy/it.po index 6859f3d62..59d32cd39 100644 --- a/locale/mgrpxy/it.po +++ b/locale/mgrpxy/it.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-16 10:27+0200\n" -"PO-Revision-Date: 2024-04-25 20:43+0000\n" +"POT-Creation-Date: 2024-05-16 11:25+0200\n" +"PO-Revision-Date: 2024-05-16 09:23+0000\n" "Last-Translator: Marina Latini \n" "Language-Team: Italian \n" "Language: it\n" @@ -16,7 +16,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.9.1\n" +"X-Generator: Weblate 5.5.5\n" + +#: mgrpxy/cmd/install/install.go:19 mgrpxy/cmd/install/install.go:20 +msgid "Install a new proxy from scratch" +msgstr "" #: mgrpxy/cmd/install/kubernetes/kubernetes.go:25 msgid "Install a new proxy on a running kubernetes cluster" @@ -80,10 +84,6 @@ msgstr "installare podman prima di eseguire questo comando" msgid "failed to extract proxy config from %s file" msgstr "" -#: mgrpxy/cmd/install/install.go:19 mgrpxy/cmd/install/install.go:20 -msgid "Install a new proxy from scratch" -msgstr "" - #: mgrpxy/cmd/restart/restart.go:23 mgrpxy/cmd/restart/restart.go:24 msgid "Restart the proxy" msgstr "" @@ -142,9 +142,9 @@ msgid "Stop the proxy" msgstr "" #: mgrpxy/cmd/uninstall/podman.go:46 -#, fuzzy, javascript-format +#, javascript-format msgid "cannot delete volume %s" -msgstr "impossibile ispezionare i valori dell'host: %s" +msgstr "impossible eliminare il volume %s" #: mgrpxy/cmd/uninstall/podman.go:49 msgid "All volumes removed" @@ -390,7 +390,7 @@ msgstr "" #: mgrpxy/shared/utils/flags.go:62 msgid "failed to compute image URL" -msgstr "" +msgstr "impossibile determinare l'URL dell'immagine" #: mgrpxy/shared/utils/flags.go:70 mgrpxy/shared/utils/flags.go:84 #: mgrpxy/shared/utils/flags.go:98 diff --git a/locale/mgrpxy/ja.po b/locale/mgrpxy/ja.po index dd812fdee..067aced2f 100644 --- a/locale/mgrpxy/ja.po +++ b/locale/mgrpxy/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-16 10:27+0200\n" +"POT-Creation-Date: 2024-05-16 11:25+0200\n" "PO-Revision-Date: 2024-05-10 02:43+0000\n" "Last-Translator: Carina Hagl \n" "Language-Team: Japanese \n" @@ -18,6 +18,10 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 4.9.1\n" +#: mgrpxy/cmd/install/install.go:19 mgrpxy/cmd/install/install.go:20 +msgid "Install a new proxy from scratch" +msgstr "最初から新しいプロキシをインストールする" + #: mgrpxy/cmd/install/kubernetes/kubernetes.go:25 msgid "Install a new proxy on a running kubernetes cluster" msgstr "実行中のkubernetesクラスタに新しいプロキシをインストールする" @@ -95,10 +99,6 @@ msgstr "このコマンドを実行する前にpodmanをインストールする msgid "failed to extract proxy config from %s file" msgstr "プロキシ設定を %s ファイルから抽出できませんでした: %s" -#: mgrpxy/cmd/install/install.go:19 mgrpxy/cmd/install/install.go:20 -msgid "Install a new proxy from scratch" -msgstr "最初から新しいプロキシをインストールする" - #: mgrpxy/cmd/restart/restart.go:23 mgrpxy/cmd/restart/restart.go:24 msgid "Restart the proxy" msgstr "プロキシの再起動" diff --git a/locale/mgrpxy/ko.po b/locale/mgrpxy/ko.po index 3f02b4167..2287ddec4 100644 --- a/locale/mgrpxy/ko.po +++ b/locale/mgrpxy/ko.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-16 10:27+0200\n" +"POT-Creation-Date: 2024-05-16 11:25+0200\n" "PO-Revision-Date: 2024-05-08 09:43+0000\n" "Last-Translator: Seeun Lee \n" "Language-Team: Korean \n" @@ -18,6 +18,10 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 4.9.1\n" +#: mgrpxy/cmd/install/install.go:19 mgrpxy/cmd/install/install.go:20 +msgid "Install a new proxy from scratch" +msgstr "처음부터 새 프록시 설치" + #: mgrpxy/cmd/install/kubernetes/kubernetes.go:25 msgid "Install a new proxy on a running kubernetes cluster" msgstr "실행 중인 Kubernetes 클러스터에 새 프록시 설치" @@ -97,10 +101,6 @@ msgstr "이 명령을 실행하기 전 podman 설치" msgid "failed to extract proxy config from %s file" msgstr "%s 파일에서 프록시 구성을 추출하지 못함: %s" -#: mgrpxy/cmd/install/install.go:19 mgrpxy/cmd/install/install.go:20 -msgid "Install a new proxy from scratch" -msgstr "처음부터 새 프록시 설치" - #: mgrpxy/cmd/restart/restart.go:23 mgrpxy/cmd/restart/restart.go:24 msgid "Restart the proxy" msgstr "프록시 다시 시작" diff --git a/locale/mgrpxy/mgrpxy.pot b/locale/mgrpxy/mgrpxy.pot index 9c97420cb..930b74e18 100644 --- a/locale/mgrpxy/mgrpxy.pot +++ b/locale/mgrpxy/mgrpxy.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-16 10:27+0200\n" +"POT-Creation-Date: 2024-05-16 11:25+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,6 +17,10 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" +#: mgrpxy/cmd/install/install.go:19 mgrpxy/cmd/install/install.go:20 +msgid "Install a new proxy from scratch" +msgstr "" + #: mgrpxy/cmd/install/kubernetes/kubernetes.go:25 msgid "Install a new proxy on a running kubernetes cluster" msgstr "" @@ -78,10 +82,6 @@ msgstr "" msgid "failed to extract proxy config from %s file" msgstr "" -#: mgrpxy/cmd/install/install.go:19 mgrpxy/cmd/install/install.go:20 -msgid "Install a new proxy from scratch" -msgstr "" - #: mgrpxy/cmd/restart/restart.go:23 mgrpxy/cmd/restart/restart.go:24 msgid "Restart the proxy" msgstr "" diff --git a/locale/mgrpxy/zh_CN.po b/locale/mgrpxy/zh_CN.po index 5d0a61b5a..8dbb17705 100644 --- a/locale/mgrpxy/zh_CN.po +++ b/locale/mgrpxy/zh_CN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-16 10:27+0200\n" +"POT-Creation-Date: 2024-05-16 11:25+0200\n" "PO-Revision-Date: 2024-05-09 11:43+0000\n" "Last-Translator: Grace Yu \n" "Language-Team: Chinese (China) \n" @@ -18,6 +18,10 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 4.9.1\n" +#: mgrpxy/cmd/install/install.go:19 mgrpxy/cmd/install/install.go:20 +msgid "Install a new proxy from scratch" +msgstr "从头开始安装新代理" + #: mgrpxy/cmd/install/kubernetes/kubernetes.go:25 msgid "Install a new proxy on a running kubernetes cluster" msgstr "在正在运行的 kubernetes 群集上安装新代理" @@ -97,10 +101,6 @@ msgstr "在运行此命令前安装 podman" msgid "failed to extract proxy config from %s file" msgstr "无法从 %s 文件中提取代理配置:%s" -#: mgrpxy/cmd/install/install.go:19 mgrpxy/cmd/install/install.go:20 -msgid "Install a new proxy from scratch" -msgstr "从头开始安装新代理" - #: mgrpxy/cmd/restart/restart.go:23 mgrpxy/cmd/restart/restart.go:24 msgid "Restart the proxy" msgstr "重启动代理" diff --git a/locale/shared/de.po b/locale/shared/de.po new file mode 100644 index 000000000..0d2c3ae62 --- /dev/null +++ b/locale/shared/de.po @@ -0,0 +1,915 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-05-16 10:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: shared/api/org/createFirst.go:21 +msgid "failed to connect to the server" +msgstr "" + +#: shared/api/org/createFirst.go:35 +msgid "failed to create first user and organization" +msgstr "" + +#: shared/api/api.go:72 +msgid "FQDN of the server to connect to" +msgstr "" + +#: shared/api/api.go:73 +msgid "API user username" +msgstr "" + +#: shared/api/api.go:74 +msgid "Password for the API user" +msgstr "" + +#: shared/api/api.go:75 +msgid "Path to a cert file of the CA" +msgstr "" + +#: shared/api/api.go:76 +msgid "If set, server certificate will not be checked for validity" +msgstr "" + +#: shared/api/api.go:125 +#, javascript-format +msgid "unknown error: %d" +msgstr "" + +#: shared/api/api.go:167 +msgid "API server password" +msgstr "" + +#: shared/api/api.go:182 +msgid "Unable to create login data" +msgstr "" + +#: shared/api/api.go:212 +msgid "auth cookie not found in login response" +msgstr "" + +#: shared/api/api.go:228 +msgid "Unable to convert data to JSON" +msgstr "" + +#: shared/completion/completion.go:20 shared/completion/completion.go:21 +msgid "Generate shell completion script" +msgstr "" + +#: shared/completion/completion.go:30 shared/completion/completion.go:34 +#: shared/completion/completion.go:38 +#, javascript-format +msgid "cannot generate %s completion" +msgstr "" + +#: shared/kubernetes/rke2.go:21 +msgid "Installing RKE2 Nginx configuration" +msgstr "" + +#: shared/kubernetes/rke2.go:29 +msgid "Failed to write Rke2 nginx configuration" +msgstr "" + +#: shared/kubernetes/rke2.go:33 +msgid "Waiting for Nginx controller to be reloaded" +msgstr "" + +#: shared/kubernetes/uninstall.go:13 +msgid "" +"\n" +"Note that removing the volumes could also be handled automatically depending on the StorageClass used\n" +"when installed on a kubernetes cluster.\n" +"\n" +"For instance on a default K3S install, the local-path-provider storage volumes will\n" +"be automatically removed when deleting the deployment even if --purge-volumes argument is not used." +msgstr "" + +#: shared/kubernetes/helm.go:58 +msgid "failed to upgrade helm chart %[1]s in namespace %[2]s" +msgstr "" + +#: shared/kubernetes/helm.go:60 +msgid "failed to install helm chart %[1]s in namespace %[2]s" +msgstr "" + +#: shared/kubernetes/helm.go:81 +#, javascript-format +msgid "Failed to find %s's namespace, skipping removal" +msgstr "" + +#: shared/kubernetes/helm.go:89 +msgid "Cannot guess namespace" +msgstr "" + +#: shared/kubernetes/helm.go:98 shared/podman/network.go:94 +#: shared/podman/systemd.go:61 shared/podman/systemd.go:99 +#: shared/podman/systemd.go:100 shared/podman/utils.go:133 +#, javascript-format +msgid "Would run %s" +msgstr "" + +#: shared/kubernetes/helm.go:100 +#, javascript-format +msgid "Uninstalling %s" +msgstr "" + +#: shared/kubernetes/helm.go:102 +#, javascript-format +msgid "failed to run helm %s" +msgstr "" + +#: shared/kubernetes/helm.go:118 +#, javascript-format +msgid "failed to detect %s's namespace using helm" +msgstr "" + +#: shared/kubernetes/helm.go:122 +msgid "helm provided an invalid JSON output" +msgstr "" + +#: shared/kubernetes/helm.go:128 +msgid "found no or more than one deployment" +msgstr "" + +#: shared/kubernetes/k3s.go:25 +msgid "Installing K3s Traefik configuration" +msgstr "" + +#: shared/kubernetes/k3s.go:32 +msgid "Failed to write K3s Traefik configuration" +msgstr "" + +#: shared/kubernetes/k3s.go:36 +msgid "Waiting for Traefik to be reloaded" +msgstr "" + +#: shared/kubernetes/k3s.go:58 +#, javascript-format +msgid "install %s before running this command" +msgstr "" + +#: shared/kubernetes/k3s.go:65 shared/podman/utils.go:198 +#: shared/utils/utils.go:345 +msgid "failed to create temporary directory" +msgstr "" + +#: shared/kubernetes/k3s.go:78 +#, javascript-format +msgid "cannot delete %s" +msgstr "" + +#: shared/kubernetes/k3s.go:84 +msgid "cannot find node running uyuni" +msgstr "" + +#: shared/kubernetes/k3s.go:112 +msgid "cannot run inspect pod" +msgstr "" + +#: shared/kubernetes/k3s.go:117 shared/podman/utils.go:235 +msgid "cannot inspect data" +msgstr "" + +#: shared/kubernetes/kubernetes.go:54 +msgid "failed to get kubelet version" +msgstr "" + +#: shared/kubernetes/kubernetes.go:80 +msgid "failed to get pod commands to look for nginx controller" +msgstr "" + +#: shared/kubernetes/kubernetes.go:94 +#, javascript-format +msgid "cannot stop %s" +msgstr "" + +#: shared/kubernetes/kubernetes.go:134 +msgid "failed to run kubectl get configMap %[1]s %[2]s" +msgstr "" + +#: shared/kubernetes/kubernetes.go:144 +msgid "failed to run kubectl get secret %[1]s %[2]s" +msgstr "" + +#: shared/kubernetes/kubernetes.go:148 +#, javascript-format +msgid "Failed to base64 decode secret %s" +msgstr "" + +#: shared/kubernetes/utils.go:51 shared/kubernetes/utils.go:86 +msgid "failed to pull image" +msgstr "" + +#: shared/kubernetes/utils.go:54 +msgid "Waiting for %[1]s deployment to be ready in %[2]s namespace\n" +msgstr "" + +#: shared/kubernetes/utils.go:63 +msgid "failed to find a ready replica for deployment %[1]s in namespace %[2]s after 60s" +msgstr "" + +#: shared/kubernetes/utils.go:68 +msgid "Waiting for image of %[1]s pod in %[2]s namespace to be pulled" +msgstr "" + +#: shared/kubernetes/utils.go:81 +#, javascript-format +msgid "failed to get failed events for pod %s" +msgstr "" + +#: shared/kubernetes/utils.go:93 +#, javascript-format +msgid "failed to get events for pod %s" +msgstr "" + +#: shared/kubernetes/utils.go:139 +msgid "failed to parse deployment status" +msgstr "" + +#: shared/kubernetes/utils.go:153 +#, javascript-format +msgid "cannot run kubectl %s" +msgstr "" + +#: shared/kubernetes/utils.go:158 +#, javascript-format +msgid "cannot get pods for %s" +msgstr "" + +#: shared/kubernetes/utils.go:165 +#, javascript-format +msgid "replica to %d failed" +msgstr "" + +#: shared/kubernetes/utils.go:178 +msgid "cannot check if pod %[1]s is running in app %[2]s" +msgstr "" + +#: shared/kubernetes/utils.go:188 shared/kubernetes/utils.go:233 +#: shared/kubernetes/utils.go:328 +#, javascript-format +msgid "cannot execute %s" +msgstr "" + +#: shared/kubernetes/utils.go:207 +#, javascript-format +msgid "cannot get pod informations %s" +msgstr "" + +#: shared/kubernetes/utils.go:216 +#, javascript-format +msgid "cannot set replicas for %s to zero" +msgstr "" + +#: shared/kubernetes/utils.go:243 +msgid "pod %[1]s replicas have not reached %[2]d in %[3]s seconds" +msgstr "" + +#: shared/kubernetes/utils.go:266 +#, javascript-format +msgid "%s is not a valid image pull policy value" +msgstr "" + +#: shared/kubernetes/utils.go:287 +msgctxt "The first placeholder is a command" +msgid "cannot run %[1]s using image %[2]s" +msgstr "" + +#: shared/kubernetes/utils.go:291 +#, javascript-format +msgid "deleting pod %s. Status fails with error" +msgstr "" + +#: shared/kubernetes/utils.go:304 shared/kubernetes/utils.go:313 +#, javascript-format +msgid "cannot delete pod %s" +msgstr "" + +#: shared/kubernetes/utils.go:335 +#, javascript-format +msgid "error during execution of %s" +msgstr "" + +#: shared/kubernetes/utils.go:340 +msgid "pod %[1]s status is not %[2]s in %[3]d seconds" +msgstr "" + +#: shared/kubernetes/utils.go:357 +#, javascript-format +msgid "cannot find node name matching filter %s" +msgstr "" + +#: shared/kubernetes/utils.go:366 +msgid "cannot serialize pod definition override" +msgstr "" + +#: shared/podman/images.go:35 +#, javascript-format +msgid "Ensure image %s is available" +msgstr "" + +#: shared/podman/images.go:54 +#, javascript-format +msgid "Cannot use RPM image for %s" +msgstr "" + +#: shared/podman/images.go:56 +msgid "Using the %[1]s image loaded from the RPM instead of its online version %[2]s" +msgstr "" + +#: shared/podman/images.go:61 +#, javascript-format +msgid "Cannot find RPM image for %s" +msgstr "" + +#: shared/podman/images.go:69 +#, javascript-format +msgid "image %s is missing and cannot be fetched" +msgstr "" + +#: shared/podman/images.go:94 +msgid "cannot unmarshal image RPM metadata" +msgstr "" + +#: shared/podman/images.go:139 +#, javascript-format +msgid "Cannot unmarshal metadata file %s" +msgstr "" + +#: shared/podman/images.go:161 +#, javascript-format +msgid "error parsing: %s" +msgstr "" + +#: shared/podman/images.go:169 shared/podman/images.go:183 +#: shared/podman/images.go:198 +#, javascript-format +msgid "failed to check if image %s has already been pulled" +msgstr "" + +#: shared/podman/images.go:205 +#, javascript-format +msgid "%s should contains just lower case character, otherwise podman pull would fails" +msgstr "" + +#: shared/podman/images.go:207 +#, javascript-format +msgid "Running podman pull %s" +msgstr "" + +#: shared/podman/images.go:222 +#, javascript-format +msgid "Running podman image search --list-tags %s --format={{.Tag}}" +msgstr "" + +#: shared/podman/images.go:226 +#, javascript-format +msgid "cannot find any tag for image %s" +msgstr "" + +#: shared/podman/images.go:235 +#, javascript-format +msgid "Running podman ps --filter=name=%s --format={{ .Image }}" +msgstr "" + +#: shared/podman/images.go:239 +#, javascript-format +msgid "cannot find any running image for container %s" +msgstr "" + +#: shared/podman/network.go:22 +#, javascript-format +msgid "Setting up %s network" +msgstr "" + +#: shared/podman/network.go:34 +#, javascript-format +msgid "%s network doesn't have IPv6, deleting existing network to enable IPv6 on it" +msgstr "" + +#: shared/podman/network.go:38 +#, javascript-format +msgid "failed to remove %s podman network" +msgstr "" + +#: shared/podman/network.go:41 +#, javascript-format +msgid "Reusing existing %s network" +msgstr "" + +#: shared/podman/network.go:54 +msgid "failed to find podman's network backend" +msgstr "" + +#: shared/podman/network.go:56 +msgid "Podman's network backend (%[1]s) is not netavark, skipping IPv6 enabling on %[2]s network" +msgstr "" + +#: shared/podman/network.go:65 +#, javascript-format +msgid "failed to create %s network with IPv6 enabled" +msgstr "" + +#: shared/podman/network.go:91 +#, javascript-format +msgid "Network %s already removed" +msgstr "" + +#: shared/podman/network.go:98 +#, javascript-format +msgid "Failed to remove network %s" +msgstr "" + +#: shared/podman/network.go:100 +msgid "Network removed" +msgstr "" + +#: shared/podman/systemd.go:58 +#, javascript-format +msgid "Systemd has no %s.service unit" +msgstr "" + +#: shared/podman/systemd.go:62 shared/podman/systemd.go:63 +#, javascript-format +msgid "Would remove %s" +msgstr "" + +#: shared/podman/systemd.go:64 +#, javascript-format +msgid "Would remove %s if empty" +msgstr "" + +#: shared/podman/systemd.go:66 +#, javascript-format +msgid "Disable %s service" +msgstr "" + +#: shared/podman/systemd.go:70 +#, javascript-format +msgid "Failed to disable %s service" +msgstr "" + +#: shared/podman/systemd.go:74 shared/podman/systemd.go:80 +#, javascript-format +msgid "Remove %s" +msgstr "" + +#: shared/podman/systemd.go:76 +#, javascript-format +msgid "Failed to remove %s.service file" +msgstr "" + +#: shared/podman/systemd.go:82 +#, javascript-format +msgid "Failed to remove %s file" +msgstr "" + +#: shared/podman/systemd.go:89 +#, javascript-format +msgid "%s folder contains file created by the user. Please remove them when uninstallation is completed." +msgstr "" + +#: shared/podman/systemd.go:104 +msgid "failed to reset-failed systemd" +msgstr "" + +#: shared/podman/systemd.go:108 +msgid "failed to reload systemd daemon" +msgstr "" + +#: shared/podman/systemd.go:126 +#, javascript-format +msgid "failed to restart systemd %s.service" +msgstr "" + +#: shared/podman/systemd.go:134 +#, javascript-format +msgid "failed to start systemd %s.service" +msgstr "" + +#: shared/podman/systemd.go:142 +#, javascript-format +msgid "failed to stop systemd %s.service" +msgstr "" + +#: shared/podman/systemd.go:150 +#, javascript-format +msgid "failed to enable %s systemd service" +msgstr "" + +#: shared/podman/systemd.go:161 +#, javascript-format +msgid "failed to create %s folder" +msgstr "" + +#: shared/podman/systemd.go:167 +#, javascript-format +msgid "cannot write %s file" +msgstr "" + +#: shared/podman/utils.go:56 +msgid "Extra arguments to pass to podman" +msgstr "" + +#: shared/podman/utils.go:62 +msgid "Path to custom /var/cache volume" +msgstr "" + +#: shared/podman/utils.go:63 +msgid "Path to custom /var/lib/pgsql volume" +msgstr "" + +#: shared/podman/utils.go:64 +msgid "Path to custom /var/spacewalk volume" +msgstr "" + +#: shared/podman/utils.go:65 +msgid "Path to custom /srv/www/ volume" +msgstr "" + +#: shared/podman/utils.go:67 +msgid "Podman Flags" +msgstr "" + +#: shared/podman/utils.go:79 +msgid "failed to enable podman.socket unit" +msgstr "" + +#: shared/podman/utils.go:96 +#, javascript-format +msgid "failed to run %s container" +msgstr "" + +#: shared/podman/utils.go:107 +msgid "Would run podman kill %[1]s for container id %[2]s" +msgstr "" + +#: shared/podman/utils.go:108 +msgid "Would run podman remove %[1]s for container id %[2]s" +msgstr "" + +#: shared/podman/utils.go:110 +msgid "Run podman kill %[1]s for container id %[2]s" +msgstr "" + +#: shared/podman/utils.go:113 +msgid "Failed to kill the server" +msgstr "" + +#: shared/podman/utils.go:115 +msgid "Run podman remove %[1]s for container id %[2]s" +msgstr "" + +#: shared/podman/utils.go:118 +msgid "Error removing container" +msgstr "" + +#: shared/podman/utils.go:123 +msgid "Container already removed" +msgstr "" + +#: shared/podman/utils.go:135 +#, javascript-format +msgid "Run %s" +msgstr "" + +#: shared/podman/utils.go:138 +#, javascript-format +msgid "Failed to remove volume %s" +msgstr "" + +#: shared/podman/utils.go:170 +msgid "volume folder (%[1]s) already exists, cannot link it to %[2]s" +msgstr "" + +#: shared/podman/utils.go:174 +#, javascript-format +msgid "failed to create volumes folder %s" +msgstr "" + +#: shared/podman/utils.go:178 +msgid "failed to link volume folder %[1]s to %[2]s" +msgstr "" + +#: shared/podman/utils.go:188 +msgid "failed to get podman's volumes folder" +msgstr "" + +#: shared/podman/utils.go:203 +msgid "cannot inspect host values" +msgstr "" + +#: shared/utils/flaggroups.go:56 +msgid "Flags:\n" +msgstr "" + +#: shared/utils/flaggroups.go:94 +msgid "no such flag help group: %v" +msgstr "" + +#: shared/utils/cmd.go:45 shared/utils/cmd.go:46 +msgid "failed to unmarshall configuration" +msgstr "" + +#: shared/utils/cmd.go:53 +msgid "tool to use to reach the container. Possible values: 'podman', 'podman-remote', 'kubectl'. Default guesses which to use." +msgstr "" + +#: shared/utils/cmd.go:67 shared/utils/cmd.go:73 +msgid "set whether to pull the images or not. The value can be one of 'Never', 'IfNotPresent' or 'Always'" +msgstr "" + +#: shared/utils/cmd.go:78 +msgid "PTF ID" +msgstr "" + +#: shared/utils/cmd.go:79 +msgid "Test package ID" +msgstr "" + +#: shared/utils/cmd.go:80 +msgid "SCC user" +msgstr "" + +#: shared/utils/config.go:38 +#, javascript-format +msgid "failed to parse configuration file %s" +msgstr "" + +#: shared/utils/config.go:62 +msgid "Failed to find home directory" +msgstr "" + +#: shared/utils/config.go:87 +msgid "failed to bind %[1]s config to parameter %[2]s" +msgstr "" + +#: shared/utils/config.go:99 +msgid "" +"Usage:{{if .Runnable}}\n" +" {{.UseLine}}{{end}}{{if .HasAvailableSubCommands}}\n" +" {{.CommandPath}} [command]{{end}}{{if gt (len .Aliases) 0}}\n" +"\n" +"Aliases:\n" +" {{.NameAndAliases}}{{end}}{{if .HasExample}}\n" +"\n" +"Examples:\n" +"{{.Example}}{{end}}{{if .HasAvailableSubCommands}}{{$cmds := .Commands}}{{if eq (len .Groups) 0}}\n" +"\n" +"Available Commands:{{range $cmds}}{{if (or .IsAvailableCommand (eq .Name \"help\"))}}\n" +" {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{else}}{{range $group := .Groups}}\n" +"\n" +"{{.Title}}{{range $cmds}}{{if (and (eq .GroupID $group.ID) (or .IsAvailableCommand (eq .Name \"help\")))}}\n" +" {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if not .AllChildCommandsHaveGroup}}\n" +"\n" +"Additional Commands:{{range $cmds}}{{if (and (eq .GroupID \"\") (or .IsAvailableCommand (eq .Name \"help\")))}}\n" +" {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{end}}{{end}}{{if .HasAvailableLocalFlags}}\n" +"\n" +"Flags:\n" +"{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasAvailableInheritedFlags}}\n" +"\n" +"Global Flags:\n" +"{{.InheritedFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasHelpSubCommands}}\n" +"\n" +"Additional help topics:{{range .Commands}}{{if .IsAdditionalHelpTopicCommand}}\n" +" {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableSubCommands}}\n" +"\n" +"Use \"{{.CommandPath}} [command] --help\" for more information about a command.{{end}}\n" +msgstr "" + +#: shared/utils/config.go:133 +msgid "" +"\n" +"Configuration:\n" +"\n" +" All the non-global flags can alternatively be passed as configuration.\n" +" \n" +" The configuration file is a YAML file with entries matching the flag name.\n" +" The name of a flag is the part after the '--' of the command line parameter.\n" +" Every '_' character in the flag name means a nested property.\n" +" \n" +" For instance the '--tz CEST' and '--ssl-password secret' will be mapped to\n" +" this YAML configuration:\n" +" \n" +" tz: CEST\n" +" ssl:\n" +" password: secret\n" +" \n" +" The configuration file will be searched in the following places and order:\n" +" · $XDG_CONFIG_HOME/{{ .Name }}/{{ .ConfigFile }}\n" +" · $HOME/.config/{{ .Name }}/{{ .ConfigFile }}\n" +" · $PWD/{{ .ConfigFile }}\n" +" · the value of the --config flag\n" +"\n" +"\n" +"Environment variables:\n" +"\n" +" All the non-global flags can also be passed as environment variables.\n" +" \n" +" The environment variable name is the flag name with '-' replaced by with '_'\n" +" and the {{ .EnvPrefix }} prefix.\n" +" \n" +" For example the '--tz CEST' flag will be mapped to '{{ .EnvPrefix }}_TZ'\n" +" and '--ssl-password' flags to '{{ .EnvPrefix }}_SSL_PASSWORD' \n" +msgstr "" + +#: shared/utils/config.go:169 +msgid "Help on configuration file and environment variables" +msgstr "" + +#: shared/utils/config.go:178 +msgid "failed to compute config help command" +msgstr "" + +#: shared/utils/tar.go:47 +msgid "Skipping extraction of %[1]s in %[2]s file as it resolves outside the target path" +msgstr "" + +#: shared/utils/tar.go:89 +#, javascript-format +msgid "failed to write tar.gz to %s" +msgstr "" + +#: shared/utils/template.go:25 +#, javascript-format +msgid "%s file already present, not overwriting" +msgstr "" + +#: shared/utils/template.go:32 +#, javascript-format +msgid "failed to open %s for writing" +msgstr "" + +#: shared/utils/utils.go:65 +#, javascript-format +msgid "Has to be more than %d character long" +msgid_plural "Has to be more than %d characters long" +msgstr[0] "" +msgstr[1] "" + +#: shared/utils/utils.go:69 +#, javascript-format +msgid "Has to be less than %d character long" +msgid_plural "Has to be less than %d characters long" +msgstr[0] "" +msgstr[1] "" + +#: shared/utils/utils.go:82 +msgid "Failed to read password" +msgstr "" + +#: shared/utils/utils.go:88 +msgid "Cannot contain spaces or tabs" +msgstr "" + +#: shared/utils/utils.go:109 +msgid "Failed to read input" +msgstr "" + +#: shared/utils/utils.go:117 +msgid "A value is required" +msgstr "" + +#: shared/utils/utils.go:146 shared/utils/utils.go:172 +#, javascript-format +msgid "invalid image name: %s" +msgstr "" + +#: shared/utils/utils.go:150 +#, javascript-format +msgid "tag missing on %s" +msgstr "" + +#: shared/utils/utils.go:182 +#, javascript-format +msgid "Failed to run %s" +msgstr "" + +#: shared/utils/utils.go:191 +#, javascript-format +msgid "cannot check content of %s" +msgstr "" + +#: shared/utils/utils.go:203 +#, javascript-format +msgid "Cannot remove %s folder" +msgstr "" + +#: shared/utils/utils.go:214 +#, javascript-format +msgid "Failed to get %s file informations" +msgstr "" + +#: shared/utils/utils.go:223 +#, javascript-format +msgid "Failed to read file %s" +msgstr "" + +#: shared/utils/utils.go:238 +#, javascript-format +msgid "Would remove file %s" +msgstr "" + +#: shared/utils/utils.go:240 +#, javascript-format +msgid "Removing file %s" +msgstr "" + +#: shared/utils/utils.go:242 +#, javascript-format +msgid "Failed to remove file %s" +msgstr "" + +#: shared/utils/utils.go:252 +msgid "Failed to read random data" +msgstr "" + +#: shared/utils/utils.go:273 +#, javascript-format +msgid "error downloading from %s" +msgstr "" + +#: shared/utils/utils.go:279 +#, javascript-format +msgid "bad status: %s" +msgstr "" + +#: shared/utils/utils.go:315 +#, javascript-format +msgid "cannot parse file %s" +msgstr "" + +#: shared/utils/utils.go:322 +msgid "cannot read config" +msgstr "" + +#: shared/utils/utils.go:353 +msgid "failed to run inspect script in host system" +msgstr "" + +#: shared/utils/utils.go:358 +msgid "cannot inspect host data" +msgstr "" + +#: shared/utils/utils.go:373 shared/utils/utils.go:387 +msgid "failed to generate inspect script" +msgstr "" + +#: shared/connection.go:56 +#, javascript-format +msgid "backend command not found in PATH: %s" +msgstr "" + +#: shared/connection.go:68 +msgid "kubectl not configured to connect to a cluster, ignoring" +msgstr "" + +#: shared/connection.go:103 +msgid "uyuni container is not accessible with one of podman, podman-remote or kubectl" +msgstr "" + +#: shared/connection.go:106 +#, javascript-format +msgid "unsupported backend %s" +msgstr "" + +#: shared/connection.go:127 +#, javascript-format +msgid "container %s is not running on podman" +msgstr "" + +#: shared/connection.go:149 +#, javascript-format +msgid "the container is not running, %s command not executed:" +msgstr "" + +#: shared/connection.go:196 +msgid "server didn't start within 60s. Check for the service status" +msgstr "" + +#: shared/connection.go:226 shared/connection.go:265 +#, javascript-format +msgid "unknown container kind: %s" +msgstr "" + +#: shared/connection.go:309 +msgid "failed to determine suitable backend" +msgstr "" + +#: shared/connection.go:319 +msgid "no supported backend found" +msgstr "" diff --git a/locale/shared/es.po b/locale/shared/es.po new file mode 100644 index 000000000..57b8d92fc --- /dev/null +++ b/locale/shared/es.po @@ -0,0 +1,915 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-05-16 11:25+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: shared/api/org/createFirst.go:21 +msgid "failed to connect to the server" +msgstr "" + +#: shared/api/org/createFirst.go:35 +msgid "failed to create first user and organization" +msgstr "" + +#: shared/api/api.go:72 +msgid "FQDN of the server to connect to" +msgstr "" + +#: shared/api/api.go:73 +msgid "API user username" +msgstr "" + +#: shared/api/api.go:74 +msgid "Password for the API user" +msgstr "" + +#: shared/api/api.go:75 +msgid "Path to a cert file of the CA" +msgstr "" + +#: shared/api/api.go:76 +msgid "If set, server certificate will not be checked for validity" +msgstr "" + +#: shared/api/api.go:125 +#, javascript-format +msgid "unknown error: %d" +msgstr "" + +#: shared/api/api.go:167 +msgid "API server password" +msgstr "" + +#: shared/api/api.go:182 +msgid "Unable to create login data" +msgstr "" + +#: shared/api/api.go:212 +msgid "auth cookie not found in login response" +msgstr "" + +#: shared/api/api.go:228 +msgid "Unable to convert data to JSON" +msgstr "" + +#: shared/completion/completion.go:20 shared/completion/completion.go:21 +msgid "Generate shell completion script" +msgstr "" + +#: shared/completion/completion.go:30 shared/completion/completion.go:34 +#: shared/completion/completion.go:38 +#, javascript-format +msgid "cannot generate %s completion" +msgstr "" + +#: shared/kubernetes/rke2.go:21 +msgid "Installing RKE2 Nginx configuration" +msgstr "" + +#: shared/kubernetes/rke2.go:29 +msgid "Failed to write Rke2 nginx configuration" +msgstr "" + +#: shared/kubernetes/rke2.go:33 +msgid "Waiting for Nginx controller to be reloaded" +msgstr "" + +#: shared/kubernetes/uninstall.go:13 +msgid "" +"\n" +"Note that removing the volumes could also be handled automatically depending on the StorageClass used\n" +"when installed on a kubernetes cluster.\n" +"\n" +"For instance on a default K3S install, the local-path-provider storage volumes will\n" +"be automatically removed when deleting the deployment even if --purge-volumes argument is not used." +msgstr "" + +#: shared/kubernetes/helm.go:58 +msgid "failed to upgrade helm chart %[1]s in namespace %[2]s" +msgstr "" + +#: shared/kubernetes/helm.go:60 +msgid "failed to install helm chart %[1]s in namespace %[2]s" +msgstr "" + +#: shared/kubernetes/helm.go:81 +#, javascript-format +msgid "Failed to find %s's namespace, skipping removal" +msgstr "" + +#: shared/kubernetes/helm.go:89 +msgid "Cannot guess namespace" +msgstr "" + +#: shared/kubernetes/helm.go:98 shared/podman/network.go:94 +#: shared/podman/systemd.go:61 shared/podman/systemd.go:99 +#: shared/podman/systemd.go:100 shared/podman/utils.go:133 +#, javascript-format +msgid "Would run %s" +msgstr "" + +#: shared/kubernetes/helm.go:100 +#, javascript-format +msgid "Uninstalling %s" +msgstr "" + +#: shared/kubernetes/helm.go:102 +#, javascript-format +msgid "failed to run helm %s" +msgstr "" + +#: shared/kubernetes/helm.go:118 +#, javascript-format +msgid "failed to detect %s's namespace using helm" +msgstr "" + +#: shared/kubernetes/helm.go:122 +msgid "helm provided an invalid JSON output" +msgstr "" + +#: shared/kubernetes/helm.go:128 +msgid "found no or more than one deployment" +msgstr "" + +#: shared/kubernetes/k3s.go:25 +msgid "Installing K3s Traefik configuration" +msgstr "" + +#: shared/kubernetes/k3s.go:32 +msgid "Failed to write K3s Traefik configuration" +msgstr "" + +#: shared/kubernetes/k3s.go:36 +msgid "Waiting for Traefik to be reloaded" +msgstr "" + +#: shared/kubernetes/k3s.go:58 +#, javascript-format +msgid "install %s before running this command" +msgstr "" + +#: shared/kubernetes/k3s.go:65 shared/podman/utils.go:198 +#: shared/utils/utils.go:345 +msgid "failed to create temporary directory" +msgstr "" + +#: shared/kubernetes/k3s.go:78 +#, javascript-format +msgid "cannot delete %s" +msgstr "" + +#: shared/kubernetes/k3s.go:84 +msgid "cannot find node running uyuni" +msgstr "" + +#: shared/kubernetes/k3s.go:112 +msgid "cannot run inspect pod" +msgstr "" + +#: shared/kubernetes/k3s.go:117 shared/podman/utils.go:235 +msgid "cannot inspect data" +msgstr "" + +#: shared/kubernetes/kubernetes.go:54 +msgid "failed to get kubelet version" +msgstr "" + +#: shared/kubernetes/kubernetes.go:80 +msgid "failed to get pod commands to look for nginx controller" +msgstr "" + +#: shared/kubernetes/kubernetes.go:94 +#, javascript-format +msgid "cannot stop %s" +msgstr "" + +#: shared/kubernetes/kubernetes.go:134 +msgid "failed to run kubectl get configMap %[1]s %[2]s" +msgstr "" + +#: shared/kubernetes/kubernetes.go:144 +msgid "failed to run kubectl get secret %[1]s %[2]s" +msgstr "" + +#: shared/kubernetes/kubernetes.go:148 +#, javascript-format +msgid "Failed to base64 decode secret %s" +msgstr "" + +#: shared/kubernetes/utils.go:51 shared/kubernetes/utils.go:86 +msgid "failed to pull image" +msgstr "" + +#: shared/kubernetes/utils.go:54 +msgid "Waiting for %[1]s deployment to be ready in %[2]s namespace\n" +msgstr "" + +#: shared/kubernetes/utils.go:63 +msgid "failed to find a ready replica for deployment %[1]s in namespace %[2]s after 60s" +msgstr "" + +#: shared/kubernetes/utils.go:68 +msgid "Waiting for image of %[1]s pod in %[2]s namespace to be pulled" +msgstr "" + +#: shared/kubernetes/utils.go:81 +#, javascript-format +msgid "failed to get failed events for pod %s" +msgstr "" + +#: shared/kubernetes/utils.go:93 +#, javascript-format +msgid "failed to get events for pod %s" +msgstr "" + +#: shared/kubernetes/utils.go:139 +msgid "failed to parse deployment status" +msgstr "" + +#: shared/kubernetes/utils.go:153 +#, javascript-format +msgid "cannot run kubectl %s" +msgstr "" + +#: shared/kubernetes/utils.go:158 +#, javascript-format +msgid "cannot get pods for %s" +msgstr "" + +#: shared/kubernetes/utils.go:165 +#, javascript-format +msgid "replica to %d failed" +msgstr "" + +#: shared/kubernetes/utils.go:178 +msgid "cannot check if pod %[1]s is running in app %[2]s" +msgstr "" + +#: shared/kubernetes/utils.go:188 shared/kubernetes/utils.go:233 +#: shared/kubernetes/utils.go:328 +#, javascript-format +msgid "cannot execute %s" +msgstr "" + +#: shared/kubernetes/utils.go:207 +#, javascript-format +msgid "cannot get pod informations %s" +msgstr "" + +#: shared/kubernetes/utils.go:216 +#, javascript-format +msgid "cannot set replicas for %s to zero" +msgstr "" + +#: shared/kubernetes/utils.go:243 +msgid "pod %[1]s replicas have not reached %[2]d in %[3]s seconds" +msgstr "" + +#: shared/kubernetes/utils.go:266 +#, javascript-format +msgid "%s is not a valid image pull policy value" +msgstr "" + +#: shared/kubernetes/utils.go:287 +msgctxt "The first placeholder is a command" +msgid "cannot run %[1]s using image %[2]s" +msgstr "" + +#: shared/kubernetes/utils.go:291 +#, javascript-format +msgid "deleting pod %s. Status fails with error" +msgstr "" + +#: shared/kubernetes/utils.go:304 shared/kubernetes/utils.go:313 +#, javascript-format +msgid "cannot delete pod %s" +msgstr "" + +#: shared/kubernetes/utils.go:335 +#, javascript-format +msgid "error during execution of %s" +msgstr "" + +#: shared/kubernetes/utils.go:340 +msgid "pod %[1]s status is not %[2]s in %[3]d seconds" +msgstr "" + +#: shared/kubernetes/utils.go:357 +#, javascript-format +msgid "cannot find node name matching filter %s" +msgstr "" + +#: shared/kubernetes/utils.go:366 +msgid "cannot serialize pod definition override" +msgstr "" + +#: shared/podman/images.go:35 +#, javascript-format +msgid "Ensure image %s is available" +msgstr "" + +#: shared/podman/images.go:54 +#, javascript-format +msgid "Cannot use RPM image for %s" +msgstr "" + +#: shared/podman/images.go:56 +msgid "Using the %[1]s image loaded from the RPM instead of its online version %[2]s" +msgstr "" + +#: shared/podman/images.go:61 +#, javascript-format +msgid "Cannot find RPM image for %s" +msgstr "" + +#: shared/podman/images.go:69 +#, javascript-format +msgid "image %s is missing and cannot be fetched" +msgstr "" + +#: shared/podman/images.go:94 +msgid "cannot unmarshal image RPM metadata" +msgstr "" + +#: shared/podman/images.go:139 +#, javascript-format +msgid "Cannot unmarshal metadata file %s" +msgstr "" + +#: shared/podman/images.go:161 +#, javascript-format +msgid "error parsing: %s" +msgstr "" + +#: shared/podman/images.go:169 shared/podman/images.go:183 +#: shared/podman/images.go:198 +#, javascript-format +msgid "failed to check if image %s has already been pulled" +msgstr "" + +#: shared/podman/images.go:205 +#, javascript-format +msgid "%s should contains just lower case character, otherwise podman pull would fails" +msgstr "" + +#: shared/podman/images.go:207 +#, javascript-format +msgid "Running podman pull %s" +msgstr "" + +#: shared/podman/images.go:222 +#, javascript-format +msgid "Running podman image search --list-tags %s --format={{.Tag}}" +msgstr "" + +#: shared/podman/images.go:226 +#, javascript-format +msgid "cannot find any tag for image %s" +msgstr "" + +#: shared/podman/images.go:235 +#, javascript-format +msgid "Running podman ps --filter=name=%s --format={{ .Image }}" +msgstr "" + +#: shared/podman/images.go:239 +#, javascript-format +msgid "cannot find any running image for container %s" +msgstr "" + +#: shared/podman/network.go:22 +#, javascript-format +msgid "Setting up %s network" +msgstr "" + +#: shared/podman/network.go:34 +#, javascript-format +msgid "%s network doesn't have IPv6, deleting existing network to enable IPv6 on it" +msgstr "" + +#: shared/podman/network.go:38 +#, javascript-format +msgid "failed to remove %s podman network" +msgstr "" + +#: shared/podman/network.go:41 +#, javascript-format +msgid "Reusing existing %s network" +msgstr "" + +#: shared/podman/network.go:54 +msgid "failed to find podman's network backend" +msgstr "" + +#: shared/podman/network.go:56 +msgid "Podman's network backend (%[1]s) is not netavark, skipping IPv6 enabling on %[2]s network" +msgstr "" + +#: shared/podman/network.go:65 +#, javascript-format +msgid "failed to create %s network with IPv6 enabled" +msgstr "" + +#: shared/podman/network.go:91 +#, javascript-format +msgid "Network %s already removed" +msgstr "" + +#: shared/podman/network.go:98 +#, javascript-format +msgid "Failed to remove network %s" +msgstr "" + +#: shared/podman/network.go:100 +msgid "Network removed" +msgstr "" + +#: shared/podman/systemd.go:58 +#, javascript-format +msgid "Systemd has no %s.service unit" +msgstr "" + +#: shared/podman/systemd.go:62 shared/podman/systemd.go:63 +#, javascript-format +msgid "Would remove %s" +msgstr "" + +#: shared/podman/systemd.go:64 +#, javascript-format +msgid "Would remove %s if empty" +msgstr "" + +#: shared/podman/systemd.go:66 +#, javascript-format +msgid "Disable %s service" +msgstr "" + +#: shared/podman/systemd.go:70 +#, javascript-format +msgid "Failed to disable %s service" +msgstr "" + +#: shared/podman/systemd.go:74 shared/podman/systemd.go:80 +#, javascript-format +msgid "Remove %s" +msgstr "" + +#: shared/podman/systemd.go:76 +#, javascript-format +msgid "Failed to remove %s.service file" +msgstr "" + +#: shared/podman/systemd.go:82 +#, javascript-format +msgid "Failed to remove %s file" +msgstr "" + +#: shared/podman/systemd.go:89 +#, javascript-format +msgid "%s folder contains file created by the user. Please remove them when uninstallation is completed." +msgstr "" + +#: shared/podman/systemd.go:104 +msgid "failed to reset-failed systemd" +msgstr "" + +#: shared/podman/systemd.go:108 +msgid "failed to reload systemd daemon" +msgstr "" + +#: shared/podman/systemd.go:126 +#, javascript-format +msgid "failed to restart systemd %s.service" +msgstr "" + +#: shared/podman/systemd.go:134 +#, javascript-format +msgid "failed to start systemd %s.service" +msgstr "" + +#: shared/podman/systemd.go:142 +#, javascript-format +msgid "failed to stop systemd %s.service" +msgstr "" + +#: shared/podman/systemd.go:150 +#, javascript-format +msgid "failed to enable %s systemd service" +msgstr "" + +#: shared/podman/systemd.go:161 +#, javascript-format +msgid "failed to create %s folder" +msgstr "" + +#: shared/podman/systemd.go:167 +#, javascript-format +msgid "cannot write %s file" +msgstr "" + +#: shared/podman/utils.go:56 +msgid "Extra arguments to pass to podman" +msgstr "" + +#: shared/podman/utils.go:62 +msgid "Path to custom /var/cache volume" +msgstr "" + +#: shared/podman/utils.go:63 +msgid "Path to custom /var/lib/pgsql volume" +msgstr "" + +#: shared/podman/utils.go:64 +msgid "Path to custom /var/spacewalk volume" +msgstr "" + +#: shared/podman/utils.go:65 +msgid "Path to custom /srv/www/ volume" +msgstr "" + +#: shared/podman/utils.go:67 +msgid "Podman Flags" +msgstr "" + +#: shared/podman/utils.go:79 +msgid "failed to enable podman.socket unit" +msgstr "" + +#: shared/podman/utils.go:96 +#, javascript-format +msgid "failed to run %s container" +msgstr "" + +#: shared/podman/utils.go:107 +msgid "Would run podman kill %[1]s for container id %[2]s" +msgstr "" + +#: shared/podman/utils.go:108 +msgid "Would run podman remove %[1]s for container id %[2]s" +msgstr "" + +#: shared/podman/utils.go:110 +msgid "Run podman kill %[1]s for container id %[2]s" +msgstr "" + +#: shared/podman/utils.go:113 +msgid "Failed to kill the server" +msgstr "" + +#: shared/podman/utils.go:115 +msgid "Run podman remove %[1]s for container id %[2]s" +msgstr "" + +#: shared/podman/utils.go:118 +msgid "Error removing container" +msgstr "" + +#: shared/podman/utils.go:123 +msgid "Container already removed" +msgstr "" + +#: shared/podman/utils.go:135 +#, javascript-format +msgid "Run %s" +msgstr "" + +#: shared/podman/utils.go:138 +#, javascript-format +msgid "Failed to remove volume %s" +msgstr "" + +#: shared/podman/utils.go:170 +msgid "volume folder (%[1]s) already exists, cannot link it to %[2]s" +msgstr "" + +#: shared/podman/utils.go:174 +#, javascript-format +msgid "failed to create volumes folder %s" +msgstr "" + +#: shared/podman/utils.go:178 +msgid "failed to link volume folder %[1]s to %[2]s" +msgstr "" + +#: shared/podman/utils.go:188 +msgid "failed to get podman's volumes folder" +msgstr "" + +#: shared/podman/utils.go:203 +msgid "cannot inspect host values" +msgstr "" + +#: shared/utils/flaggroups.go:56 +msgid "Flags:\n" +msgstr "" + +#: shared/utils/flaggroups.go:94 +msgid "no such flag help group: %v" +msgstr "" + +#: shared/utils/cmd.go:45 shared/utils/cmd.go:46 +msgid "failed to unmarshall configuration" +msgstr "" + +#: shared/utils/cmd.go:53 +msgid "tool to use to reach the container. Possible values: 'podman', 'podman-remote', 'kubectl'. Default guesses which to use." +msgstr "" + +#: shared/utils/cmd.go:67 shared/utils/cmd.go:73 +msgid "set whether to pull the images or not. The value can be one of 'Never', 'IfNotPresent' or 'Always'" +msgstr "" + +#: shared/utils/cmd.go:78 +msgid "PTF ID" +msgstr "" + +#: shared/utils/cmd.go:79 +msgid "Test package ID" +msgstr "" + +#: shared/utils/cmd.go:80 +msgid "SCC user" +msgstr "" + +#: shared/utils/config.go:38 +#, javascript-format +msgid "failed to parse configuration file %s" +msgstr "" + +#: shared/utils/config.go:62 +msgid "Failed to find home directory" +msgstr "" + +#: shared/utils/config.go:87 +msgid "failed to bind %[1]s config to parameter %[2]s" +msgstr "" + +#: shared/utils/config.go:99 +msgid "" +"Usage:{{if .Runnable}}\n" +" {{.UseLine}}{{end}}{{if .HasAvailableSubCommands}}\n" +" {{.CommandPath}} [command]{{end}}{{if gt (len .Aliases) 0}}\n" +"\n" +"Aliases:\n" +" {{.NameAndAliases}}{{end}}{{if .HasExample}}\n" +"\n" +"Examples:\n" +"{{.Example}}{{end}}{{if .HasAvailableSubCommands}}{{$cmds := .Commands}}{{if eq (len .Groups) 0}}\n" +"\n" +"Available Commands:{{range $cmds}}{{if (or .IsAvailableCommand (eq .Name \"help\"))}}\n" +" {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{else}}{{range $group := .Groups}}\n" +"\n" +"{{.Title}}{{range $cmds}}{{if (and (eq .GroupID $group.ID) (or .IsAvailableCommand (eq .Name \"help\")))}}\n" +" {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if not .AllChildCommandsHaveGroup}}\n" +"\n" +"Additional Commands:{{range $cmds}}{{if (and (eq .GroupID \"\") (or .IsAvailableCommand (eq .Name \"help\")))}}\n" +" {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{end}}{{end}}{{if .HasAvailableLocalFlags}}\n" +"\n" +"Flags:\n" +"{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasAvailableInheritedFlags}}\n" +"\n" +"Global Flags:\n" +"{{.InheritedFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasHelpSubCommands}}\n" +"\n" +"Additional help topics:{{range .Commands}}{{if .IsAdditionalHelpTopicCommand}}\n" +" {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableSubCommands}}\n" +"\n" +"Use \"{{.CommandPath}} [command] --help\" for more information about a command.{{end}}\n" +msgstr "" + +#: shared/utils/config.go:133 +msgid "" +"\n" +"Configuration:\n" +"\n" +" All the non-global flags can alternatively be passed as configuration.\n" +" \n" +" The configuration file is a YAML file with entries matching the flag name.\n" +" The name of a flag is the part after the '--' of the command line parameter.\n" +" Every '_' character in the flag name means a nested property.\n" +" \n" +" For instance the '--tz CEST' and '--ssl-password secret' will be mapped to\n" +" this YAML configuration:\n" +" \n" +" tz: CEST\n" +" ssl:\n" +" password: secret\n" +" \n" +" The configuration file will be searched in the following places and order:\n" +" · $XDG_CONFIG_HOME/{{ .Name }}/{{ .ConfigFile }}\n" +" · $HOME/.config/{{ .Name }}/{{ .ConfigFile }}\n" +" · $PWD/{{ .ConfigFile }}\n" +" · the value of the --config flag\n" +"\n" +"\n" +"Environment variables:\n" +"\n" +" All the non-global flags can also be passed as environment variables.\n" +" \n" +" The environment variable name is the flag name with '-' replaced by with '_'\n" +" and the {{ .EnvPrefix }} prefix.\n" +" \n" +" For example the '--tz CEST' flag will be mapped to '{{ .EnvPrefix }}_TZ'\n" +" and '--ssl-password' flags to '{{ .EnvPrefix }}_SSL_PASSWORD' \n" +msgstr "" + +#: shared/utils/config.go:169 +msgid "Help on configuration file and environment variables" +msgstr "" + +#: shared/utils/config.go:178 +msgid "failed to compute config help command" +msgstr "" + +#: shared/utils/tar.go:47 +msgid "Skipping extraction of %[1]s in %[2]s file as it resolves outside the target path" +msgstr "" + +#: shared/utils/tar.go:89 +#, javascript-format +msgid "failed to write tar.gz to %s" +msgstr "" + +#: shared/utils/template.go:25 +#, javascript-format +msgid "%s file already present, not overwriting" +msgstr "" + +#: shared/utils/template.go:32 +#, javascript-format +msgid "failed to open %s for writing" +msgstr "" + +#: shared/utils/utils.go:65 +#, javascript-format +msgid "Has to be more than %d character long" +msgid_plural "Has to be more than %d characters long" +msgstr[0] "" +msgstr[1] "" + +#: shared/utils/utils.go:69 +#, javascript-format +msgid "Has to be less than %d character long" +msgid_plural "Has to be less than %d characters long" +msgstr[0] "" +msgstr[1] "" + +#: shared/utils/utils.go:82 +msgid "Failed to read password" +msgstr "" + +#: shared/utils/utils.go:88 +msgid "Cannot contain spaces or tabs" +msgstr "" + +#: shared/utils/utils.go:109 +msgid "Failed to read input" +msgstr "" + +#: shared/utils/utils.go:117 +msgid "A value is required" +msgstr "" + +#: shared/utils/utils.go:146 shared/utils/utils.go:172 +#, javascript-format +msgid "invalid image name: %s" +msgstr "" + +#: shared/utils/utils.go:150 +#, javascript-format +msgid "tag missing on %s" +msgstr "" + +#: shared/utils/utils.go:182 +#, javascript-format +msgid "Failed to run %s" +msgstr "" + +#: shared/utils/utils.go:191 +#, javascript-format +msgid "cannot check content of %s" +msgstr "" + +#: shared/utils/utils.go:203 +#, javascript-format +msgid "Cannot remove %s folder" +msgstr "" + +#: shared/utils/utils.go:214 +#, javascript-format +msgid "Failed to get %s file informations" +msgstr "" + +#: shared/utils/utils.go:223 +#, javascript-format +msgid "Failed to read file %s" +msgstr "" + +#: shared/utils/utils.go:238 +#, javascript-format +msgid "Would remove file %s" +msgstr "" + +#: shared/utils/utils.go:240 +#, javascript-format +msgid "Removing file %s" +msgstr "" + +#: shared/utils/utils.go:242 +#, javascript-format +msgid "Failed to remove file %s" +msgstr "" + +#: shared/utils/utils.go:252 +msgid "Failed to read random data" +msgstr "" + +#: shared/utils/utils.go:273 +#, javascript-format +msgid "error downloading from %s" +msgstr "" + +#: shared/utils/utils.go:279 +#, javascript-format +msgid "bad status: %s" +msgstr "" + +#: shared/utils/utils.go:315 +#, javascript-format +msgid "cannot parse file %s" +msgstr "" + +#: shared/utils/utils.go:322 +msgid "cannot read config" +msgstr "" + +#: shared/utils/utils.go:353 +msgid "failed to run inspect script in host system" +msgstr "" + +#: shared/utils/utils.go:358 +msgid "cannot inspect host data" +msgstr "" + +#: shared/utils/utils.go:373 shared/utils/utils.go:387 +msgid "failed to generate inspect script" +msgstr "" + +#: shared/connection.go:56 +#, javascript-format +msgid "backend command not found in PATH: %s" +msgstr "" + +#: shared/connection.go:68 +msgid "kubectl not configured to connect to a cluster, ignoring" +msgstr "" + +#: shared/connection.go:103 +msgid "uyuni container is not accessible with one of podman, podman-remote or kubectl" +msgstr "" + +#: shared/connection.go:106 +#, javascript-format +msgid "unsupported backend %s" +msgstr "" + +#: shared/connection.go:127 +#, javascript-format +msgid "container %s is not running on podman" +msgstr "" + +#: shared/connection.go:149 +#, javascript-format +msgid "the container is not running, %s command not executed:" +msgstr "" + +#: shared/connection.go:196 +msgid "server didn't start within 60s. Check for the service status" +msgstr "" + +#: shared/connection.go:226 shared/connection.go:265 +#, javascript-format +msgid "unknown container kind: %s" +msgstr "" + +#: shared/connection.go:309 +msgid "failed to determine suitable backend" +msgstr "" + +#: shared/connection.go:319 +msgid "no supported backend found" +msgstr "" diff --git a/locale/shared/it.po b/locale/shared/it.po index 928fcd749..bf4fc0fd6 100644 --- a/locale/shared/it.po +++ b/locale/shared/it.po @@ -8,15 +8,16 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-05-16 10:27+0200\n" -"PO-Revision-Date: 2024-04-26 19:43+0000\n" +"PO-Revision-Date: 2024-05-16 09:23+0000\n" "Last-Translator: Marina Latini \n" -"Language-Team: Italian \n" +"Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.9.1\n" +"X-Generator: Weblate 5.5.5\n" #: shared/api/org/createFirst.go:21 msgid "failed to connect to the server" @@ -170,9 +171,9 @@ msgid "failed to create temporary directory" msgstr "mancata creazione della directory temporanea: %s" #: shared/kubernetes/k3s.go:78 -#, fuzzy, javascript-format +#, javascript-format msgid "cannot delete %s" -msgstr "impossible eliminare %s: %s" +msgstr "impossible eliminare %s" #: shared/kubernetes/k3s.go:84 #, fuzzy diff --git a/locale/shared/shared.pot b/locale/shared/shared.pot index 43d679b5e..365e0065a 100644 --- a/locale/shared/shared.pot +++ b/locale/shared/shared.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-16 10:27+0200\n" +"POT-Creation-Date: 2024-05-16 11:25+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/mgradm/cmd/cmd.go b/mgradm/cmd/cmd.go index af99a2570..124879802 100644 --- a/mgradm/cmd/cmd.go +++ b/mgradm/cmd/cmd.go @@ -21,6 +21,7 @@ import ( "github.com/uyuni-project/uyuni-tools/mgradm/cmd/install" "github.com/uyuni-project/uyuni-tools/mgradm/cmd/migrate" "github.com/uyuni-project/uyuni-tools/mgradm/cmd/restart" + "github.com/uyuni-project/uyuni-tools/mgradm/cmd/scale" "github.com/uyuni-project/uyuni-tools/mgradm/cmd/start" "github.com/uyuni-project/uyuni-tools/mgradm/cmd/status" "github.com/uyuni-project/uyuni-tools/mgradm/cmd/stop" @@ -86,6 +87,7 @@ func NewUyuniadmCommand() (*cobra.Command, error) { rootCmd.AddCommand(completion.NewCommand(globalFlags)) rootCmd.AddCommand(support.NewCommand(globalFlags)) rootCmd.AddCommand(start.NewCommand(globalFlags)) + rootCmd.AddCommand(scale.NewCommand(globalFlags)) rootCmd.AddCommand(hub.NewCommand(globalFlags)) rootCmd.AddCommand(restart.NewCommand(globalFlags)) rootCmd.AddCommand(stop.NewCommand(globalFlags)) diff --git a/mgradm/cmd/inspect/podman.go b/mgradm/cmd/inspect/podman.go index faf6890ac..74b38b03b 100644 --- a/mgradm/cmd/inspect/podman.go +++ b/mgradm/cmd/inspect/podman.go @@ -38,7 +38,7 @@ func podmanInspect( return fmt.Errorf(L("failed to find the image of the currently running server container: %s")) } } - inspectResult, err := shared_podman.Inspect(serverImage, flags.PullPolicy) + inspectResult, err := shared_podman.Inspect(serverImage, flags.PullPolicy, false) if err != nil { return utils.Errorf(err, L("inspect command failed")) } diff --git a/mgradm/cmd/install/kubernetes/utils.go b/mgradm/cmd/install/kubernetes/utils.go index 44ff88f91..eb1a17960 100644 --- a/mgradm/cmd/install/kubernetes/utils.go +++ b/mgradm/cmd/install/kubernetes/utils.go @@ -41,9 +41,9 @@ func installForKubernetes(globalFlags *types.GlobalFlags, fqdn := args[0] helmArgs := []string{"--set", "timezone=" + flags.TZ} - if flags.MirrorPath != "" { + if flags.Mirror != "" { // TODO Handle claims for multi-node clusters - helmArgs = append(helmArgs, "--set", "mirror.hostPath="+flags.MirrorPath) + helmArgs = append(helmArgs, "--set", "mirror.hostPath="+flags.Mirror) } if flags.Debug.Java { helmArgs = append(helmArgs, "--set", "exposeJavaDebug=true") diff --git a/mgradm/cmd/install/podman/utils.go b/mgradm/cmd/install/podman/utils.go index 390f5b954..dfc2f29ba 100644 --- a/mgradm/cmd/install/podman/utils.go +++ b/mgradm/cmd/install/podman/utils.go @@ -13,6 +13,7 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" install_shared "github.com/uyuni-project/uyuni-tools/mgradm/cmd/install/shared" + "github.com/uyuni-project/uyuni-tools/mgradm/shared/coco" "github.com/uyuni-project/uyuni-tools/mgradm/shared/podman" "github.com/uyuni-project/uyuni-tools/shared" . "github.com/uyuni-project/uyuni-tools/shared/l10n" @@ -21,26 +22,23 @@ import ( "github.com/uyuni-project/uyuni-tools/shared/utils" ) -func setupCocoContainer(flags *podmanInstallFlags) error { - if flags.Coco.Replicas > 0 { - if flags.Coco.Replicas > 1 { - log.Warn().Msgf(L("Currently only one replica is supported, starting just one instead of %d"), flags.Coco.Replicas) - } - - tag := flags.Coco.Image.Tag +func setupHubXmlrpcContainer(flags *podmanInstallFlags) error { + if flags.HubXmlrpc.Enable { + log.Info().Msg(L("Enabling Hub XML-RPC API container.")) + tag := flags.HubXmlrpc.Image.Tag if tag == "" { tag = flags.Image.Tag } - cocoImage, err := utils.ComputeImage(flags.Coco.Image.Name, tag) + hubXmlrpcImage, err := utils.ComputeImage(flags.HubXmlrpc.Image.Name, tag) if err != nil { return utils.Errorf(err, L("failed to compute image URL")) } - if err := podman.GenerateAttestationSystemdService(cocoImage, flags.Db); err != nil { + if err := podman.GenerateHubXmlrpcSystemdService(hubXmlrpcImage); err != nil { return utils.Errorf(err, L("cannot generate systemd service")) } - if err := shared_podman.EnableService(shared_podman.ServerAttestationService); err != nil { + if err := shared_podman.EnableService(shared_podman.HubXmlrpcService); err != nil { return utils.Errorf(err, L("cannot enable service")) } } @@ -48,12 +46,8 @@ func setupCocoContainer(flags *podmanInstallFlags) error { } func waitForSystemStart(cnx *shared.Connection, image string, flags *podmanInstallFlags) error { - podmanArgs := flags.Podman.Args - if flags.MirrorPath != "" { - podmanArgs = append(podmanArgs, "-v", flags.MirrorPath+":/mirror") - } - - if err := podman.GenerateSystemdService(flags.TZ, image, flags.Debug.Java, podmanArgs); err != nil { + err := podman.GenerateSystemdService(flags.TZ, image, flags.Debug.Java, flags.Mirror, flags.Podman.Args) + if err != nil { return err } @@ -76,7 +70,7 @@ func installForPodman( return errors.New(L("install podman before running this command")) } - inspectedHostValues, err := utils.InspectHost() + inspectedHostValues, err := utils.InspectHost(false) if err != nil { return utils.Errorf(err, L("cannot inspect host values")) } @@ -138,7 +132,11 @@ func installForPodman( return err } - if err := setupCocoContainer(flags); err != nil { + if err := coco.SetupCocoContainer(flags.Coco.Replicas, flags.Coco.Image, flags.Image, flags.Db); err != nil { + return err + } + + if err := setupHubXmlrpcContainer(flags); err != nil { return err } diff --git a/mgradm/cmd/install/shared/flags.go b/mgradm/cmd/install/shared/flags.go index f92ffc047..41a048339 100644 --- a/mgradm/cmd/install/shared/flags.go +++ b/mgradm/cmd/install/shared/flags.go @@ -7,6 +7,7 @@ package shared import ( "fmt" "net/mail" + "path" "regexp" "strings" @@ -50,13 +51,19 @@ type CocoFlags struct { Image types.ImageFlags `mapstructure:",squash"` } +// HubXmlrpcFlags contains settings for Hub XMLRPC container. +type HubXmlrpcFlags struct { + Enable bool + Image types.ImageFlags `mapstructure:",squash"` +} + // InstallFlags stores all the flags used by install command. type InstallFlags struct { TZ string Email string EmailFrom string IssParent string - MirrorPath string + Mirror string Tftp bool Db DbFlags ReportDb DbFlags @@ -65,6 +72,7 @@ type InstallFlags struct { Debug DebugFlags Image types.ImageFlags `mapstructure:",squash"` Coco CocoFlags + HubXmlrpc HubXmlrpcFlags Admin apiTypes.User Organization string } @@ -123,10 +131,10 @@ func (flags *InstallFlags) CheckParameters(cmd *cobra.Command, command string) { // AddInstallFlags add flags to installa command. func AddInstallFlags(cmd *cobra.Command) { + cmd_utils.AddMirrorFlag(cmd) cmd.Flags().String("tz", "", L("Time zone to set on the server. Defaults to the host timezone")) cmd.Flags().String("email", "admin@example.com", L("Administrator e-mail")) cmd.Flags().String("emailfrom", "admin@example.com", L("E-Mail sending the notifications")) - cmd.Flags().String("mirrorPath", "", L("Path to mirrored packages mounted on the host")) cmd.Flags().String("issParent", "", L("InterServerSync v1 parent FQDN")) cmd.Flags().String("db-user", "spacewalk", L("Database user")) @@ -214,6 +222,16 @@ func AddInstallFlags(cmd *cobra.Command) { _ = utils.AddFlagToHelpGroupID(cmd, "coco-image", "coco-container") _ = utils.AddFlagToHelpGroupID(cmd, "coco-tag", "coco-container") + cmd.Flags().Bool("hubxmlrpc-enable", false, L("Enable Hub XML-RPC API service container")) + hubXmlrpcImage := path.Join(utils.DefaultNamespace, "server-hub-xmlrpc-api") + cmd.Flags().String("hubxmlrpc-image", hubXmlrpcImage, L("Hub XML-RPC API Image")) + cmd.Flags().String("hubxmlrpc-tag", utils.DefaultTag, L("Hub XML-RPC API Image Tag")) + + _ = utils.AddFlagHelpGroup(cmd, &utils.Group{ID: "hubxmlrpc-container", Title: L("Hub XML-RPC API")}) + _ = utils.AddFlagToHelpGroupID(cmd, "hubxmlrpc-enable", "hubxmlrpc-container") + _ = utils.AddFlagToHelpGroupID(cmd, "hubxmlrpc-image", "hubxmlrpc-container") + _ = utils.AddFlagToHelpGroupID(cmd, "hubxmlrpc-tag", "hubxmlrpc-container") + cmd.Flags().String("admin-login", "admin", L("Administrator user name")) cmd.Flags().String("admin-password", "", L("Administrator password")) cmd.Flags().String("admin-firstName", "Administrator", L("First name of the administrator")) diff --git a/mgradm/cmd/install/shared/shared.go b/mgradm/cmd/install/shared/shared.go index 001296a9b..6901718f0 100644 --- a/mgradm/cmd/install/shared/shared.go +++ b/mgradm/cmd/install/shared/shared.go @@ -100,7 +100,7 @@ func generateSetupScript(flags *InstallFlags, fqdn string, extraEnv map[string]s "SCC_USER": flags.Scc.User, "SCC_PASS": flags.Scc.Password, } - if flags.MirrorPath != "" { + if flags.Mirror != "" { env["MIRROR_PATH"] = "/mirror" } diff --git a/mgradm/cmd/migrate/kubernetes/utils.go b/mgradm/cmd/migrate/kubernetes/utils.go index c2bfb61d7..69328b6f2 100644 --- a/mgradm/cmd/migrate/kubernetes/utils.go +++ b/mgradm/cmd/migrate/kubernetes/utils.go @@ -14,6 +14,7 @@ import ( "path" "github.com/rs/zerolog" + "github.com/rs/zerolog/log" "github.com/spf13/cobra" migration_shared "github.com/uyuni-project/uyuni-tools/mgradm/cmd/migrate/shared" "github.com/uyuni-project/uyuni-tools/mgradm/shared/kubernetes" @@ -116,6 +117,11 @@ func migrateToKubernetes( "--reset-values", "--set", "timezone=" + tz, } + if flags.Mirror != "" { + log.Warn().Msgf(L("The mirror data will not be migrated, ensure it is available at %s"), flags.Mirror) + // TODO Handle claims for multi-node clusters + helmArgs = append(helmArgs, "--set", "mirror.hostPath="+flags.Mirror) + } helmArgs = append(helmArgs, setupSslArray...) // Run uyuni upgrade using the new ssl certificate diff --git a/mgradm/cmd/migrate/podman/utils.go b/mgradm/cmd/migrate/podman/utils.go index e528a34a2..514e18af9 100644 --- a/mgradm/cmd/migrate/podman/utils.go +++ b/mgradm/cmd/migrate/podman/utils.go @@ -54,7 +54,7 @@ func migrateToPodman(globalFlags *types.GlobalFlags, flags *podmanMigrateFlags, return utils.Errorf(err, L("cannot run post upgrade script")) } - if err := podman.GenerateSystemdService(tz, serverImage, false, viper.GetStringSlice("podman.arg")); err != nil { + if err := podman.GenerateSystemdService(tz, serverImage, false, flags.Mirror, viper.GetStringSlice("podman.arg")); err != nil { return utils.Errorf(err, L("cannot generate systemd service file")) } diff --git a/mgradm/cmd/migrate/shared/flags.go b/mgradm/cmd/migrate/shared/flags.go index fcd6e7e30..751e78d0a 100644 --- a/mgradm/cmd/migrate/shared/flags.go +++ b/mgradm/cmd/migrate/shared/flags.go @@ -16,10 +16,12 @@ type MigrateFlags struct { Image types.ImageFlags `mapstructure:",squash"` MigrationImage types.ImageFlags `mapstructure:"migration"` User string + Mirror string } // AddMigrateFlags add migration flags to a command. func AddMigrateFlags(cmd *cobra.Command) { + utils.AddMirrorFlag(cmd) utils.AddImageFlag(cmd) utils.AddMigrationImageFlag(cmd) cmd.Flags().String("user", "root", L("User on the source server. Non-root user must have passwordless sudo privileges (NOPASSWD tag in /etc/sudoers).")) diff --git a/mgradm/cmd/restart/podman.go b/mgradm/cmd/restart/podman.go index 1e53ef7af..30fc992bf 100644 --- a/mgradm/cmd/restart/podman.go +++ b/mgradm/cmd/restart/podman.go @@ -21,7 +21,14 @@ func podmanRestart( return err } if podman.HasService(podman.ServerAttestationService) { - return podman.RestartService(podman.ServerAttestationService) + if err := podman.RestartService(podman.ServerAttestationService); err != nil { + return err + } + } + if podman.HasService(podman.HubXmlrpcService) { + if err := podman.RestartService(podman.HubXmlrpcService); err != nil { + return err + } } return nil } diff --git a/mgradm/cmd/scale/kubernetes.go b/mgradm/cmd/scale/kubernetes.go new file mode 100644 index 000000000..3668e86f2 --- /dev/null +++ b/mgradm/cmd/scale/kubernetes.go @@ -0,0 +1,24 @@ +// SPDX-FileCopyrightText: 2024 SUSE LLC +// +// SPDX-License-Identifier: Apache-2.0 + +//go:build !nok8s + +package scale + +import ( + "errors" + + "github.com/spf13/cobra" + . "github.com/uyuni-project/uyuni-tools/shared/l10n" + "github.com/uyuni-project/uyuni-tools/shared/types" +) + +func kubernetesScale( + globalFlags *types.GlobalFlags, + flags *scaleFlags, + cmd *cobra.Command, + args []string, +) error { + return errors.New(L("kubernetes not supported yet")) +} diff --git a/mgradm/cmd/scale/nokubernetes.go b/mgradm/cmd/scale/nokubernetes.go new file mode 100644 index 000000000..3aea0393b --- /dev/null +++ b/mgradm/cmd/scale/nokubernetes.go @@ -0,0 +1,24 @@ +// SPDX-FileCopyrightText: 2024 SUSE LLC +// +// SPDX-License-Identifier: Apache-2.0 + +//go:build nok8s + +package scale + +import ( + "errors" + + "github.com/spf13/cobra" + . "github.com/uyuni-project/uyuni-tools/shared/l10n" + "github.com/uyuni-project/uyuni-tools/shared/types" +) + +func kubernetesScale( + globalFlags *types.GlobalFlags, + flags *scaleFlags, + cmd *cobra.Command, + args []string, +) error { + return errors.New(L("built without kubernetes support")) +} diff --git a/mgradm/cmd/scale/podman.go b/mgradm/cmd/scale/podman.go new file mode 100644 index 000000000..1b68b11b8 --- /dev/null +++ b/mgradm/cmd/scale/podman.go @@ -0,0 +1,30 @@ +// SPDX-FileCopyrightText: 2024 SUSE LLC +// +// SPDX-License-Identifier: Apache-2.0 + +package scale + +import ( + "fmt" + + "github.com/spf13/cobra" + + "github.com/uyuni-project/uyuni-tools/shared/podman" + "github.com/uyuni-project/uyuni-tools/shared/types" + + . "github.com/uyuni-project/uyuni-tools/shared/l10n" +) + +func podmanScale( + globalFlags *types.GlobalFlags, + flags *scaleFlags, + cmd *cobra.Command, + args []string, +) error { + newReplicas := flags.Replicas + service := args[0] + if service == podman.ServerAttestationService { + return podman.ScaleService(newReplicas, service) + } + return fmt.Errorf(L("service not allowing to be scaled: %s"), service) +} diff --git a/mgradm/cmd/scale/scale.go b/mgradm/cmd/scale/scale.go new file mode 100644 index 000000000..b33c8b1c7 --- /dev/null +++ b/mgradm/cmd/scale/scale.go @@ -0,0 +1,57 @@ +// SPDX-FileCopyrightText: 2024 SUSE LLC +// +// SPDX-License-Identifier: Apache-2.0 + +package scale + +import ( + "github.com/spf13/cobra" + "github.com/uyuni-project/uyuni-tools/shared" + . "github.com/uyuni-project/uyuni-tools/shared/l10n" + "github.com/uyuni-project/uyuni-tools/shared/types" + "github.com/uyuni-project/uyuni-tools/shared/utils" +) + +type scaleFlags struct { + Backend string + Replicas int +} + +func addScaleFlags(cmd *cobra.Command) { + cmd.Flags().Int("replicas", 0, L("How many replicas of a service should be started.")) +} + +// NewCommand adjusts a containers replicas. +func NewCommand(globalFlags *types.GlobalFlags) *cobra.Command { + scaleCmd := &cobra.Command{ + Use: "scale", + GroupID: "management", + Short: L("Adjust the replicas for services supporting it."), + Long: L(`Adjust the replicas for services supporting it. +Supported services: + - uyuni-server-attestation +`), + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + var flags scaleFlags + return utils.CommandHelper(globalFlags, cmd, args, &flags, scale) + }, + } + scaleCmd.SetUsageTemplate(scaleCmd.UsageTemplate()) + addScaleFlags(scaleCmd) + + if utils.KubernetesBuilt { + utils.AddBackendFlag(scaleCmd) + } + + return scaleCmd +} + +func scale(globalFlags *types.GlobalFlags, flags *scaleFlags, cmd *cobra.Command, args []string) error { + fn, err := shared.ChoosePodmanOrKubernetes(cmd.Flags(), podmanScale, kubernetesScale) + if err != nil { + return err + } + + return fn(globalFlags, flags, cmd, args) +} diff --git a/mgradm/cmd/start/podman.go b/mgradm/cmd/start/podman.go index 4d66a43e5..a13e70e7a 100644 --- a/mgradm/cmd/start/podman.go +++ b/mgradm/cmd/start/podman.go @@ -5,6 +5,8 @@ package start import ( + "fmt" + "github.com/spf13/cobra" "github.com/uyuni-project/uyuni-tools/shared/podman" "github.com/uyuni-project/uyuni-tools/shared/types" @@ -16,8 +18,13 @@ func podmanStart( cmd *cobra.Command, args []string, ) error { - if podman.HasService(podman.ServerAttestationService) { - if err := podman.StartService(podman.ServerAttestationService); err != nil { + for i := 0; i < podman.CurrentReplicaCount(podman.ServerAttestationService); i++ { + if err := podman.StartService(fmt.Sprintf("%s@%d", podman.ServerAttestationService, i)); err != nil { + return err + } + } + if podman.HasService(podman.HubXmlrpcService) { + if err := podman.StartService(podman.HubXmlrpcService); err != nil { return err } } diff --git a/mgradm/cmd/status/podman.go b/mgradm/cmd/status/podman.go index 466cf5c34..18efa41d6 100644 --- a/mgradm/cmd/status/podman.go +++ b/mgradm/cmd/status/podman.go @@ -5,6 +5,8 @@ package status import ( + "fmt" + "github.com/rs/zerolog" "github.com/spf13/cobra" adm_utils "github.com/uyuni-project/uyuni-tools/mgradm/shared/utils" @@ -23,23 +25,24 @@ func podmanStatus( ) error { // Show the status and that's it if the service is not running if !podman.IsServiceRunning(podman.ServerService) { - if err := utils.RunCmdStdMapping(zerolog.DebugLevel, "systemctl", "status", "--no-pager", podman.ServerService); err != nil { - return utils.Errorf(err, L("failed to get status of the server service")) + _ = utils.RunCmdStdMapping(zerolog.DebugLevel, "systemctl", "status", "--no-pager", podman.ServerService) + } else { + // Run spacewalk-service status in the container + cnx := shared.NewConnection("podman", podman.ServerContainerName, "") + if err := adm_utils.ExecCommand(zerolog.InfoLevel, cnx, "spacewalk-service", "status"); err != nil { + return utils.Errorf(err, L("failed to run spacewalk-service status")) } - return nil } - // Run spacewalk-service status in the container - cnx := shared.NewConnection("podman", podman.ServerContainerName, "") - if err := adm_utils.ExecCommand(zerolog.InfoLevel, cnx, "spacewalk-service", "status"); err != nil { - return utils.Errorf(err, L("failed to run spacewalk-service status")) + for i := 0; i < podman.CurrentReplicaCount(podman.ServerAttestationService); i++ { + println() // add an empty line between the previous logs and this one + _ = utils.RunCmdStdMapping(zerolog.DebugLevel, "systemctl", "status", "--no-pager", fmt.Sprintf("%s@%d", podman.ServerAttestationService, i)) } - if !podman.IsServiceRunning(podman.ServerAttestationService) { - if err := utils.RunCmdStdMapping(zerolog.DebugLevel, "systemctl", "status", podman.ServerAttestationService); err != nil { + if podman.HasService(podman.HubXmlrpcService) { + if err := utils.RunCmdStdMapping(zerolog.DebugLevel, "systemctl", "status", podman.HubXmlrpcService); err != nil { return utils.Errorf(err, L("failed to get status of the server service")) } - return nil } return nil diff --git a/mgradm/cmd/stop/podman.go b/mgradm/cmd/stop/podman.go index ec95f1dd7..a03047e8b 100644 --- a/mgradm/cmd/stop/podman.go +++ b/mgradm/cmd/stop/podman.go @@ -5,6 +5,8 @@ package stop import ( + "fmt" + "github.com/spf13/cobra" "github.com/uyuni-project/uyuni-tools/shared/podman" "github.com/uyuni-project/uyuni-tools/shared/types" @@ -16,8 +18,8 @@ func podmanStop( cmd *cobra.Command, args []string, ) error { - if podman.HasService(podman.ServerAttestationService) { - if err := podman.StopService(podman.ServerAttestationService); err != nil { + for i := 0; i < podman.CurrentReplicaCount(podman.ServerAttestationService); i++ { + if err := podman.StopService(fmt.Sprintf("%s@%d", podman.ServerAttestationService, i)); err != nil { return err } } diff --git a/mgradm/cmd/support/config/config.go b/mgradm/cmd/support/config/config.go index abca54ce9..48f9c1606 100644 --- a/mgradm/cmd/support/config/config.go +++ b/mgradm/cmd/support/config/config.go @@ -29,7 +29,7 @@ the containers for support to help debugging.`), }, } - configCmd.Flags().StringP("output", "o", "supportconfig.tar.gz", L("path where to extract the data")) + configCmd.Flags().StringP("output", "o", ".", L("path where to extract the data")) utils.AddBackendFlag(configCmd) return configCmd diff --git a/mgradm/cmd/support/config/extractor.go b/mgradm/cmd/support/config/extractor.go index a41b521e5..51109466b 100644 --- a/mgradm/cmd/support/config/extractor.go +++ b/mgradm/cmd/support/config/extractor.go @@ -11,6 +11,8 @@ import ( "os/exec" "path" "regexp" + "strings" + "time" "github.com/rs/zerolog" "github.com/rs/zerolog/log" @@ -86,13 +88,17 @@ func extract(globalFlags *types.GlobalFlags, flags *configFlags, cmd *cobra.Comm // Pack it all into a tarball log.Info().Msg(L("Preparing the tarball")) - tarball, err := utils.NewTarGz(flags.Output) + + supportFileName := getSupportConfigFileSaveName() + supportFilePath := path.Join(flags.Output, fmt.Sprintf("%s.tar.gz", supportFileName)) + + tarball, err := utils.NewTarGz(supportFilePath) if err != nil { return err } for _, file := range files { - if err := tarball.AddFile(file, path.Base(file)); err != nil { + if err := tarball.AddFile(file, path.Join(supportFileName, path.Base(file))); err != nil { return utils.Errorf(err, L("failed to add %s to tarball"), path.Base(file)) } } @@ -105,3 +111,14 @@ func getSupportConfigPath(out []byte) string { re := regexp.MustCompile(`/var/log/scc_[^.]+\.txz`) return re.FindString(string(out)) } + +func getSupportConfigFileSaveName() string { + hostname_b, err := utils.RunCmdOutput(zerolog.DebugLevel, "hostname") + hostname := "localhost" + if err != nil { + log.Warn().Err(err).Msg(L("Unable to detect hostname, using localhost")) + hostname = strings.TrimSpace(string(hostname_b)) + } + now := time.Now() + return fmt.Sprintf("scc_%s_%s", hostname, now.Format("20060102_1504")) +} diff --git a/mgradm/cmd/uninstall/kubernetes.go b/mgradm/cmd/uninstall/kubernetes.go index b41ac2cb9..50a032330 100644 --- a/mgradm/cmd/uninstall/kubernetes.go +++ b/mgradm/cmd/uninstall/kubernetes.go @@ -86,5 +86,10 @@ func uninstallForKubernetes( if clusterInfos.IsRke2() { kubernetes.UninstallRke2NginxConfig(!flags.Force) } + + if !flags.Force { + log.Warn().Msg(L("Nothing has been uninstalled, run with --force to actually uninstall")) + } + log.Warn().Msg(L("Volumes have not been touched. Depending on the storage class used, they may not have been removed")) return nil } diff --git a/mgradm/cmd/uninstall/podman.go b/mgradm/cmd/uninstall/podman.go index 32564cee1..7e4ca64ea 100644 --- a/mgradm/cmd/uninstall/podman.go +++ b/mgradm/cmd/uninstall/podman.go @@ -5,6 +5,8 @@ package uninstall import ( + "os" + "github.com/rs/zerolog/log" "github.com/spf13/cobra" . "github.com/uyuni-project/uyuni-tools/shared/l10n" @@ -24,9 +26,21 @@ func uninstallForPodman( // Force stop the pod podman.DeleteContainer(podman.ServerContainerName, !flags.Force) - if podman.HasService(podman.ServerAttestationService) { - podman.UninstallService(podman.ServerAttestationService, !flags.Force) - podman.DeleteContainer(podman.ServerAttestationService, !flags.Force) + if err := podman.ScaleService(0, podman.ServerAttestationService); err != nil { + return utils.Errorf(err, L("cannot delete confidential computing attestation instances")) + } + // Remove the service unit + servicePath := podman.GetServicePath(podman.ServerAttestationService + "@") + if _, err := os.Stat(servicePath); !os.IsNotExist(err) { + log.Info().Msgf(L("Remove %s"), servicePath) + if err := os.Remove(servicePath); err != nil { + log.Error().Err(err).Msgf(L("Failed to remove %s.service file"), podman.ServerAttestationService+"@") + } + } + + if podman.HasService(podman.HubXmlrpcService) { + podman.UninstallService(podman.HubXmlrpcService, !flags.Force) + podman.DeleteContainer(podman.HubXmlrpcService, !flags.Force) } // Remove the volumes @@ -45,5 +59,13 @@ func uninstallForPodman( podman.DeleteNetwork(!flags.Force) - return podman.ReloadDaemon(!flags.Force) + err := podman.ReloadDaemon(!flags.Force) + + if !flags.Force { + log.Warn().Msg(L("Nothing has been uninstalled, run with --force and --purgeVolumes to actually uninstall and clear data")) + } else if !flags.PurgeVolumes { + log.Warn().Msg(L("Data have been kept, use podman volume commands to clear the volumes")) + } + + return err } diff --git a/mgradm/shared/coco/coco.go b/mgradm/shared/coco/coco.go new file mode 100644 index 000000000..55d5d6179 --- /dev/null +++ b/mgradm/shared/coco/coco.go @@ -0,0 +1,65 @@ +// SPDX-FileCopyrightText: 2024 SUSE LLC +// +// SPDX-License-Identifier: Apache-2.0 + +package coco + +import ( + "fmt" + + "github.com/rs/zerolog/log" + "github.com/uyuni-project/uyuni-tools/mgradm/cmd/install/shared" + "github.com/uyuni-project/uyuni-tools/mgradm/shared/templates" + . "github.com/uyuni-project/uyuni-tools/shared/l10n" + "github.com/uyuni-project/uyuni-tools/shared/podman" + "github.com/uyuni-project/uyuni-tools/shared/types" + "github.com/uyuni-project/uyuni-tools/shared/utils" +) + +// SetupCocoContainer sets up the confidential computing attestation service. +func SetupCocoContainer(replicas int, image types.ImageFlags, baseImage types.ImageFlags, db shared.DbFlags) error { + tag := image.Tag + if tag == "" { + if baseImage.Tag != "" { + tag = baseImage.Tag + } else { + tag = "latest" + } + } + cocoImage, err := utils.ComputeImage(image.Name, tag) + if err != nil { + cocoImage, err = utils.ComputeImage(baseImage.Name, tag, "-attestation") + if err != nil { + return utils.Errorf(err, L("failed to compute image URL")) + } + } + + attestationData := templates.AttestationServiceTemplateData{ + NamePrefix: "uyuni", + Network: podman.UyuniNetwork, + Image: cocoImage, + } + + log.Info().Msg(L("Setting up confidential computing attestation service")) + + if err := utils.WriteTemplateToFile(attestationData, + podman.GetServicePath(podman.ServerAttestationService+"@"), 0555, false); err != nil { + return utils.Errorf(err, L("failed to generate systemd service unit file")) + } + + environment := fmt.Sprintf(`Environment=UYUNI_IMAGE=%s + Environment=database_connection=jdbc:postgresql://uyuni-server.mgr.internal:%d/%s + Environment=database_user=%s + Environment=database_password=%s + `, cocoImage, db.Port, db.Name, db.User, db.Password) + + if err := podman.GenerateSystemdConfFile(podman.ServerAttestationService+"@", "Service", environment); err != nil { + return utils.Errorf(err, L("cannot generate systemd conf file")) + } + + if err := podman.ReloadDaemon(false); err != nil { + return err + } + + return podman.ScaleService(replicas, podman.ServerAttestationService) +} diff --git a/mgradm/shared/podman/podman.go b/mgradm/shared/podman/podman.go index f4f9a6d72..980e18ff2 100644 --- a/mgradm/shared/podman/podman.go +++ b/mgradm/shared/podman/podman.go @@ -65,28 +65,64 @@ Environment=database_password=%s return podman.ReloadDaemon(false) } +// GenerateHubXmlrpcSystemdService creates the Hub XMLRPC systemd files. +func GenerateHubXmlrpcSystemdService(image string) error { + hubXmlrpcData := templates.HubXmlrpcServiceTemplateData{ + Volumes: utils.HubXmlrpcVolumeMounts, + Ports: utils.HUB_XMLRPC_PORTS, + NamePrefix: "uyuni", + Network: podman.UyuniNetwork, + Image: image, + } + if err := utils.WriteTemplateToFile(hubXmlrpcData, podman.GetServicePath(podman.HubXmlrpcService), 0555, false); err != nil { + return utils.Errorf(err, L("failed to generate systemd service unit file")) + } + + environment := fmt.Sprintf(`Environment=UYUNI_IMAGE=%s + `, image) + if err := podman.GenerateSystemdConfFile(podman.HubXmlrpcService, "Service", environment); err != nil { + return utils.Errorf(err, L("cannot generate systemd conf file")) + } + + return podman.ReloadDaemon(false) +} + // GenerateSystemdService creates a serverY systemd file. -func GenerateSystemdService(tz string, image string, debug bool, podmanArgs []string) error { - if err := podman.SetupNetwork(); err != nil { +func GenerateSystemdService(tz string, image string, debug bool, mirrorPath string, podmanArgs []string) error { + if err := podman.SetupNetwork(false); err != nil { return utils.Errorf(err, L("cannot setup network")) } log.Info().Msg(L("Enabling system service")) - args := append(podman.GetCommonParams(), podmanArgs...) + args := podman.GetCommonParams() + + if mirrorPath != "" { + args = append(args, "-v", mirrorPath+":/mirror") + } + + ports := GetExposedPorts(debug) + if _, err := exec.LookPath("csp-billing-adapter"); err == nil { + ports = append(ports, utils.NewPortMap("csp-billing", 10888, 10888)) + args = append(args, "-e ISPAYG=1") + } data := templates.PodmanServiceTemplateData{ Volumes: utils.ServerVolumeMounts, NamePrefix: "uyuni", Args: strings.Join(args, " "), - Ports: GetExposedPorts(debug), - Timezone: tz, + Ports: ports, Network: podman.UyuniNetwork, } if err := utils.WriteTemplateToFile(data, podman.GetServicePath("uyuni-server"), 0555, false); err != nil { return utils.Errorf(err, L("failed to generate systemd service unit file")) } - if err := podman.GenerateSystemdConfFile("uyuni-server", "Service", "Environment=UYUNI_IMAGE="+image); err != nil { + config := fmt.Sprintf(`Environment=UYUNI_IMAGE=%s +Environment=TZ=%s +Environment="PODMAN_EXTRA_ARGS=%s" +`, image, strings.TrimSpace(tz), strings.Join(podmanArgs, " ")) + + if err := podman.GenerateSystemdConfFile("uyuni-server", "Service", config); err != nil { return utils.Errorf(err, L("cannot generate systemd conf file")) } return podman.ReloadDaemon(false) @@ -156,6 +192,9 @@ func UpdateSslCertificate(cnx *shared.Connection, chain *ssl.CaChain, serverPair // The services need to be restarted log.Info().Msg(L("Restarting services after updating the certificate")) + if err := utils.RunCmd("podman", "exec", podman.ServerContainerName, "systemctl", "restart", "postgresql.service"); err != nil { + return err + } return utils.RunCmdStdMapping(zerolog.DebugLevel, "podman", "exec", podman.ServerContainerName, "spacewalk-service", "restart") } @@ -182,7 +221,7 @@ func RunMigration(serverImage string, pullPolicy string, sshAuthSocket string, s extraArgs = append(extraArgs, "-v", sshKnownhostsPath+":/etc/ssh/ssh_known_hosts") } - inspectedHostValues, err := utils.InspectHost() + inspectedHostValues, err := utils.InspectHost(false) if err != nil { return "", "", "", utils.Errorf(err, L("cannot inspect host values")) } @@ -242,7 +281,7 @@ func RunPgsqlVersionUpgrade(image types.ImageFlags, migrationImage types.ImageFl } } - inspectedHostValues, err := utils.InspectHost() + inspectedHostValues, err := utils.InspectHost(false) if err != nil { return utils.Errorf(err, L("cannot inspect host values")) } @@ -388,7 +427,7 @@ func Inspect(serverImage string, pullPolicy string) (map[string]string, error) { return map[string]string{}, utils.Errorf(err, L("failed to create temporary directory")) } - inspectedHostValues, err := utils.InspectHost() + inspectedHostValues, err := utils.InspectHost(false) if err != nil { return map[string]string{}, utils.Errorf(err, L("cannot inspect host values")) } diff --git a/mgradm/shared/templates/attestationServiceTemplate.go b/mgradm/shared/templates/attestationServiceTemplate.go index b16236908..1db9e9915 100644 --- a/mgradm/shared/templates/attestationServiceTemplate.go +++ b/mgradm/shared/templates/attestationServiceTemplate.go @@ -9,22 +9,21 @@ import ( "text/template" ) -const attestationServiceTemplate = `# uyuni-server-attestation.service, generated by mgradm +const attestationServiceTemplate = ` +# uyuni-server-attestation.service, generated by mgradm # Use an uyuni-server-attestation.service.d/local.conf file to override - [Unit] Description=Uyuni server attestation container service Wants=network.target After=network-online.target - [Service] Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure -ExecStartPre=/bin/rm -f %t/uyuni-server-attestation.pid %t/%n.ctr-id -ExecStartPre=/usr/bin/podman rm --ignore --force -t 10 {{ .NamePrefix }}-server-attestation +ExecStartPre=/bin/rm -f %t/uyuni-server-attestation-%i.pid %t/%n.ctr-id +ExecStartPre=/usr/bin/podman rm --ignore --force -t 10 {{ .NamePrefix }}-server-attestation-%i ExecStart=/usr/bin/podman run \ - --conmon-pidfile %t/uyuni-server-attestation.pid \ - --cidfile=%t/%n.ctr-id \ + --conmon-pidfile %t/uyuni-server-attestation-%i.pid \ + --cidfile=%t/%n-%i.ctr-id \ --cgroups=no-conmon \ --sdnotify=conmon \ -d \ @@ -32,18 +31,16 @@ ExecStart=/usr/bin/podman run \ -e database_user \ -e database_password \ --replace \ - --name {{ .NamePrefix }}-server-attestation \ - --hostname {{ .NamePrefix }}-server-attestation.mgr.internal \ + --name {{ .NamePrefix }}-server-attestation-%i \ + --hostname {{ .NamePrefix }}-server-attestation-%i.mgr.internal \ --network {{ .Network }} \ ${UYUNI_IMAGE} - -ExecStop=/usr/bin/podman stop --ignore -t 10 --cidfile=%t/%n.ctr-id -ExecStopPost=/usr/bin/podman rm -f --ignore -t 10 --cidfile=%t/%n.ctr-id -PIDFile=%t/uyuni-server-attestation.pid +ExecStop=/usr/bin/podman stop --ignore -t 10 --cidfile=%t/%n-%i.ctr-id +ExecStopPost=/usr/bin/podman rm -f --ignore -t 10 --cidfile=%t/%n-%i.ctr-id +PIDFile=%t/uyuni-server-attestation-%i.pid TimeoutStopSec=60 TimeoutStartSec=60 Type=forking - [Install] WantedBy=multi-user.target default.target ` diff --git a/mgradm/shared/templates/hubXmlrpcServiceTemplate.go b/mgradm/shared/templates/hubXmlrpcServiceTemplate.go new file mode 100644 index 000000000..365d176b1 --- /dev/null +++ b/mgradm/shared/templates/hubXmlrpcServiceTemplate.go @@ -0,0 +1,75 @@ +// SPDX-FileCopyrightText: 2024 SUSE LLC +// +// SPDX-License-Identifier: Apache-2.0 + +package templates + +import ( + "io" + "text/template" + + "github.com/uyuni-project/uyuni-tools/shared/types" +) + +const hubXmlrpcServiceTemplate = `# uyuni-uyuni-hub-xmlrpc.service, generated by mgradm +# Use an uyuni-hub-xmlrpc.service.d/local.conf file to override + +[Unit] +Description=Uyuni Hub XMLRPC API container service +Wants=network.target +After=network-online.target + +[Service] +Environment=PODMAN_SYSTEMD_UNIT=%n +Environment=HUB_API_URL=http://{{ .NamePrefix }}-server.mgr.internal:80/rpc/api +Environment=HUB_CONNECT_USING_SSL=true +Restart=on-failure +ExecStartPre=/bin/rm -f %t/uyuni-hub-xmlrpc.pid %t/%n.ctr-id +ExecStartPre=/usr/bin/podman rm --ignore --force -t 10 {{ .NamePrefix }}-hub-xmlrpc +ExecStart=/usr/bin/podman run \ + --conmon-pidfile %t/uyuni-hub-xmlrpc.pid \ + --cidfile=%t/%n.ctr-id \ + --cgroups=no-conmon \ + --sdnotify=conmon \ + -d \ + --replace \ + {{- range .Ports }} + -p {{ .Exposed }}:{{ .Port }}{{if .Protocol}}/{{ .Protocol }}{{end}} \ + {{- end }} + {{- range .Volumes }} + -v {{ .Name }}:{{ .MountPath }} \ + {{- end }} + -e HUB_API_URL \ + -e HUB_CONNECT_TIMEOUT \ + -e HUB_REQUEST_TIMEOUT \ + -e HUB_CONNECT_USING_SSL \ + --name {{ .NamePrefix }}-hub-xmlrpc \ + --hostname {{ .NamePrefix }}-hub-xmlrpc.mgr.internal \ + --network {{ .Network }} \ + ${UYUNI_IMAGE} + +ExecStop=/usr/bin/podman stop --ignore -t 10 --cidfile=%t/%n.ctr-id +ExecStopPost=/usr/bin/podman rm -f --ignore -t 10 --cidfile=%t/%n.ctr-id +PIDFile=%t/uyuni-hub-xmlrpc.pid +TimeoutStopSec=60 +TimeoutStartSec=60 +Type=forking + +[Install] +WantedBy=multi-user.target default.target +` + +// PodmanServiceTemplateData POD information to create systemd file. +type HubXmlrpcServiceTemplateData struct { + Volumes []types.VolumeMount + Ports []types.PortMap + NamePrefix string + Image string + Network string +} + +// Render will create the systemd configuration file. +func (data HubXmlrpcServiceTemplateData) Render(wr io.Writer) error { + t := template.Must(template.New("service").Parse(hubXmlrpcServiceTemplate)) + return t.Execute(wr, data) +} diff --git a/mgradm/shared/templates/serviceTemplate.go b/mgradm/shared/templates/serviceTemplate.go index 7ca5bd47a..a18c7cbaa 100644 --- a/mgradm/shared/templates/serviceTemplate.go +++ b/mgradm/shared/templates/serviceTemplate.go @@ -22,11 +22,10 @@ RequiresMountsFor=%t/containers [Service] Environment=PODMAN_SYSTEMD_UNIT=%n -Environment=TZ={{ .Timezone }} Restart=on-failure ExecStartPre=/bin/rm -f %t/uyuni-server.pid %t/%n.ctr-id ExecStartPre=/usr/bin/podman rm --ignore --force -t 10 {{ .NamePrefix }}-server -ExecStart=/usr/bin/podman run \ +ExecStart=/bin/sh -c '/usr/bin/podman run \ --conmon-pidfile %t/uyuni-server.pid \ --cidfile=%t/%n.ctr-id \ --cgroups=no-conmon \ @@ -45,7 +44,7 @@ ExecStart=/usr/bin/podman run \ {{- end }} -e TZ=${TZ} \ --network {{ .Network }} \ - ${UYUNI_IMAGE} + ${PODMAN_EXTRA_ARGS} ${UYUNI_IMAGE}' ExecStop=/usr/bin/podman exec \ uyuni-server \ /bin/bash -c 'spacewalk-service stop && systemctl stop postgresql' @@ -72,7 +71,6 @@ type PodmanServiceTemplateData struct { NamePrefix string Args string Ports []types.PortMap - Timezone string Image string Network string } diff --git a/mgradm/shared/utils/cmd_utils.go b/mgradm/shared/utils/cmd_utils.go index 5625f2795..7a2551d00 100644 --- a/mgradm/shared/utils/cmd_utils.go +++ b/mgradm/shared/utils/cmd_utils.go @@ -123,3 +123,8 @@ func AddMigrationImageFlag(cmd *cobra.Command) { _ = utils.AddFlagToHelpGroupID(cmd, "migration-tag", "migration-image") _ = utils.AddFlagToHelpGroupID(cmd, "migration-pullPolicy", "migration-image") } + +// AddMirrorFlag adds the flag for the mirror. +func AddMirrorFlag(cmd *cobra.Command) { + cmd.Flags().String("mirror", "", L("Path to mirrored packages mounted on the host")) +} diff --git a/mgrpxy/cmd/uninstall/kubernetes.go b/mgrpxy/cmd/uninstall/kubernetes.go index 478667e4c..64289a1c6 100644 --- a/mgrpxy/cmd/uninstall/kubernetes.go +++ b/mgrpxy/cmd/uninstall/kubernetes.go @@ -5,7 +5,9 @@ package uninstall import ( + "github.com/rs/zerolog/log" "github.com/uyuni-project/uyuni-tools/shared/kubernetes" + . "github.com/uyuni-project/uyuni-tools/shared/l10n" ) func uninstallForKubernetes(dryRun bool) error { @@ -35,5 +37,10 @@ func uninstallForKubernetes(dryRun bool) error { if clusterInfos.IsRke2() { kubernetes.UninstallRke2NginxConfig(dryRun) } + + if dryRun { + log.Warn().Msg(L("Nothing has been uninstalled, run with --force to actually uninstall")) + } + log.Warn().Msg(L("Volumes have not been touched. Depending on the storage class used, they may not have been removed")) return nil } diff --git a/mgrpxy/cmd/uninstall/podman.go b/mgrpxy/cmd/uninstall/podman.go index 501f01343..4e53862f4 100644 --- a/mgrpxy/cmd/uninstall/podman.go +++ b/mgrpxy/cmd/uninstall/podman.go @@ -51,5 +51,13 @@ func uninstallForPodman(dryRun bool, purge bool) error { podman.DeleteNetwork(dryRun) - return podman.ReloadDaemon(dryRun) + err := podman.ReloadDaemon(dryRun) + + if dryRun { + log.Warn().Msg(L("Nothing has been uninstalled, run with --force and --purgeVolumes to actually uninstall and clear data")) + } else if !purge { + log.Warn().Msg(L("Data have been kept, use podman volume commands to clear the volumes")) + } + + return err } diff --git a/mgrpxy/shared/podman/podman.go b/mgrpxy/shared/podman/podman.go index 0d1a49ec1..53d6d165b 100644 --- a/mgrpxy/shared/podman/podman.go +++ b/mgrpxy/shared/podman/podman.go @@ -30,7 +30,7 @@ type PodmanProxyUpgradeFlags struct { // GenerateSystemdService generates all the systemd files required by proxy. func GenerateSystemdService(httpdImage string, saltBrokerImage string, squidImage string, sshImage string, tftpdImage string, podmanArgs []string) error { - if err := podman.SetupNetwork(); err != nil { + if err := podman.SetupNetwork(true); err != nil { return shared_utils.Errorf(err, L("cannot setup network")) } @@ -46,10 +46,10 @@ func GenerateSystemdService(httpdImage string, saltBrokerImage string, squidImag dataPod := templates.PodTemplateData{ Ports: ports, HttpProxyFile: httpProxyConfig, - Args: strings.Join(podmanArgs, " "), Network: podman.UyuniNetwork, } - if err := generateSystemdFile(dataPod, "pod"); err != nil { + podEnv := fmt.Sprintf(`Environment="PODMAN_EXTRA_ARGS=%s"`, strings.Join(podmanArgs, " ")) + if err := generateSystemdFile(dataPod, "pod", "", podEnv); err != nil { return err } @@ -57,18 +57,16 @@ func GenerateSystemdService(httpdImage string, saltBrokerImage string, squidImag dataHttpd := templates.HttpdTemplateData{ Volumes: shared_utils.PROXY_HTTPD_VOLUMES, HttpProxyFile: httpProxyConfig, - Image: httpdImage, } - if err := generateSystemdFile(dataHttpd, "httpd"); err != nil { + if err := generateSystemdFile(dataHttpd, "httpd", httpdImage, ""); err != nil { return err } // Salt broker dataSaltBroker := templates.SaltBrokerTemplateData{ HttpProxyFile: httpProxyConfig, - Image: saltBrokerImage, } - if err := generateSystemdFile(dataSaltBroker, "salt-broker"); err != nil { + if err := generateSystemdFile(dataSaltBroker, "salt-broker", saltBrokerImage, ""); err != nil { return err } @@ -76,18 +74,16 @@ func GenerateSystemdService(httpdImage string, saltBrokerImage string, squidImag dataSquid := templates.SquidTemplateData{ Volumes: shared_utils.PROXY_SQUID_VOLUMES, HttpProxyFile: httpProxyConfig, - Image: squidImage, } - if err := generateSystemdFile(dataSquid, "squid"); err != nil { + if err := generateSystemdFile(dataSquid, "squid", squidImage, ""); err != nil { return err } // SSH dataSSH := templates.SSHTemplateData{ HttpProxyFile: httpProxyConfig, - Image: sshImage, } - if err := generateSystemdFile(dataSSH, "ssh"); err != nil { + if err := generateSystemdFile(dataSSH, "ssh", sshImage, ""); err != nil { return err } @@ -95,16 +91,15 @@ func GenerateSystemdService(httpdImage string, saltBrokerImage string, squidImag dataTftpd := templates.TFTPDTemplateData{ Volumes: shared_utils.PROXY_TFTPD_VOLUMES, HttpProxyFile: httpProxyConfig, - Image: tftpdImage, } - if err := generateSystemdFile(dataTftpd, "tftpd"); err != nil { + if err := generateSystemdFile(dataTftpd, "tftpd", tftpdImage, ""); err != nil { return err } return podman.ReloadDaemon(false) } -func generateSystemdFile(template shared_utils.Template, service string) error { +func generateSystemdFile(template shared_utils.Template, service string, image string, config string) error { name := fmt.Sprintf("uyuni-proxy-%s.service", service) const systemdPath = "/etc/systemd/system" @@ -112,6 +107,14 @@ func generateSystemdFile(template shared_utils.Template, service string) error { if err := shared_utils.WriteTemplateToFile(template, path, 0644, true); err != nil { return shared_utils.Errorf(err, L("failed to generate systemd file '%s'"), path) } + + if image != "" || config != "" { + configBody := fmt.Sprintf(`%s +Environment=UYUNI_IMAGE=%s`, config, image) + if err := podman.GenerateSystemdConfFile("uyuni-proxy-"+service, "Service", configBody); err != nil { + return shared_utils.Errorf(err, L("cannot generate systemd conf file")) + } + } return nil } @@ -128,7 +131,7 @@ func getHttpProxyConfig() string { // GetContainerImage returns a proxy image URL. func GetContainerImage(flags *utils.ProxyImageFlags, name string) (string, error) { image := flags.GetContainerImage(name) - inspectedHostValues, err := shared_utils.InspectHost() + inspectedHostValues, err := shared_utils.InspectHost(true) if err != nil { return "", shared_utils.Errorf(err, L("cannot inspect host values")) } @@ -199,7 +202,7 @@ func Upgrade(globalFlags *types.GlobalFlags, flags *PodmanProxyUpgradeFlags, cmd func getContainerImage(flags *utils.ProxyImageFlags, name string) (string, error) { image := flags.GetContainerImage(name) - inspectedHostValues, err := shared_utils.InspectHost() + inspectedHostValues, err := shared_utils.InspectHost(true) if err != nil { return "", shared_utils.Errorf(err, L("cannot inspect host values")) } diff --git a/mgrpxy/shared/templates/httpd.go b/mgrpxy/shared/templates/httpd.go index 8825b13a7..5d1606137 100644 --- a/mgrpxy/shared/templates/httpd.go +++ b/mgrpxy/shared/templates/httpd.go @@ -21,14 +21,13 @@ After=uyuni-proxy-pod.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n -Environment=UYUNI_IMAGE={{ .Image }} {{- if .HttpProxyFile }} EnvironmentFile={{ .HttpProxyFile }} {{- end }} Restart=on-failure ExecStartPre=/bin/rm -f %t/uyuni-proxy-httpd.pid %t/uyuni-proxy-httpd.ctr-id -ExecStart=/usr/bin/podman run \ +ExecStart=/bin/sh -c '/usr/bin/podman run \ --conmon-pidfile %t/uyuni-proxy-httpd.pid \ --cidfile %t/uyuni-proxy-httpd.ctr-id \ --cgroups=no-conmon \ @@ -39,7 +38,7 @@ ExecStart=/usr/bin/podman run \ -v {{ $name }}:{{ $path }} \ {{- end }} --name uyuni-proxy-httpd \ - ${UYUNI_IMAGE} + ${UYUNI_IMAGE}' ExecStop=/usr/bin/podman stop --ignore --cidfile %t/uyuni-proxy-httpd.ctr-id -t 10 ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/uyuni-proxy-httpd.ctr-id @@ -55,7 +54,6 @@ WantedBy=multi-user.target default.target type HttpdTemplateData struct { Volumes map[string]string HttpProxyFile string - Image string } // Render will create the systemd configuration file. diff --git a/mgrpxy/shared/templates/pod.go b/mgrpxy/shared/templates/pod.go index 3e4f7d114..536c94886 100644 --- a/mgrpxy/shared/templates/pod.go +++ b/mgrpxy/shared/templates/pod.go @@ -28,13 +28,13 @@ EnvironmentFile={{ .HttpProxyFile }} Restart=on-failure ExecStartPre=/bin/rm -f %t/uyuni-proxy-pod.pid %t/uyuni-proxy-pod.pod-id -ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/uyuni-proxy-pod.pid \ +ExecStartPre=/bin/sh -c '/usr/bin/podman pod create --infra-conmon-pidfile %t/uyuni-proxy-pod.pid \ --pod-id-file %t/uyuni-proxy-pod.pod-id --name uyuni-proxy-pod \ --network {{ .Network }} \ {{- range .Ports }} -p {{ .Exposed }}:{{ .Port }}{{ if .Protocol }}/{{ .Protocol }}{{ end }} \ {{- end }} - --replace {{ .Args }} + --replace ${PODMAN_EXTRA_ARGS}' ExecStart=/usr/bin/podman pod start --pod-id-file %t/uyuni-proxy-pod.pod-id ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/uyuni-proxy-pod.pod-id -t 10 @@ -52,7 +52,6 @@ WantedBy=multi-user.target default.target type PodTemplateData struct { Ports []types.PortMap HttpProxyFile string - Args string Network string } diff --git a/mgrpxy/shared/templates/salt-broker.go b/mgrpxy/shared/templates/salt-broker.go index e8f25c8fe..ad221b51c 100644 --- a/mgrpxy/shared/templates/salt-broker.go +++ b/mgrpxy/shared/templates/salt-broker.go @@ -21,14 +21,13 @@ After=uyuni-proxy-pod.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n -Environment=UYUNI_IMAGE={{ .Image }} {{- if .HttpProxyFile }} EnvironmentFile={{ .HttpProxyFile }} {{- end }} Restart=on-failure ExecStartPre=/bin/rm -f %t/uyuni-proxy-salt-broker.pid %t/uyuni-proxy-salt-broker.ctr-id -ExecStart=/usr/bin/podman run \ +ExecStart=/bin/sh -c '/usr/bin/podman run \ --conmon-pidfile %t/uyuni-proxy-salt-broker.pid \ --cidfile %t/uyuni-proxy-salt-broker.ctr-id \ --cgroups=no-conmon \ @@ -36,7 +35,7 @@ ExecStart=/usr/bin/podman run \ --replace -dt \ -v /etc/uyuni/proxy:/etc/uyuni:ro \ --name uyuni-proxy-salt-broker \ - ${UYUNI_IMAGE} + ${UYUNI_IMAGE}' ExecStop=/usr/bin/podman stop --ignore --cidfile %t/uyuni-proxy-salt-broker.ctr-id -t 10 ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/uyuni-proxy-salt-broker.ctr-id @@ -51,7 +50,6 @@ WantedBy=multi-user.target default.target // SaltBrokerTemplateData represents Salt Broker information to create systemd file. type SaltBrokerTemplateData struct { HttpProxyFile string - Image string } // Render will create the systemd configuration file. diff --git a/mgrpxy/shared/templates/squid.go b/mgrpxy/shared/templates/squid.go index 3f7a243b9..fe3c9e8a7 100644 --- a/mgrpxy/shared/templates/squid.go +++ b/mgrpxy/shared/templates/squid.go @@ -21,14 +21,13 @@ After=uyuni-proxy-pod.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n -Environment=UYUNI_IMAGE={{ .Image }} {{- if .HttpProxyFile }} EnvironmentFile={{ .HttpProxyFile }} {{- end }} Restart=on-failure ExecStartPre=/bin/rm -f %t/uyuni-proxy-squid.pid %t/uyuni-proxy-squid.ctr-id -ExecStart=/usr/bin/podman run \ +ExecStart=/bin/sh -c '/usr/bin/podman run \ --conmon-pidfile %t/uyuni-proxy-squid.pid \ --cidfile %t/uyuni-proxy-squid.ctr-id \ --cgroups=no-conmon \ @@ -39,7 +38,7 @@ ExecStart=/usr/bin/podman run \ -v {{ $name }}:{{ $path }} \ {{- end }} --name uyuni-proxy-squid \ - ${UYUNI_IMAGE} + ${UYUNI_IMAGE}' ExecStop=/usr/bin/podman stop --ignore --cidfile %t/uyuni-proxy-squid.ctr-id -t 10 ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/uyuni-proxy-squid.ctr-id @@ -55,7 +54,6 @@ WantedBy=multi-user.target default.target type SquidTemplateData struct { Volumes map[string]string HttpProxyFile string - Image string } // Render will create the systemd configuration file. diff --git a/mgrpxy/shared/templates/ssh.go b/mgrpxy/shared/templates/ssh.go index 460b99a1f..c3351fee9 100644 --- a/mgrpxy/shared/templates/ssh.go +++ b/mgrpxy/shared/templates/ssh.go @@ -21,14 +21,13 @@ After=uyuni-proxy-pod.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n -Environment=UYUNI_IMAGE={{ .Image }} {{- if .HttpProxyFile }} EnvironmentFile={{ .HttpProxyFile }} {{- end }} Restart=on-failure ExecStartPre=/bin/rm -f %t/uyuni-proxy-ssh.pid %t/uyuni-proxy-ssh.ctr-id -ExecStart=/usr/bin/podman run \ +ExecStart=/bin/sh -c '/usr/bin/podman run \ --conmon-pidfile %t/uyuni-proxy-ssh.pid \ --cidfile %t/uyuni-proxy-ssh.ctr-id \ --cgroups=no-conmon \ @@ -36,7 +35,7 @@ ExecStart=/usr/bin/podman run \ --replace -dt \ -v /etc/uyuni/proxy:/etc/uyuni:ro \ --name uyuni-proxy-ssh \ - ${UYUNI_IMAGE} + ${UYUNI_IMAGE}' ExecStop=/usr/bin/podman stop --ignore --cidfile %t/uyuni-proxy-ssh.ctr-id -t 10 ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/uyuni-proxy-ssh.ctr-id @@ -51,7 +50,6 @@ WantedBy=multi-user.target default.target // SSHTemplateData SSH information to create systemd file. type SSHTemplateData struct { HttpProxyFile string - Image string } // Render will create the systemd configuration file. diff --git a/mgrpxy/shared/templates/tftpd.go b/mgrpxy/shared/templates/tftpd.go index d413d5e98..585cb034b 100644 --- a/mgrpxy/shared/templates/tftpd.go +++ b/mgrpxy/shared/templates/tftpd.go @@ -21,14 +21,13 @@ After=uyuni-proxy-pod.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n -Environment=UYUNI_IMAGE={{ .Image }} {{- if .HttpProxyFile }} EnvironmentFile={{ .HttpProxyFile }} {{- end }} Restart=on-failure ExecStartPre=/bin/rm -f %t/uyuni-proxy-tftpd.pid %t/uyuni-proxy-tftpd.ctr-id -ExecStart=/usr/bin/podman run \ +ExecStart=/bin/sh -c '/usr/bin/podman run \ --conmon-pidfile %t/uyuni-proxy-tftpd.pid \ --cidfile %t/uyuni-proxy-tftpd.ctr-id \ --cgroups=no-conmon \ @@ -39,7 +38,7 @@ ExecStart=/usr/bin/podman run \ -v {{ $name }}:{{ $path }} \ {{- end }} --name uyuni-proxy-tftpd \ - ${UYUNI_IMAGE} + ${UYUNI_IMAGE}' ExecStop=/usr/bin/podman stop --ignore --cidfile %t/uyuni-proxy-tftpd.ctr-id -t 10 ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/uyuni-proxy-tftpd.ctr-id @@ -55,7 +54,6 @@ WantedBy=multi-user.target default.target type TFTPDTemplateData struct { Volumes map[string]string HttpProxyFile string - Image string } // Render will create the TFTPD systemd configuration file. diff --git a/shared/podman/network.go b/shared/podman/network.go index f82fb2df4..a890260c9 100644 --- a/shared/podman/network.go +++ b/shared/podman/network.go @@ -18,7 +18,7 @@ import ( const UyuniNetwork = "uyuni" // SetupNetwork creates the podman network. -func SetupNetwork() error { +func SetupNetwork(isProxy bool) error { log.Info().Msgf(L("Setting up %s network"), UyuniNetwork) ipv6Enabled := isIpv6Enabled() @@ -44,7 +44,11 @@ func SetupNetwork() error { } } + // We do not need inter-container resolution, disable dns plugin args := []string{"network", "create"} + if isProxy { + args = append(args, "--disable-dns") + } if ipv6Enabled { // An IPv6 network on a host where IPv6 is disabled doesn't work: don't try it. // Check if the networkd backend is netavark diff --git a/shared/podman/systemd.go b/shared/podman/systemd.go index d872d699a..a0a2ddde6 100644 --- a/shared/podman/systemd.go +++ b/shared/podman/systemd.go @@ -6,6 +6,7 @@ package podman import ( "errors" + "fmt" "os" "os/exec" "path" @@ -23,6 +24,9 @@ const ServerService = "uyuni-server" // Name of the systemd service for the coco attestation container. const ServerAttestationService = "uyuni-server-attestation" +// Name of the systemd service for the Hub XMLRPC container. +const HubXmlrpcService = "uyuni-hub-xmlrpc" + // Name of the systemd service for the proxy. const ProxyService = "uyuni-proxy-pod" @@ -33,6 +37,22 @@ func HasService(name string) bool { return err == nil } +// ServiceIsEnabled returns if a service is enabled +// name is the name of the service without the '.service' part. +func ServiceIsEnabled(name string) bool { + err := utils.RunCmd("systemctl", "is-enabled", name+".service") + return err == nil +} + +// DisableService disables a service +// name is the name of the service without the '.service' part. +func DisableService(name string) error { + if err := utils.RunCmd("systemctl", "disable", "--now", name); err != nil { + return utils.Errorf(err, L("failed to disable %s systemd service"), name) + } + return nil +} + // GetServicePath return the path for a given service. func GetServicePath(name string) string { return path.Join(servicesPath, name+".service") @@ -59,9 +79,6 @@ func UninstallService(name string, dryRun bool) { } else { if dryRun { log.Info().Msgf(L("Would run %s"), "systemctl disable --now "+name) - log.Info().Msgf(L("Would remove %s"), servicePath) - log.Info().Msgf(L("Would remove %s"), serviceConfPath) - log.Info().Msgf(L("Would remove %s if empty"), serviceConfFolder) } else { log.Info().Msgf(L("Disable %s service"), name) // disable server @@ -69,24 +86,39 @@ func UninstallService(name string, dryRun bool) { if err != nil { log.Error().Err(err).Msgf(L("Failed to disable %s service"), name) } + } + if dryRun { + log.Info().Msgf(L("Would remove %s"), servicePath) + } else { // Remove the service unit log.Info().Msgf(L("Remove %s"), servicePath) if err := os.Remove(servicePath); err != nil { log.Error().Err(err).Msgf(L("Failed to remove %s.service file"), name) } + } + if utils.FileExists(serviceConfFolder) { if utils.FileExists(serviceConfPath) { - log.Info().Msgf(L("Remove %s"), serviceConfPath) - if err := os.Remove(serviceConfPath); err != nil { - log.Error().Err(err).Msgf(L("Failed to remove %s file"), serviceConfPath) + if dryRun { + log.Info().Msgf(L("Would remove %s"), serviceConfPath) + } else { + log.Info().Msgf(L("Remove %s"), serviceConfPath) + if err := os.Remove(serviceConfPath); err != nil { + log.Error().Err(err).Msgf(L("Failed to remove %s file"), serviceConfPath) + } } } - if utils.IsEmptyDirectory(serviceConfFolder) { - log.Debug().Msgf("Removing %s folder, since it's empty", serviceConfFolder) - _ = utils.RemoveDirectory(serviceConfFolder) + + if dryRun { + log.Info().Msgf(L("Would remove %s if empty"), serviceConfFolder) } else { - log.Warn().Msgf(L("%s folder contains file created by the user. Please remove them when uninstallation is completed."), serviceConfFolder) + if utils.IsEmptyDirectory(serviceConfFolder) { + log.Debug().Msgf("Removing %s folder, since it's empty", serviceConfFolder) + _ = utils.RemoveDirectory(serviceConfFolder) + } else { + log.Warn().Msgf(L("%s folder contains file created by the user. Please remove them when uninstallation is completed."), serviceConfFolder) + } } } } @@ -169,3 +201,33 @@ func GenerateSystemdConfFile(serviceName string, section string, body string) er return nil } + +// CurrentReplicaCount returns the current enabled replica count for a template service +// name is the name of the service without the '.service' part. +func CurrentReplicaCount(name string) int { + count := 0 + for ServiceIsEnabled(fmt.Sprintf("%s@%d", name, count)) { + count += 1 + } + return count +} + +// scales a templated systemd service to the requested number of replicas. +// name is the name of the service without the '.service' part. +func ScaleService(replicas int, name string) error { + currentReplicas := CurrentReplicaCount(name) + log.Info().Msgf(L("Scale %[1]s from %[2]d to %[3]d replicas."), name, currentReplicas, replicas) + for i := currentReplicas; i < replicas; i++ { + serviceName := fmt.Sprintf("%s@%d", name, i) + if err := EnableService(serviceName); err != nil { + return utils.Errorf(err, L("cannot enable service")) + } + } + for i := replicas; i < currentReplicas; i++ { + serviceName := fmt.Sprintf("%s@%d", name, i) + if err := DisableService(serviceName); err != nil { + return utils.Errorf(err, L("cannot disable service")) + } + } + return nil +} diff --git a/shared/podman/utils.go b/shared/podman/utils.go index ce5773d87..def6cc59e 100644 --- a/shared/podman/utils.go +++ b/shared/podman/utils.go @@ -191,14 +191,14 @@ func getGraphRoot() (string, error) { } // Inspect check values on a given image and deploy. -func Inspect(serverImage string, pullPolicy string) (map[string]string, error) { +func Inspect(serverImage string, pullPolicy string, proxyHost bool) (map[string]string, error) { scriptDir, err := os.MkdirTemp("", "mgradm-*") defer os.RemoveAll(scriptDir) if err != nil { return map[string]string{}, utils.Errorf(err, L("failed to create temporary directory")) } - inspectedHostValues, err := utils.InspectHost() + inspectedHostValues, err := utils.InspectHost(proxyHost) if err != nil { return map[string]string{}, utils.Errorf(err, L("cannot inspect host values")) } diff --git a/shared/templates/inspectTemplate.go b/shared/templates/inspectTemplate.go index 39ba56817..181404215 100644 --- a/shared/templates/inspectTemplate.go +++ b/shared/templates/inspectTemplate.go @@ -14,8 +14,10 @@ import ( const inspectTemplate = `#!/bin/bash # inspect.sh, generated by mgradm {{- range .Param }} + {{- if or (not $.ProxyHost) (and $.ProxyHost .Proxy ) }} echo "{{ .Variable }}=$({{ .CLI }})" >> {{ $.OutputFile }} {{- end }} +{{- end }} exit 0 ` @@ -23,6 +25,7 @@ exit 0 type InspectTemplateData struct { Param []types.InspectData OutputFile string + ProxyHost bool } // Render will create inspect script. diff --git a/shared/types/inspect.go b/shared/types/inspect.go index 5b595389b..7b23e3281 100644 --- a/shared/types/inspect.go +++ b/shared/types/inspect.go @@ -10,6 +10,7 @@ package types type InspectData struct { Variable string CLI string + Proxy bool } /* InspectFile represent where the inspect file should be stored @@ -22,9 +23,10 @@ type InspectFile struct { } // NewInspectData creates an InspectData instance. -func NewInspectData(variable string, cli string) InspectData { +func NewInspectData(variable string, cli string, proxy bool) InspectData { return InspectData{ Variable: variable, CLI: cli, + Proxy: proxy, } } diff --git a/shared/utils/ports.go b/shared/utils/ports.go index 02bff3a43..78e2a3f73 100644 --- a/shared/utils/ports.go +++ b/shared/utils/ports.go @@ -48,6 +48,11 @@ var UDP_PORTS = []types.PortMap{ }, } +// HUB_XMLRPC_PORTS are the tcp ports required by the Hub XMLRPC API service. +var HUB_XMLRPC_PORTS = []types.PortMap{ + NewPortMap("hub-xmlrpc", 2830, 2830), +} + // PROXY_TCP_PORTS are the tcp ports required by the proxy. var PROXY_TCP_PORTS = []types.PortMap{ NewPortMap("ssh", 8022, 22), diff --git a/shared/utils/utils.go b/shared/utils/utils.go index 1e68213b6..3a08acd0d 100644 --- a/shared/utils/utils.go +++ b/shared/utils/utils.go @@ -39,15 +39,15 @@ var imageValid = regexp.MustCompile("^((?:[^:/]+(?::[0-9]+)?/)?[^:]+)(?::([^:]+) var InspectScriptFilename = "inspect.sh" var inspectValues = []types.InspectData{ - types.NewInspectData("uyuni_release", "cat /etc/*release | grep 'Uyuni release' | cut -d ' ' -f3 || true"), - types.NewInspectData("suse_manager_release", "cat /etc/*release | grep 'SUSE Manager release' | cut -d ' ' -f4 || true"), - types.NewInspectData("architecture", "lscpu | grep Architecture | awk '{print $2}' || true"), - types.NewInspectData("fqdn", "cat /etc/rhn/rhn.conf 2>/dev/null | grep 'java.hostname' | cut -d' ' -f3 || true"), - types.NewInspectData("image_pg_version", "rpm -qa --qf '%{VERSION}\\n' 'name=postgresql[0-8][0-9]-server' | cut -d. -f1 | sort -n | tail -1 || true"), - types.NewInspectData("current_pg_version", "(test -e /var/lib/pgsql/data/PG_VERSION && cat /var/lib/pgsql/data/PG_VERSION) || true"), - types.NewInspectData("registration_info", "env LC_ALL=C LC_MESSAGES=C LANG=C transactional-update --quiet register --status 2>/dev/null || true"), - types.NewInspectData("scc_username", "cat /etc/zypp/credentials.d/SCCcredentials 2>&1 /dev/null | grep username | cut -d= -f2 || true"), - types.NewInspectData("scc_password", "cat /etc/zypp/credentials.d/SCCcredentials 2>&1 /dev/null | grep password | cut -d= -f2 || true"), + types.NewInspectData("uyuni_release", "cat /etc/*release | grep 'Uyuni release' | cut -d ' ' -f3 || true", false), + types.NewInspectData("suse_manager_release", "cat /etc/*release | grep 'SUSE Manager release' | cut -d ' ' -f4 || true", false), + types.NewInspectData("architecture", "lscpu | grep Architecture | awk '{print $2}' || true", false), + types.NewInspectData("fqdn", "cat /etc/rhn/rhn.conf 2>/dev/null | grep 'java.hostname' | cut -d' ' -f3 || true", false), + types.NewInspectData("image_pg_version", "rpm -qa --qf '%{VERSION}\\n' 'name=postgresql[0-8][0-9]-server' | cut -d. -f1 | sort -n | tail -1 || true", false), + types.NewInspectData("current_pg_version", "(test -e /var/lib/pgsql/data/PG_VERSION && cat /var/lib/pgsql/data/PG_VERSION) || true", false), + types.NewInspectData("registration_info", "env LC_ALL=C LC_MESSAGES=C LANG=C transactional-update --quiet register --status 2>/dev/null || true", false), + types.NewInspectData("scc_username", "cat /etc/zypp/credentials.d/SCCcredentials 2>&1 /dev/null | grep username | cut -d= -f2 || true", true), + types.NewInspectData("scc_password", "cat /etc/zypp/credentials.d/SCCcredentials 2>&1 /dev/null | grep password | cut -d= -f2 || true", true), } // InspectOutputFile represents the directory and the basename where the inspect values are stored. @@ -338,14 +338,14 @@ func ReadInspectData(scriptDir string, prefix ...string) (map[string]string, err } // InspectHost check values on a host machine. -func InspectHost() (map[string]string, error) { +func InspectHost(serverHost bool) (map[string]string, error) { scriptDir, err := os.MkdirTemp("", "mgradm-*") defer os.RemoveAll(scriptDir) if err != nil { return map[string]string{}, Errorf(err, L("failed to create temporary directory")) } - if err := GenerateInspectHostScript(scriptDir); err != nil { + if err := GenerateInspectHostScript(scriptDir, serverHost); err != nil { return map[string]string{}, err } @@ -362,10 +362,11 @@ func InspectHost() (map[string]string, error) { } // GenerateInspectContainerScript create the host inspect script. -func GenerateInspectHostScript(scriptDir string) error { +func GenerateInspectHostScript(scriptDir string, proxyHost bool) error { data := templates.InspectTemplateData{ Param: inspectValues, OutputFile: scriptDir + "/" + InspectOutputFile.Basename, + ProxyHost: proxyHost, } scriptPath := filepath.Join(scriptDir, InspectScriptFilename) diff --git a/shared/utils/volumes.go b/shared/utils/volumes.go index 395211083..e76faca8c 100644 --- a/shared/utils/volumes.go +++ b/shared/utils/volumes.go @@ -97,6 +97,11 @@ var ServerVolumes = append([]types.Volume{ {Name: "ca-cert", PersistentVolumeClaim: &types.PersistentVolumeClaim{ClaimName: "ca-cert"}}, }, etcAndPgsqlVolumes[:]...) +// HubXmlrpcVolumeMounts represents volumes used by Hub Xmlrpc container. +var HubXmlrpcVolumeMounts = []types.VolumeMount{ + {MountPath: "/etc/pki/trust/anchors", Name: "ca-cert"}, +} + // PROXY_HTTPD_VOLUMES volumes used by HTTPD in proxy. var PROXY_HTTPD_VOLUMES = map[string]string{ "uyuni-proxy-rhn-cache": "/var/cache/rhn", diff --git a/uyuni-tools.changes.cbosdo.main b/uyuni-tools.changes.cbosdo.main index 946aa587a..a7813a5e6 100644 --- a/uyuni-tools.changes.cbosdo.main +++ b/uyuni-tools.changes.cbosdo.main @@ -1 +1,2 @@ +- Add parameters for the cloud service providers billing - Fix colors disabling in non-interactive runs diff --git a/uyuni-tools.changes.cbosdo.service-split b/uyuni-tools.changes.cbosdo.service-split new file mode 100644 index 000000000..2b64b1de6 --- /dev/null +++ b/uyuni-tools.changes.cbosdo.service-split @@ -0,0 +1 @@ +- Move user-defined values to service configuration files diff --git a/uyuni-tools.changes.cbosdo.uninstall-hint b/uyuni-tools.changes.cbosdo.uninstall-hint new file mode 100644 index 000000000..69ccd38e7 --- /dev/null +++ b/uyuni-tools.changes.cbosdo.uninstall-hint @@ -0,0 +1 @@ +- Add hint on uninstall dry runs that nothing has been done diff --git a/uyuni-tools.changes.kwalter.coco-scale b/uyuni-tools.changes.kwalter.coco-scale new file mode 100644 index 000000000..a44518595 --- /dev/null +++ b/uyuni-tools.changes.kwalter.coco-scale @@ -0,0 +1 @@ +Add scale command for changing confidential computing attestation replicas diff --git a/uyuni-tools.changes.mcalmer.guess-attestation-image-name b/uyuni-tools.changes.mcalmer.guess-attestation-image-name new file mode 100644 index 000000000..6d4b950a4 --- /dev/null +++ b/uyuni-tools.changes.mcalmer.guess-attestation-image-name @@ -0,0 +1 @@ +- compute attestation image name from base image when not specified diff --git a/uyuni-tools.changes.nadvornik.hub-xmlrpc b/uyuni-tools.changes.nadvornik.hub-xmlrpc new file mode 100644 index 000000000..3b2b83240 --- /dev/null +++ b/uyuni-tools.changes.nadvornik.hub-xmlrpc @@ -0,0 +1 @@ +- Add support for Hub XMLRPC API container diff --git a/uyuni-tools.changes.oholecek.no-dns-in-uyuni-net b/uyuni-tools.changes.oholecek.no-dns-in-uyuni-net new file mode 100644 index 000000000..f9433c3fb --- /dev/null +++ b/uyuni-tools.changes.oholecek.no-dns-in-uyuni-net @@ -0,0 +1 @@ +- Do not include dns plugin in proxy uyuni net (bsc#1224127) diff --git a/uyuni-tools.changes.rmateus.supportconfig_filename b/uyuni-tools.changes.rmateus.supportconfig_filename new file mode 100644 index 000000000..46bdb5ea7 --- /dev/null +++ b/uyuni-tools.changes.rmateus.supportconfig_filename @@ -0,0 +1 @@ +- supportconfig file name with date to avoid conflicts