mirror of
https://github.com/ceph/ceph
synced 2025-01-29 14:34:40 +00:00
Merge PR #40223 into master
* refs/pull/40223/head: cephadm: prevent podman from breaking socket.getfqdn() Reviewed-by: Daniel Pivonka <dpivonka@redhat.com>
This commit is contained in:
commit
6b43b2bfe6
@ -135,3 +135,4 @@ sunnyku Sunny Kumar <sunkumar@redhat.com>
|
||||
adk3798 Adam King <adking@redhat.com>
|
||||
runsisi luo runbing <luo.runbing@zte.com.cn>
|
||||
xxhdx1985126 Xuehan Xu <xuxuehan@360.cn>
|
||||
Daniel-Pivonka Daniel Pivonka <dpivonka@redhat.com>
|
||||
|
@ -3036,9 +3036,13 @@ class CephContainer:
|
||||
'--ipc=host',
|
||||
]
|
||||
|
||||
if 'podman' in self.ctx.container_path and \
|
||||
os.path.exists('/etc/ceph/podman-auth.json'):
|
||||
cmd_args.append('--authfile=/etc/ceph/podman-auth.json')
|
||||
if 'podman' in self.ctx.container_path:
|
||||
# podman adds the container *name* to /etc/hosts (for 127.0.1.1)
|
||||
# by default, which makes python's socket.getfqdn() return that
|
||||
# instead of a valid hostname.
|
||||
cmd_args.append('--no-hosts')
|
||||
if os.path.exists('/etc/ceph/podman-auth.json'):
|
||||
cmd_args.append('--authfile=/etc/ceph/podman-auth.json')
|
||||
|
||||
envs: List[str] = [
|
||||
'-e', 'CONTAINER_IMAGE=%s' % self.image,
|
||||
|
Loading…
Reference in New Issue
Block a user