Description
Currently, the hostname is generated using device serial or MAC address. We should use the already-generated device UUID (from edgeos-identity) to create a unique, persistent hostname that's broadcasted via mDNS.
Current Behavior
- Hostname:
edgeos-${serial_last_8_chars}
- UUID is generated separately in
/etc/edgeos/device-uuid
- Two separate identity systems
Desired Behavior
- Generate hostname using the device UUID
- Format:
edgeos-${uuid_last_8_chars} or similar
- Ensure mDNS broadcasts the correct hostname
- Single source of truth for device identity
Implementation Requirements
-
Modify hostname generation flow:
- edgeos-identity service generates UUID first
- Hostname derived from UUID (not serial/MAC)
- Both happen before network services start
-
Update generate-hostname.sh:
# Read UUID from /etc/edgeos/device-uuid
if [ -f /etc/edgeos/device-uuid ]; then
UUID=$(cat /etc/edgeos/device-uuid)
SHORT_ID=${UUID: -8}
HOSTNAME="edgeos-${SHORT_ID}"
fi
-
Service ordering:
- edgeos-identity.service (generates UUID)
- edgeos-hostname.service (sets hostname from UUID)
- avahi-daemon.service (broadcasts hostname)
Benefits
- Single identity source (UUID)
- Consistent device identification across all services
- UUID already used in mDNS TXT records
- Simpler troubleshooting with matching identifiers
Acceptance Criteria
Description
Currently, the hostname is generated using device serial or MAC address. We should use the already-generated device UUID (from edgeos-identity) to create a unique, persistent hostname that's broadcasted via mDNS.
Current Behavior
edgeos-${serial_last_8_chars}/etc/edgeos/device-uuidDesired Behavior
edgeos-${uuid_last_8_chars}or similarImplementation Requirements
Modify hostname generation flow:
Update generate-hostname.sh:
Service ordering:
Benefits
Acceptance Criteria