-
Notifications
You must be signed in to change notification settings - Fork 880
stage0: list|status --format=json panics: RuntimeApp.Mounts.AppVolume is optional #3699
Conversation
Can one of the admins verify this patch? |
ok to test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, bugfix looks fine, just two minor style comments.
lib/app.go
Outdated
var ( | ||
podVols = podManifest.Volumes | ||
podVolsByName = make(map[types.ACName]types.Volume, len(podVols)) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would avoid this inline var( ... )
block and just go for two plain :=
assignments.
lib/app.go
Outdated
for _, mnt := range ra.Mounts { | ||
var ( | ||
hostPath string | ||
readOnly bool // false by default, since it is optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, let's just make it explicit as readOnly := false
.
When it is nil, the Volume info at the Pod level (with the same name) should be used. Without this patch `rkt list --format=json` panics on a nil pointer when Apps reference Volumes from the Pod level. Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
@lucab I made the changes you suggested. PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
A regression test, either here or as a followup, would be nice as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When it is nil, the Volume info at the Pod level (with the same name)
should be used. Without this patch
rkt list --format=json
panics on anil pointer when Apps reference Volumes from the Pod level.
Signed-off-by: Fabio Kung fabio.kung@gmail.com