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

allow setting hostname for a pod #3732

Closed
chenzhiwei opened this issue Aug 6, 2019 · 3 comments · Fixed by #3818 or #3836
Closed

allow setting hostname for a pod #3732

chenzhiwei opened this issue Aug 6, 2019 · 3 comments · Fixed by #3818 or #3836
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@chenzhiwei
Copy link
Contributor

/kind feature

Description

When I run podman play kube pod.yaml to create a pod, the hostname is the last container's container-id.

My application is highly reply on hostname, is it possible to add a feature to podman pod to allow customizing the hostname? Or set the pod name as hostname?

Kubernetes Pod has a field hostname, it is better to use this as hostname.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

host:
  BuildahVersion: 1.9.0
  Conmon:
    package: podman-1.4.4-2.el7.centos.x86_64
    path: /usr/libexec/podman/conmon
    version: 'conmon version 0.3.0, commit: unknown'
  Distribution:
    distribution: '"centos"'
    version: "7"
  MemFree: 15667200
  MemTotal: 521199616
  OCIRuntime:
    package: runc-1.0.0-64.rc8.el7.centos.x86_64
    path: /usr/bin/runc
    version: 'runc version spec: 1.0.1-dev'
  SwapFree: 138407936
  SwapTotal: 138407936
  arch: amd64
  cpus: 1
  hostname: host.localdomain
  kernel: 4.19.8-1.el7.elrepo.x86_64
  os: linux
  rootless: false
  uptime: 6h 25m 36.48s (Approximately 0.25 days)
registries:
  blocked: null
  insecure: null
  search:
  - registry.access.redhat.com
  - docker.io
  - registry.fedoraproject.org
  - quay.io
  - registry.centos.org
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 3
  GraphDriverName: overlay
  GraphOptions: null
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 4
  RunRoot: /var/run/containers/storage
  VolumePath: /var/lib/containers/storage/volumes

Output of podman info --debug:

(paste your output here)

Additional environment details (AWS, VirtualBox, physical, etc.):

@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 6, 2019
@rhatdan
Copy link
Member

rhatdan commented Aug 6, 2019

@haircommander @QiWang19 Can you guys look into this?

@haircommander
Copy link
Collaborator

Ah I think this revealed a bug too, if a container is in a pod that shares a uts namespace, shouldn't all containers in the pod share the hostname of the infra container? cc @mheon

@rhatdan
Copy link
Member

rhatdan commented Aug 6, 2019

Yes.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants