-
Story
-
Resolution: Won't Do
-
Minor
-
None
-
rhel-9.1.0
-
None
-
rhel-net-mgmt
-
ssg_networking
-
2
-
False
-
False
-
-
No
-
None
-
-
None
-
None
-
If docs needed, set a value
-
-
Unspecified
-
None
-
0
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
Acceptance Criteria:
Given a RHEL user has executed the nmcli general hostname command
When the hostname contains characters other than lowercase letters, numbers, or hyphens
Then NetworkManager should check the hostname for invalid characters before sending it via dbus and it should return an error message to the user explaining which characters are invalid and that the hostname was not set and the previous hostname should remain unchanged.
Definition of done
- The implementation meets the acceptance criteria
- The code is part of a downstream build attached to an errata
- external trackers