Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

stage1: app add, status didn't work with empty vols #3451

Merged
merged 1 commit into from
Dec 7, 2016

Conversation

squeed
Copy link
Contributor

@squeed squeed commented Dec 6, 2016

Fixes #3398

@squeed squeed added this to the v1.21.0 milestone Dec 6, 2016
@lucab
Copy link
Member

lucab commented Dec 6, 2016

@euank do you mind a pass on this PR and a check if there are some leftover issues at runtime?

@squeed
Copy link
Contributor Author

squeed commented Dec 6, 2016

semaphore failure is a flake

Copy link
Member

@euank euank left a comment

Choose a reason for hiding this comment

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

Couple small nits, but this fixes my issue and LGTM.

for _, m := range mounts {
AppAddOneMount(p, ra, m.Volume.Source, m.Mount.Path, m.ReadOnly, enterCmd)
shPath := filepath.Join(common.SharedVolumesPath(p.Root), m.Volume.Name.String())
mntPath, err := EvaluateSymlinksInsideApp(appRootfs, m.Mount.Path)
Copy link
Member

@euank euank Dec 7, 2016

Choose a reason for hiding this comment

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

Add a TODO similar to https://github.com/coreos/rkt/blob/a252c4c3078f746eca2739f3560428aa59b89da2/stage1/init/common/pod.go#L501-L504 if that is relevant here as well.

I'm not sure it is given this isn't so closely related to nspawn, but if not I'd appreciate a comment explaining why this is needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While that comment is technically correct, we still need the real mount path ourselves - so we can't get rid of it.

log.FatalE("could not prepare mountpoint", err)
}
source := m.Volume.Source
if m.Volume.Kind == "empty" {
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed. I don't know why this isn't correctly in GenerateMounts anyways. Bah.

@squeed
Copy link
Contributor Author

squeed commented Dec 7, 2016

corrected, @euank PTAL!

@euank
Copy link
Member

euank commented Dec 7, 2016

LGTM

@jonboulle jonboulle merged commit cdb6a44 into rkt:master Dec 7, 2016
@lucab lucab unassigned euank Apr 5, 2017
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.

4 participants