-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
etcdmain: correctly check return values from SdNotify() #6006
etcdmain: correctly check return values from SdNotify() #6006
Conversation
@dongsupark vendor updates need to be done through godep so the vendored packages match an upstream revision. Try running |
5316a45
to
5b203e7
Compare
@heyitsanthony Thanks. I tried to update both Godeps.json and vendor tree together, but several tests started to fail. I'm not sure why. I'll look into that tomorrow. |
@dongsupark it looks like this is upgrading some extra deps which may be causing the failures. I think it'll be OK to keep the go-systemd updates to Godeps.json and vendor/ but keep the rest the same. |
5b203e7
to
8607ac3
Compare
@heyitsanthony Thanks. That did the trick! :-) |
@dongsupark please squash the commits |
Godeps.json and vendor need to be updated according to the newest go-systemd, as SdNotify() in go-systemd has changed its API.
8607ac3
to
b438f0a
Compare
@heyitsanthony Done. Thanks! |
b438f0a
to
624187d
Compare
SdNotify() now returns 2 values, sent and err. So startEtcdOrProxyV2() needs to check the 2 return values correctly. As the 2 values are independent of each other, error checking needs to be slightly updated too. SdNotifyNoSocket, which was previously provided by go-systemd, does not exist any more. In that case (false, nil) will be returned instead.
lgtm |
Thanks. Now travis error from fleet is gone. :-) |
Since coreos/go-systemd@0d7fccc,
SdNotify()
ingo-systemd
started to return 2 values, sent and err. SostartEtcdOrProxyV2()
in etcd needs to check the 2 return values correctly. As the 2 values are independent of each other, error checking logic needs to be slightly updated too.SdNotifyNoSocket
, which was previously provided bygo-systemd
, does not exist any more. In that case(false, nil)
will be returned instead.This was a direct reason of a travis-ci failure in fleet like this: https://travis-ci.org/coreos/fleet/builds/146093283. Although fleet has nothing to do with this API change, travis always fetches the most recent master branch for each git repo.