-
Notifications
You must be signed in to change notification settings - Fork 362
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
network: start dnsconfd in initramfs #6200
base: rhel-10
Are you sure you want to change the base?
network: start dnsconfd in initramfs #6200
Conversation
Resolves: RHEL-80302
0ac32b7
to
e59efe7
Compare
/kickstart-test --testtype smoke |
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. It is just getting more logic to Dracut than I would like. However, I don't know about a better solution.
fi | ||
|
||
if [ "${start}" == "yes" ]; then | ||
echo "Attempting to start dnsconfd. Starting." |
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 think you can just write it starting as this shouldn't be just an attempt.
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 wanted make easier matching the message to the previous related log message Attempting to start dnsconfd. Reason: ${reason}
when looking at the log.
if [ "${start}" == "yes" ]; then | ||
echo "Attempting to start dnsconfd. Starting." | ||
systemctl start --no-block unbound.service | ||
return 0 |
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.
Don't we want to have return $?
instead to catch possible failure?
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 think we'd care more about the information 'should the service be started now?'. The return value is not needed anywhere anyway. I think at this point it is just too early complicate the things by figuring stable expected return values.
Resolves: RHEL-80302
I was trying to add dracut unit test (like here) but the logic is very sparse here and we'd need to figure so much mocking (boot options, existing files) that I gave up. The only option seemed to me to test a function that would take all the possible contitions as parameters (like "can_import_certificates_later", ore "is_required_by_boot_options") and let an (untested) wrapper collect the parameters.