-
Notifications
You must be signed in to change notification settings - Fork 28
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
quattor/server/config: enable tftpd service on EL9 #239
base: main
Are you sure you want to change the base?
Conversation
# Enable tftpd (on EL9 only for backward compatibility) | ||
include 'components/systemd/config'; | ||
'/software/components/systemd/unit/tftp' = { | ||
if ( OS_VERSION_PARAMS['majorversion'] >= '9' ) { |
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.
'9' should be 9 instead? I suspect string comparison doesn't work with '10' and higher?
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.
You are right but for discussable reasons this parameter has been defined as a string (to allow number that may have included a letter or dot, e.g. 9.1
) and the end result is what you are saying. I'm afraid there are several places to fix in the template library and probably a way of doing it would be to implement a function to compare OS versions that would do the proper massaging... I am not clear whether we should already avoid to propagate the problem here or if we should have an issue to fix it properly (and if possible using the same approach) everywhere this test is present in the template library... I'm open!
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.
Would pkg_compare_version
not do the job?
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'm not familiar with OS_VERSION_PARAMS and complete agree that overall versioning needs to take things like 8.8 into account. However I would assume that "major version" would only be the first part as an int? i.e. in MS we have similar fields and they are constructed by selecting out the first int before a dot or other character from the overall version.
Assuming this isn't trivially fixable in the templates then maybe a quick hack here would be (untested):
if( to_long(OS_VERSION_PARAMS['majorversion']) >= 9 ) {
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.
@ned21 I agree with you. The proposed hack would work as major version is currently only something that can be converted to a number. It may not work if at some point we decide to put something that cannot be converted. Thus my proposal to implement a function like get_os_major_version()
that would return a number after doing whatever is necessary with OS_VERSION_PARAMS['majorversion']
...
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.
Proposal open as an issue: #242. I suggest to merge this PR as it is and to update the template (and others affected) once the function is available (and before RHEL 10!).
|
#238 is merged now |
a37b865
to
e3e59e9
Compare
e3e59e9
to
0841f16
Compare
This change should have been upstreamed before 24.10 release. Required for a working AII server on EL9.