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

fleet panics when scheduling unit with % in X-ConditionMachineOf #438

Closed
bcwaldon opened this issue May 12, 2014 · 1 comment · Fixed by #439
Closed

fleet panics when scheduling unit with % in X-ConditionMachineOf #438

bcwaldon opened this issue May 12, 2014 · 1 comment · Fixed by #439
Assignees
Milestone

Comments

@bcwaldon
Copy link
Contributor

I attempted to schedule this unit named zookeeper-discovery.service:

[Service]
ExecStart=/usr/bin/sleep 1d

[X-Fleet]
X-ConditionMachineOf=zookeeper@%i.service

And fleet crashed with this panic:

I0510 05:34:04.961995 14592 agent.go:464] Asserting required Peers [zookeeper@%i.service] of Job(zo
okeeper-discovery.service) are scheduled locally
I0510 05:34:04.961998 14592 agent.go:485] Looking for target of Peer(zookeeper@%i.service)
I0510 05:34:04.962029 14592 state.go:52] Attempting to unlock AgentState
I0510 05:34:04.962032 14592 state.go:54] AgentState unlocked
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x5716f0]
goroutine 40 [running]:
runtime.panic(0x6fbf00, 0xb2b228)
/usr/local/go/src/pkg/runtime/panic.c:266 +0xb6
net/http.(*Client).Do(0xc21000b660, 0x0, 0xc210344700, 0x0, 0x0)
/usr/local/go/src/pkg/net/http/client.go:128 +0x30
fleet.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Unit fleet.service entered failed state.
github.com/coreos/fleet/third_party/github.com/coreos/go-etcd/etcd.(*Client).SendRequest(0xc210052e00, 0xc210343b70, 0x0, 0x0, 0x0)
/home/core/fleet/gopath/src/github.com/coreos/fleet/third_party/github.com/coreos/go-etcd/etcd/requests.go:221 +0xb72
github.com/coreos/fleet/third_party/github.com/coreos/go-etcd/etcd.(*Client).getCancelable(0xc210052e00, 0xc210621600, 0x32, 0xc210343a80, 0x0, ...)
/home/core/fleet/gopath/src/github.com/coreos/fleet/third_party/github.com/coreos/go-etcd/etcd/requests.go:57 +0x336
github.com/coreos/fleet/third_party/github.com/coreos/go-etcd/etcd.(*Client).get(0xc210052e00, 0xc210621600, 0x32, 0xc210343a80, 0x676220, ...)
/home/core/fleet/gopath/src/github.com/coreos/fleet/third_party/github.com/coreos/go-etcd/etcd/requests.go:68 +0x53
github.com/coreos/fleet/third_party/github.com/coreos/go-etcd/etcd.(*Client).RawGet(0xc210052e00, 0xc210621600, 0x32, 0xc210340100, 0x14, ...)
/home/core/fleet/gopath/src/github.com/coreos/fleet/third_party/github.com/coreos/go-etcd/etcd/get.go:26 +0x116
github.com/coreos/fleet/third_party/github.com/coreos/go-etcd/etcd.(*Client).Get(0xc210052e00, 0xc210621600, 0x32, 0xc210620100, 0x32, ...)
/home/core/fleet/gopath/src/github.com/coreos/fleet/third_party/github.com/coreos/go-etcd/etcd/get.go:11 +0x54
github.com/coreos/fleet/registry.(*EtcdRegistry).GetJobTarget(0xc21008e5e0, 0xc210346540, 0x14, 0x7f769056c800, 0x1)
/home/core/fleet/gopath/src/github.com/coreos/fleet/registry/job.go:56 +0x6a
github.com/coreos/fleet/agent.(*Agent).peerScheduledHere(0xc2100a2550, 0xc210631f60, 0x1b, 0xc210346540, 0x14, ...)
/home/core/fleet/gopath/src/github.com/coreos/fleet/agent/agent.go:488 +0x135
github.com/coreos/fleet/agent.(*Agent).AbleToRun(0xc2100a2550, 0xc210624770, 0xc210631f60)
/home/core/fleet/gopath/src/github.com/coreos/fleet/agent/agent.go:466 +0x990
github.com/coreos/fleet/agent.(*EventHandler).HandleEventJobOffered(0xc2100b61f8, 0x769750, 0xf, 0x701b40, 0xc210624380, ...)
/home/core/fleet/gopath/src/github.com/coreos/fleet/agent/event.go:36 +0x38b
reflect.Value.call(0x72ece0, 0xc2100b61f8, 0x738, 0x756a80, 0x4, ...)
/usr/local/go/src/pkg/reflect/value.go:474 +0xe0b
reflect.Value.Call(0x72ece0, 0xc2100b61f8, 0x738, 0xc2105e94c0, 0x1, ...)
/usr/local/go/src/pkg/reflect/value.go:345 +0x9d
created by github.com/coreos/fleet/event.(*EventBus).dispatch
/home/core/fleet/gopath/src/github.com/coreos/fleet/event/bus.go:50 +0x697

This issue was originally reported in #437

@bcwaldon
Copy link
Contributor Author

Root of the problem: https://github.com/coreos/go-etcd/pull/125

bcwaldon added a commit to bcwaldon/fleet that referenced this issue May 12, 2014
bcwaldon added a commit that referenced this issue May 12, 2014
edpaget pushed a commit to edpaget/fleet that referenced this issue May 12, 2014
Systemd specifiers aren't yet supported in [X-Fleet] sections
until coreos#303 is resolved. This notes the issues encountered in coreos#437 and coreos#438.
edpaget pushed a commit to edpaget/fleet that referenced this issue May 12, 2014
Systemd specifiers aren't yet supported in [X-Fleet] sections
until coreos#303 is resolved. This notes the issues encountered in coreos#437 and coreos#438.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant