Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Fix /etc/hostname backward compatibility issue for in-place upgrade.#1085

Merged
Random-Liu merged 1 commit intocontainerd:masterfrom
Random-Liu:hostname-backward-compatibility
Mar 12, 2019
Merged

Fix /etc/hostname backward compatibility issue for in-place upgrade.#1085
Random-Liu merged 1 commit intocontainerd:masterfrom
Random-Liu:hostname-backward-compatibility

Conversation

@Random-Liu
Copy link
Copy Markdown
Member

@Random-Liu Random-Liu commented Mar 12, 2019

Fixes #1082.

If people do in-place upgrade, old sandboxes may not have the hostname file. In that case, we shouldn't try to mount it into containers.

Another option is to create the hostname file for the old sandbox if it doesn't have it. However, that also causes inconsistency, e.g. inside the same pod, old running containers don't have the hostname file, new restarted containers have it.

Neither of them is a perfect solution, skipping mounting is cleaner and keeps consistency inside the same pod, so I implemented that one.

Signed-off-by: Lantao Liu [email protected]

@Random-Liu Random-Liu added this to the v1.0 milestone Mar 12, 2019
@Random-Liu
Copy link
Copy Markdown
Member Author

We should cherry-pick this into supported branches. And let's include the fix in 1.2.5 containerd/containerd#3086.

Copy link
Copy Markdown
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/LGTM

@Random-Liu Random-Liu merged commit f5ff439 into containerd:master Mar 12, 2019
@Random-Liu Random-Liu deleted the hostname-backward-compatibility branch March 12, 2019 20:04
Random-Liu added a commit that referenced this pull request Mar 12, 2019
Random-Liu added a commit that referenced this pull request Mar 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants