-
Notifications
You must be signed in to change notification settings - Fork 561
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
missing NIS domainname #592
Comments
Heh, you beat me to this. 😉 I reckon the config should look like:
Where you can replace "nis" with "uname" (or "uts") if more appropriate. |
Actually I think this may be Linux specific, looking at FreeBSD https://www.freebsd.org/cgi/man.cgi?query=domainname&sektion=1&apropos=0&manpath=FreeBSD+10.3-RELEASE+and+Ports it is set in |
We could shove it in config-linux then under |
yes I think that may be the best option. |
It looks to me like Solaris is like FreeBSD, although I could not find a definitive answer. BSD says their version came from SunOS. It is not in Posix as part of |
Thinking about this more I think it's possible to just use |
I've figured out this can be entirely done with opencontainers/runc#1827 and moby/moby#37302. |
The OCI doesn't have a specific field for an NIS domainname[1] (mainly because FreeBSD and Solaris appear to have a similar concept but it is configured entirely differently). However, on Linux, the NIS domainname can be configured through both the setdomainname(2) syscall but also through the "kernel.domainname" sysctl. Since the OCI has a way of injecting sysctls this means we don't need to have any OCI changes to support NIS domainnames (and we can always switch if the OCI picks up such support in the future). It should be noted that because we have to generate this each spec creation we also have to make sure that it's not clobbered by the HostConfig. I'm pretty sure making this change generic (so that HostConfig will not clobber any pre-set sysctls) will not cause other issues to crop up. [1]: opencontainers/runtime-spec#592 Signed-off-by: Aleksa Sarai <[email protected]>
The OCI doesn't have a specific field for an NIS domainname[1] (mainly because FreeBSD and Solaris appear to have a similar concept but it is configured entirely differently). However, on Linux, the NIS domainname can be configured through both the setdomainname(2) syscall but also through the "kernel.domainname" sysctl. Since the OCI has a way of injecting sysctls this means we don't need to have any OCI changes to support NIS domainnames (and we can always switch if the OCI picks up such support in the future). It should be noted that because we have to generate this each spec creation we also have to make sure that it's not clobbered by the HostConfig. I'm pretty sure making this change generic (so that HostConfig will not clobber any pre-set sysctls) will not cause other issues to crop up. [1]: opencontainers/runtime-spec#592 Signed-off-by: Aleksa Sarai <[email protected]> Upstream-commit: 7417f5057568eacf835e9f8ffdf7263e75908f0a Component: engine
The OCI doesn't have a specific field for an NIS domainname[1] (mainly because FreeBSD and Solaris appear to have a similar concept but it is configured entirely differently). However, on Linux, the NIS domainname can be configured through both the setdomainname(2) syscall but also through the "kernel.domainname" sysctl. Since the OCI has a way of injecting sysctls this means we don't need to have any OCI changes to support NIS domainnames (and we can always switch if the OCI picks up such support in the future). It should be noted that because we have to generate this each spec creation we also have to make sure that it's not clobbered by the HostConfig. I'm pretty sure making this change generic (so that HostConfig will not clobber any pre-set sysctls) will not cause other issues to crop up. [1]: opencontainers/runtime-spec#592 SUSE-Bugs: bsc#1001161 Signed-off-by: Aleksa Sarai <[email protected]>
The OCI doesn't have a specific field for an NIS domainname[1] (mainly because FreeBSD and Solaris appear to have a similar concept but it is configured entirely differently). However, on Linux, the NIS domainname can be configured through both the setdomainname(2) syscall but also through the "kernel.domainname" sysctl. Since the OCI has a way of injecting sysctls this means we don't need to have any OCI changes to support NIS domainnames (and we can always switch if the OCI picks up such support in the future). It should be noted that because we have to generate this each spec creation we also have to make sure that it's not clobbered by the HostConfig. I'm pretty sure making this change generic (so that HostConfig will not clobber any pre-set sysctls) will not cause other issues to crop up. [1]: opencontainers/runtime-spec#592 Signed-off-by: Aleksa Sarai <[email protected]>
The OCI doesn't have a specific field for an NIS domainname[1] (mainly because FreeBSD and Solaris appear to have a similar concept but it is configured entirely differently). However, on Linux, the NIS domainname can be configured through both the setdomainname(2) syscall but also through the "kernel.domainname" sysctl. Since the OCI has a way of injecting sysctls this means we don't need to have any OCI changes to support NIS domainnames (and we can always switch if the OCI picks up such support in the future). It should be noted that because we have to generate this each spec creation we also have to make sure that it's not clobbered by the HostConfig. I'm pretty sure making this change generic (so that HostConfig will not clobber any pre-set sysctls) will not cause other issues to crop up. [1]: opencontainers/runtime-spec#592 SUSE-Bugs: bsc#1001161 Signed-off-by: Aleksa Sarai <[email protected]>
Completed in: |
We have had various complaints in Docker eg see moby/moby#27067 that you cannot set the
domainname
, just thehostname
. Asrunc
has no way to set the domain name, we cannot easily implement this. Can we add a new optional field for domain name? It would exactly match hostname, except on Linux it would use thesetdomainname(2)
syscall notsethostname(2)
.This is used by some applications eg NIS (where it originated as a field I believe).
Have not yet determined if Windows has a comparable field, it seems likely. Other Unixes certainly do.
Happy to add a patch (and in
runc
) if this is acceptable.The text was updated successfully, but these errors were encountered: