Summary
The mgrpxy start command does not automatically extract and deploy the systemid certificate from httpd.yaml to the uyuni-proxy-systemid volume, requiring manual intervention to make proxy authentication work. This makes proxy deployment error-prone and non-intuitive.
Environment
- Uyuni Version: 2026.01
- uyuni-tools Version: (check with
mgrpxy --version)
- OS: openSUSE Leap 15.6
- Deployment Method: Podman (containerized)
- Configuration Method: spacecmd
proxy_container_config_generate_cert
Steps to Reproduce
-
Generate proxy configuration using spacecmd:
podman exec uyuni-server spacecmd proxy_container_config_generate_cert -- \
proxy.example.com \
master.example.com \
2048 \
admin@example.com \
-o /tmp/config.tar.gz
-
Transfer config.tar.gz to proxy host and extract:
scp config.tar.gz root@proxy-host:/root/
ssh root@proxy-host
cd /root
tar -xzf config.tar.gz
-
Ensure systemid volume mount is configured:
cat /etc/systemd/system/uyuni-proxy-httpd.service.d/systemid-mount.conf
# Contains: Environment="HTTPD_EXTRA_CONF=-v uyuni-proxy-systemid:/etc/sysconfig/rhn"
-
Start proxy containers:
-
Test proxy authentication:
curl -sSk -I https://proxy.example.com/rhn/manager/download/debian-12-amd64-uyuni-client/Packages
Expected Behavior
Actual Behavior
mgrpxy start starts containers but does not deploy the systemid from httpd.yaml
- The
uyuni-proxy-systemid volume remains empty or contains an old systemid
- Proxy authentication fails with
HTTP/1.1 500 Internal Server Error
- Master logs show:
Checksum check failed: <old-checksum> != <new-checksum>
- Proxy httpd logs show:
socket.timeout: The read operation timed out during server.proxy.login()
Manual Workaround Required
Users must manually extract and deploy the systemid:
# Extract systemid from httpd.yaml
grep 'system_id:' /root/httpd.yaml | \
sed 's/^[[:space:]]*system_id:[[:space:]]*//' > /tmp/systemid.xml
# Deploy to volume
VOLUME_PATH=$(podman volume inspect uyuni-proxy-systemid --format '{{.Mountpoint}}')
mkdir -p "$VOLUME_PATH"
cp /tmp/systemid.xml "$VOLUME_PATH/systemid"
# Restart httpd container
podman restart uyuni-proxy-httpd
Impact
- User Experience: Confusing and error-prone deployment process
- Documentation Gap: Not documented in official guides that this manual step is required
- Production Risk: Easy to miss this step, leading to non-functional proxies
- Update Complexity: Every proxy configuration update requires manual systemid extraction
Root Cause Analysis
The mgrpxy tool:
- Reads
config.yaml, httpd.yaml, and ssh.yaml to configure containers
- Uses
httpd.yaml to set environment variables and mount volumes
- Does NOT extract the
system_id field from httpd.yaml and write it to the filesystem/volume
- Assumes the systemid already exists in the volume (which is not true for new deployments or updates)
The httpd.yaml contains the systemid in this format:
httpd:
system_id: <?xml version="1.0"?><params><param><value><struct>...
But this value is never written to /etc/sysconfig/rhn/systemid in the container.
Proposed Solution
Enhance mgrpxy start to automatically deploy the systemid:
Option 1: Deploy During Container Start (Recommended)
Modify mgrpxy start to:
- Check if
httpd.yaml exists in the current directory
- Extract the
system_id field value
- Get the
uyuni-proxy-systemid volume mount point
- Write the systemid to
<volume-path>/systemid
- Proceed with normal container startup
Option 2: Add Explicit Command
Add a new command: mgrpxy deploy-systemid that users can run before mgrpxy start:
mgrpxy deploy-systemid /root/httpd.yaml
mgrpxy start
Option 3: Init Container
Use a podman init container that runs before httpd starts and extracts/deploys the systemid from the yaml configuration.
Additional Context
Related Issues:
- Proxy systemid must be in a persistent volume for authentication to work
- The volume mount is configured via systemd override:
HTTPD_EXTRA_CONF=-v uyuni-proxy-systemid:/etc/sysconfig/rhn
- This issue affects both new proxy deployments and proxy configuration updates
Documentation References:
Affected Commands:
mgrpxy start
mgrpxy install (if it also doesn't handle systemid deployment)
Additional Information
Workaround Script
We've created an automated deployment script that handles this:
#!/bin/bash
# Automated proxy configuration deployment
# This is what mgrpxy should do automatically
CONFIG_ARCHIVE="${1:-/root/config.tar.gz}"
TEMP_DIR=$(mktemp -d)
tar -xzf "$CONFIG_ARCHIVE" -C "$TEMP_DIR"
# Extract systemid from httpd.yaml
grep 'system_id:' "$TEMP_DIR/httpd.yaml" | \
sed 's/^[[:space:]]*system_id:[[:space:]]*//' > "$TEMP_DIR/systemid.xml"
# Deploy to volume
VOLUME_PATH=$(podman volume inspect uyuni-proxy-systemid --format '{{.Mountpoint}}')
mkdir -p "$VOLUME_PATH"
cp "$TEMP_DIR/systemid.xml" "$VOLUME_PATH/systemid"
# Move config files
cp "$TEMP_DIR"/*.yaml /root/
# Start containers
cd /root
mgrpxy start
Summary
The
mgrpxy startcommand does not automatically extract and deploy the systemid certificate fromhttpd.yamlto theuyuni-proxy-systemidvolume, requiring manual intervention to make proxy authentication work. This makes proxy deployment error-prone and non-intuitive.Environment
mgrpxy --version)proxy_container_config_generate_certSteps to Reproduce
Generate proxy configuration using spacecmd:
podman exec uyuni-server spacecmd proxy_container_config_generate_cert -- \ proxy.example.com \ master.example.com \ 2048 \ admin@example.com \ -o /tmp/config.tar.gzTransfer
config.tar.gzto proxy host and extract:scp config.tar.gz root@proxy-host:/root/ ssh root@proxy-host cd /root tar -xzf config.tar.gzEnsure systemid volume mount is configured:
cat /etc/systemd/system/uyuni-proxy-httpd.service.d/systemid-mount.conf # Contains: Environment="HTTPD_EXTRA_CONF=-v uyuni-proxy-systemid:/etc/sysconfig/rhn"Start proxy containers:
Test proxy authentication:
Expected Behavior
mgrpxy startshould:httpd.yamlfile in the current directorysystem_idfield value (XML certificate)uyuni-proxy-systemidvolume at/systemidThe proxy should successfully authenticate with the master and return
HTTP/1.1 403 Forbidden(or 200 with proper client credentials)Actual Behavior
mgrpxy startstarts containers but does not deploy the systemid fromhttpd.yamluyuni-proxy-systemidvolume remains empty or contains an old systemidHTTP/1.1 500 Internal Server ErrorChecksum check failed: <old-checksum> != <new-checksum>socket.timeout: The read operation timed outduringserver.proxy.login()Manual Workaround Required
Users must manually extract and deploy the systemid:
Impact
Root Cause Analysis
The
mgrpxytool:config.yaml,httpd.yaml, andssh.yamlto configure containershttpd.yamlto set environment variables and mount volumessystem_idfield fromhttpd.yamland write it to the filesystem/volumeThe
httpd.yamlcontains the systemid in this format:But this value is never written to
/etc/sysconfig/rhn/systemidin the container.Proposed Solution
Enhance
mgrpxy startto automatically deploy the systemid:Option 1: Deploy During Container Start (Recommended)
Modify
mgrpxy startto:httpd.yamlexists in the current directorysystem_idfield valueuyuni-proxy-systemidvolume mount point<volume-path>/systemidOption 2: Add Explicit Command
Add a new command:
mgrpxy deploy-systemidthat users can run beforemgrpxy start:Option 3: Init Container
Use a podman init container that runs before httpd starts and extracts/deploys the systemid from the yaml configuration.
Additional Context
Related Issues:
HTTPD_EXTRA_CONF=-v uyuni-proxy-systemid:/etc/sysconfig/rhnDocumentation References:
Affected Commands:
mgrpxy startmgrpxy install(if it also doesn't handle systemid deployment)Additional Information
Workaround Script
We've created an automated deployment script that handles this: