-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hostname handling #167
Hostname handling #167
Conversation
adamkankovsky
commented
Feb 8, 2024
•
edited
edited
c29781c
to
6367aa1
Compare
6367aa1
to
e15f822
Compare
2a900f8
to
7a7e261
Compare
7a7e261
to
35ad740
Compare
f1dabf9
to
10f1b21
Compare
3cb869f
to
ce9961c
Compare
Updated to new design |
ce9961c
to
3b24377
Compare
I'd hate to slow down this PR but I'd consider using "network information" instead of "DHCP" as if I understand it correctly it can be set also just from DNS lookup, independently of DHCP (https://www.freedesktop.org/wiki/Software/systemd/hostnamed/ )? Other than that I am fine with the design for this PR, thank you. |
If I change a value from empty/transient to something, then I am not able to change it back to empty/transient. I think we should allow this (and add to tests if so). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me with minor issues I would not block on, but I think we should allow to reset to transient.
} | ||
|
||
if (!value.match(/^(?!-)[a-z0-9-]{1,63}(?<!-)$/)) { | ||
validationError.push(_("Real hostname can only contain lower-case characters, digits, dashes (not starting or ending a label)")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't understand "not starting or ending a label"
Unfortunately there is a bit of a problem here, because Anaconda doesn't allow you to set an empty hostname, so it won't be possible to fix this without modifying the backend. |
3b24377
to
7afca11
Compare
@garrett what do you think? |
Hm, I've checked with rawhide that it is possible with the Gtk UI: set it in the entry of Network Spoke to a value, empty string, and then a value again - the value will propagate in the backend on leaving the Network spoke. Also setting empty hostname is possible. There will be empty /etc/hostname on target system. |
98850e0
to
120baf1
Compare
@rvykydal So I finally modified the regex to allow empty hostnames and added tests to test it. |
const { buttonLabel, buttonVariant, dialogTitleIconVariant, dialogWarning, dialogWarningTitle } = useScenario(); | ||
|
||
export const ReviewConfigurationConfirmModal = ({ | ||
idPrefix, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes are unrelated and add noise to the commit. Please avoid code-reorganization in feature commits.
baf4085
to
58abdc4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I split out the hostname related code to seperate component and file for readability purposes. Also the groupping of the description elements should be seperate commit for the same purpose.
58abdc4
to
761ef5c
Compare