Bug 2136169

Summary: better error should be thrown when invalid character is in hostname
Product: Red Hat Enterprise Linux 9 Reporter: Vladimir Benes <vbenes>
Component: NetworkManagerAssignee: NetworkManager Development Team <nm-team>
Status: CLOSED MIGRATED QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: bgalvani, lrintel, rkhan, sfaye, sukulkar, till
Target Milestone: rcKeywords: FutureFeature, MigratedToJIRA, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-17 09:21:51 UTC Type: Story
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vladimir Benes 2022-10-19 13:55:23 UTC
Description of problem:
$ sudo nmcli general hostname ng_benjoband
(15:41:10) vbenes: Error: failed to set hostname: Saving the hostname failed: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Invalid static hostname 'ng_benjoband'

While we have just [a-z] [0-9] and - allowed, NM should check first before sending via dbus and tell the user what's wrong. 

Version-Release number of selected component (if applicable):
NetworkManager-1.40.0-1.el9.x86_64

Comment 2 RHEL Program Management 2023-08-17 09:21:19 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.