-
Notifications
You must be signed in to change notification settings - Fork 296
CP-311169: samba: include /etc/samba/smb.extra.conf #6871
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
Conversation
|
XenRT regression test looks good: |
|
|
||
| let config_winbind_daemon ~workgroup ~netbios_name ~domain = | ||
| let smb_config = "/etc/samba/smb.conf" in | ||
| let cust_config = "/etc/samba/cust.conf" in |
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.
- What happens if this file does not exist?
- Are we shipping an empty file and how?
- I am not sure cust is the best name; was thinking of
local.conforextra.conf. It sounds like this file would not be affected by updates. However, this may create problems if the content becomes incompatible. There is no easy solution here.
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.
According to Copilot, a missing include file is logged but it does not lead to failure. But it would be good to verify this.
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.
For multipath configuration there's a /etc/multipath/conf.d/custom.conf. Naming it the same would be consistent (better than cust.conf). However I agree that this name I initially proposed and that was adopted for multipath config is not necessarily the best we could have chosen, so I'm also open to other options, if we can find name that is without ambiguity.
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 also advise to create the file in advance, and pre-fill it with comments explaining to users how to use the file, whether changes will be retained upon maintenance update, upon product version upgrades, and what the risks are with modifying it (introducing incompatible changes, or changes that are good now but may bitrot).
Here's how it looks currently on the multipath side:
[17:02 xcpng-ci-83-b1 ~]# head /etc/multipath.conf
# --- WARNING: DO NOT EDIT THIS FILE ---
# The contents of this file may be overwritten at any future time through a
# system update, causing any custom configuration to be lost.
#
# For custom multipath configuration, create a separate .conf file in the
# /etc/multipath/conf.d/ directory.
# --- END OF WARNING ---
# This configuration file is used to overwrite the built-in configuration of
# multipathd.
and
[17:03 xcpng-ci-83-b1 ~]# head /etc/multipath/conf.d/custom.conf
# Custom configuration for multipathd
# Changes made to this file will not be overwritten by future system updates.
# They will also be retained through system upgrades to newer releases.
# Refer to "man multipath.conf"
Notice also how visible the warning is. This matters, in my opinion.
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.
- If the file does not exist, there is a warning in winbind/samba log and ignored
- I am going to ship an empty file(With proper desc as comments) by samba build, together with smb.conf
- It is a good question, I am also considering some other names. rpm update will not override this file and I am not going to preserve this file through RPU. This file is appended at the end to override xapi auto-generated values by intention. This should be only used carefully with TS guide and I am going to comment this in the file header.
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 also advise to create the file in advance, and pre-fill it with comments explaining to users how to use the file, whether changes will be retained upon maintenance update, upon product version upgrades, and what the risks are with modifying it (introducing incompatible changes, or changes that are good now but may bitrot).
Here's how it looks currently on the multipath side:
[17:02 xcpng-ci-83-b1 ~]# head /etc/multipath.conf # --- WARNING: DO NOT EDIT THIS FILE --- # The contents of this file may be overwritten at any future time through a # system update, causing any custom configuration to be lost. # # For custom multipath configuration, create a separate .conf file in the # /etc/multipath/conf.d/ directory. # --- END OF WARNING --- # This configuration file is used to overwrite the built-in configuration of # multipathd.and
[17:03 xcpng-ci-83-b1 ~]# head /etc/multipath/conf.d/custom.conf # Custom configuration for multipathd # Changes made to this file will not be overwritten by future system updates. # They will also be retained through system upgrades to newer releases. # Refer to "man multipath.conf"Notice also how visible the warning is. This matters, in my opinion.
Thanks, I am going to add a kind of notes as well. This file will goes to samba package, as smb.conf
psafont
left a comment
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.
Had a chat with the OS team at vates, there's no obvious support for loading conf files in a directory (/etc/smb.conf.d/), so this is the only approach that works.
Thanks for following through with this :)
f8d77e1 to
d492401
Compare
Samba has lots of feature and configurations, https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html Some of them are passthrough from xapi configuration to samba However, this requires xapi rebuild and make xapi uncessary complicated. On the other side, sometimes we do need customer to tune some args, especially for debug purpose, and we do want such configuration can persist cross xapi restart. A new configuration /etc/samba/smb.extra.conf is introduced. The xapi generated/overrided /etc/samba/smb.conf include it. Customer can update this file with guide of support team for debug purpose Signed-off-by: Lin Liu <[email protected]>
d492401 to
1bc5bd7
Compare
|
Oh, sorry for the misunderstanding. Github was showing me the merged status, the new push, but not the new comments. |
Do not worry. |
Samba has lots of feature and configurations,
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html
Some of them are passthrough from xapi configuration to samba However, this requires xapi rebuild and make xapi uncessary complicated.
On the other side, sometimes we do need customer to tune some args, especially for debug purpose, and we do want such configuration can persist cross xapi restart.
A new configuration /etc/samba/cust.conf is introduced. The xapi generated/overrided /etc/samba/smb.conf include it. Customer can update this file with guide of support team for debug purpose