Thanks to visit codestin.com
Credit goes to github.com

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

Conversation

@blixtra
Copy link
Contributor

@blixtra blixtra commented Oct 21, 2015

Since we are now able to remove an image without removing the pod, use
of the ImageManifest in the rkt list creates a dependency on an image
that may not be around, causing rkt list to fail.

This change removes that dependency and instead relies on the
PodManifest which will be available and should supply the needed
information.

Also found an issue in the PodManifest generation.

Fixes #1628

Since we are now able to remove an image without removing the pod, use
of the ImageManifest in the rkt list creates a dependency on an image
that may not be around, causing rkt list to fail.

This change removes that dependency and instead relies on the
PodManifest which will be available and should supply the needed
information.
Image labels were not being included in the generated PodManifest. Now
they are.
@blixtra blixtra force-pushed the rkt-list-fails-to-list-pods-whose-image-is-removed branch from 55d83b0 to 3b161c1 Compare October 21, 2015 15:53
@blixtra
Copy link
Contributor Author

blixtra commented Oct 21, 2015

The fix for this turned out to be a nice cleanup/code removal and caught the missing labels in the generated PodManifest.

@krnowak
Copy link
Collaborator

krnowak commented Oct 21, 2015

LFAD.

krnowak added a commit that referenced this pull request Oct 21, 2015
…se-image-is-removed

rkt list fails to list pods whose image is removed
@krnowak krnowak merged commit 63e873e into rkt:master Oct 21, 2015
@yifan-gu
Copy link
Contributor

This actually doesn't fix #1628 as if we run with a pod manifest, the image name can be nil:

./build-rkt-0.9.0+git/bin/rkt list
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x443768]

goroutine 1 [running, locked to thread]:
main.func·017(0xc20807fc80)
    /home/yifan/gopher/src/github.com/coreos/rkt/build-rkt-0.9.0+git/gopath/src/github.com/coreos/rkt/rkt/list.go:99 +0x12c8
main.walkPods(0x7f0c2aff781e, 0xc2080ddd08, 0x0, 0x0)
    /home/yifan/gopher/src/github.com/coreos/rkt/build-rkt-0.9.0+git/gopath/src/github.com/coreos/rkt/rkt/pods.go:142 +0x661
main.runList(0x11959a0, 0x11da740, 0x0, 0x0, 0x0)
    /home/yifan/gopher/src/github.com/coreos/rkt/build-rkt-0.9.0+git/gopath/src/github.com/coreos/rkt/rkt/list.go:135 +0x173
main.func·021(0x11959a0, 0x11da740, 0x0, 0x0)
    /home/yifan/gopher/src/github.com/coreos/rkt/build-rkt-0.9.0+git/gopath/src/github.com/coreos/rkt/rkt/rkt.go:110 +0x4d
github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra.(*Command).execute(0x11959a0, 0x11da740, 0x0, 0x0, 0x0, 0x0)
    /home/yifan/gopher/src/github.com/coreos/rkt/build-rkt-0.9.0+git/gopath/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/command.go:496 +0x65c
github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra.(*Command).Execute(0x1195e80, 0x0, 0x0)
    /home/yifan/gopher/src/github.com/coreos/rkt/build-rkt-0.9.0+git/gopath/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/command.go:561 +0x18d
main.main()
    /home/yifan/gopher/src/github.com/coreos/rkt/build-rkt-0.9.0+git/gopath/src/github.com/coreos/rkt/rkt/rkt.go:123 +0x9f

goroutine 5 [syscall]:
os/signal.loop()
    /usr/local/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
    /usr/local/go/src/os/signal/signal_unix.go:27 +0x35

@jonboulle
Copy link
Contributor

Relatedly, even though this might not have caught yifan's case, please
insist on tests before merging changes like this..

On Wed, Oct 21, 2015 at 11:37 AM, Yifan Gu [email protected] wrote:

This actually doesn't fix #1628
#1628 as if we run with a pod
manifest, the image name can be nil:

./build-rkt-0.9.0+git/bin/rkt list
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x443768]

goroutine 1 [running, locked to thread]:
main.func·017(0xc20807fc80)
/home/yifan/gopher/src/github.com/coreos/rkt/build-rkt-0.9.0+git/gopath/src/github.com/coreos/rkt/rkt/list.go:99 +0x12c8
main.walkPods(0x7f0c2aff781e, 0xc2080ddd08, 0x0, 0x0)
/home/yifan/gopher/src/github.com/coreos/rkt/build-rkt-0.9.0+git/gopath/src/github.com/coreos/rkt/rkt/pods.go:142 +0x661
main.runList(0x11959a0, 0x11da740, 0x0, 0x0, 0x0)
/home/yifan/gopher/src/github.com/coreos/rkt/build-rkt-0.9.0+git/gopath/src/github.com/coreos/rkt/rkt/list.go:135 +0x173
main.func·021(0x11959a0, 0x11da740, 0x0, 0x0)
/home/yifan/gopher/src/github.com/coreos/rkt/build-rkt-0.9.0+git/gopath/src/github.com/coreos/rkt/rkt/rkt.go:110 +0x4dgithub.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra.(_Command).execute(0x11959a0, 0x11da740, 0x0, 0x0, 0x0, 0x0)
/home/yifan/gopher/src/github.com/coreos/rkt/build-rkt-0.9.0+git/gopath/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/command.go:496 +0x65cgithub.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra.(_Command).Execute(0x1195e80, 0x0, 0x0)
/home/yifan/gopher/src/github.com/coreos/rkt/build-rkt-0.9.0+git/gopath/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/command.go:561 +0x18d
main.main()
/home/yifan/gopher/src/github.com/coreos/rkt/build-rkt-0.9.0+git/gopath/src/github.com/coreos/rkt/rkt/rkt.go:123 +0x9f

goroutine 5 [syscall]:
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
/usr/local/go/src/os/signal/signal_unix.go:27 +0x35


Reply to this email directly or view it on GitHub
#1655 (comment).

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