From 0b8dd9084010b1d444d7362c5be6704843c21aba Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Fri, 6 Jun 2025 15:44:58 +0200 Subject: [PATCH] podman machine: fix proxy test Do not write /etc/environment.d files, something is broken in the new image that causes the boot to fail when any basic var is set there. Signed-off-by: Paul Holzinger --- pkg/machine/ignition/ignition.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkg/machine/ignition/ignition.go b/pkg/machine/ignition/ignition.go index 9f3fcaf6e4..a4e09b184c 100644 --- a/pkg/machine/ignition/ignition.go +++ b/pkg/machine/ignition/ignition.go @@ -530,7 +530,7 @@ func prepareCertFile(fpath string, name string) (File, error) { const ( systemdSSLConf = "/etc/systemd/system.conf.d/podman-machine-ssl.conf" - envdSSLConf = "/etc/environment.d/podman-machine-ssl.conf" + // envdSSLConf = "/etc/environment.d/podman-machine-ssl.conf" profileSSLConf = "/etc/profile.d/podman-machine-ssl.sh" sslCertFile = "SSL_CERT_FILE" sslCertDir = "SSL_CERT_DIR" @@ -538,7 +538,7 @@ const ( func getSSLEnvironmentFiles(sslFileName, sslDirName string) []File { systemdFileContent := "[Manager]\n" - envdFileContent := "" + // envdFileContent := "" profileFileContent := "" if sslFileName != "" { // certs are written to UserCertsTargetPath see prepareCertFile() @@ -546,19 +546,21 @@ func getSSLEnvironmentFiles(sslFileName, sslDirName string) []File { // a path on the client (i.e. windows) but then join to linux path that will be used inside the VM. env := fmt.Sprintf("%s=%q\n", sslCertFile, path.Join(define.UserCertsTargetPath, filepath.Base(sslFileName))) systemdFileContent += "DefaultEnvironment=" + env - envdFileContent += env + // envdFileContent += env profileFileContent += "export " + env } if sslDirName != "" { // certs are written to UserCertsTargetPath see prepareCertFile() env := fmt.Sprintf("%s=%q\n", sslCertDir, define.UserCertsTargetPath) systemdFileContent += "DefaultEnvironment=" + env - envdFileContent += env + // envdFileContent += env profileFileContent += "export " + env } return []File{ getSSLFile(systemdSSLConf, systemdFileContent), - getSSLFile(envdSSLConf, envdFileContent), + // FIXME: something is very broken with the environment.d systemd generator. + // When setting any var there the systemd fails to boot successfully. + // getSSLFile(envdSSLConf, envdFileContent), getSSLFile(profileSSLConf, profileFileContent), } }