Skip to content
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

Possibility to set domainname via REST Endpoint #15102

Open
msisj opened this issue Jul 28, 2022 · 13 comments
Open

Possibility to set domainname via REST Endpoint #15102

msisj opened this issue Jul 28, 2022 · 13 comments
Assignees
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@msisj
Copy link

msisj commented Jul 28, 2022

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind feature

Description

I'd like to implement possibility to set domainname in podman-py project but according to the podman REST API there is no such option.
Interestingly enough under compact (aka docker compatibility) endpoint there is such parameter, but podman-py (rightfully) does not use this endpoint to create container.

I'm also not seeing this option in cli (to be fair docker up until 1.40~ did not have this option either, but the call on the docker-py worked properly).

The inspect in podman shows the empty value, which makes me wonder whether this was forgotten or is there other option to fill the domainname?

[root ~]# podman inspect test --format '{{json .Config}}' | jq | head -n 3
{
  "Hostname": "test",
  "Domainname": "",

Is there possibility to add possibility to add domainname, to at least REST endpoint ?

@openshift-ci openshift-ci bot added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 28, 2022
@rhatdan
Copy link
Member

rhatdan commented Jul 28, 2022

@mheon @jwhonce @cdoern PTAL

@mheon
Copy link
Member

mheon commented Jul 28, 2022

Does anyone know what this does in Docker? We can easily add this to the DB, but I don't really know what it would actually do once set?

@rhatdan
Copy link
Member

rhatdan commented Jul 28, 2022

domainname is used by NIS and NFS (Perhaps).

https://www.geeksforgeeks.org/domainname-command-in-linux-with-examples/

@cdoern
Copy link
Contributor

cdoern commented Jul 28, 2022

I feel like if we support this natively, and both docker-py and docker have it everywhere, we should to. Looking at alot of those unsupported options in podman-py makes me think, with recent changes in podman a lot of those can be supported.

I'll put this on my list of api/podman-py related things to do

@cdoern cdoern self-assigned this Jul 28, 2022
@Luap99
Copy link
Member

Luap99 commented Jul 28, 2022

I think we need a podman run/create flag as well:

'docker create --help' lists '--domainname', which is not in docs/source/markdown/podman-create.1.md

From the cli differences issue #14917

@cdoern cdoern added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Aug 4, 2022
@cdoern
Copy link
Contributor

cdoern commented Aug 4, 2022

@Luap99 sorry for my unfamiliarity here, but this just sets another entry in /etc/hosts right?

@Luap99
Copy link
Member

Luap99 commented Aug 4, 2022

I have no idea, we have to do whatever docker does. I assume it appends the domain to the hostname as well?

@cdoern
Copy link
Contributor

cdoern commented Aug 4, 2022

I have no idea, we have to do whatever docker does. I assume it appends the domain to the hostname as well?

thats what I've found everywhere. Docker has a link to https://man7.org/linux/man-pages/man2/getdomainname.2.html which makes me think that's all it is. So domainnmae has to be specified with hostname... i guess?

@github-actions
Copy link

github-actions bot commented Sep 4, 2022

A friendly reminder that this issue had no activity for 30 days.

@cdoern
Copy link
Contributor

cdoern commented Sep 5, 2022

in progress

@cdoern cdoern removed the stale-issue label Sep 5, 2022
@github-actions
Copy link

github-actions bot commented Oct 6, 2022

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Oct 6, 2022

@cdoern how is this coming?

@cdoern
Copy link
Contributor

cdoern commented Oct 11, 2022

@rhatdan working on it this week over fall break

cdoern added a commit to cdoern/podman that referenced this issue Dec 22, 2022
domainname functions similarly to --hostname, it sets the value in /etc/hosts
to whatever you speficy in conjunction with --hostname. so if you pass
--hostname=foo --domainmame=baz.net, /etc/hosts will get the combined entry and /proc/sys/kernel/domainname will get
baz.net
resolves containers#15102

Signed-off-by: Charlie Doern <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants