Before Adding SP7 Node

Prerequisites

  • This task IS APPLICABLE TO for SLES 15 SP7 nodes in environments that use a proxy.
  • This does IS NOT APPLICABLE to: SLES 15 SP5.

Before adding an SP7 Node to ERE

On SP7, the proxy configuration isn't inherited when a command runs through sudo. sudo resets the environment, and SP7's zypper doesn't fall back to the system proxy settings. As a result, sudo zypper refresh hangs or times out. Adding the env_keep line to /etc/sudoers (step 2) makes sudo keep the proxy variables, so deployment succeeds.

Do the following steps on every SP7 node:
  1. Register the node with SUSE:
    sudo SUSEConnect -r <REGCODE> -e <EMAIL>
  2. Keep the proxy variables across sudo. Run sudo visudo and add:
    Defaults env_keep += "http_proxy https_proxy no_proxy ftp_proxy ZYPP_HTTP_PROXY ZYPP_HTTPS_PROXY"
    Verify with sudo -l | grep env_keep.
  3. Verify with the following command:
    sudo zypper --non-interactive refresh

    This operation should complete in a minute with no Timeout exceeded errors.

Before performing a Kubernetes upgrade, configure proxy settings for the ezdaemon service

ezdaemon is the service that runs the Kubernetes upgrade, downgrade and certificate renewal on a node. It runs under systemd, not sudo, so it has no proxy settings. On SP7, zypper goes directly to https://scc.suse.com., hence a direct connection is not available, so the call times out. The upgrade fails with exit status

Updating the ezdaemon proxy settings is a fix for this issue. Do the following steps:
  1. Find the system proxy file. On SLES it is normally /etc/sysconfig/proxy:
    sudo grep -E '^(PROXY_ENABLED|HTTP_PROXY|HTTPS_PROXY|NO_PROXY)' /etc/sysconfig/proxy

    Proxy settings must be listed and PROXY_ENABLED="yes".

  2. Create the directory:
    sudo mkdir -p /etc/systemd/system/ezdaemon.service.d
  3. Ezdaemon to use the same proxy file:
    cat <<EOF | sudo tee /etc/systemd/system/ezdaemon.service.d/proxy.conf
    [Service]
    EnvironmentFile=/etc/sysconfig/proxy
    EOF
    NOTE
    Here the system proxy is set in /etc/sysconfig/proxy, so ezdaemon uses the same file. If your proxy is set in a different file, use that path.
  4. Restart the service and check:
    sudo systemctl daemon-reload
    sudo systemctl restart ezdaemon
    systemctl show ezdaemon -p EnvironmentFiles -p ActiveState

    Expected result: EnvironmentFiles=/etc/sysconfig/proxy and ActiveState=active.