stackanetes / kubernetes-entrypoint

Used as a container entrypoint, it will wait for specified k8s dependencies, create files based on ConfigMaps, and much more - before running a given command.
Apache License 2.0
51 stars 18 forks source link

dependency is not honored #19

Closed sbezverk closed 7 years ago

sbezverk commented 7 years ago

Hello,

I have a dependency for stateful cinder-scheduler set on a service cinder-api. I see that cinder-api container is in init sate, but cinder scheduler is already in running which should not happened. cinder scheduler dependency container tells that the dependency has already been resolved.

Here is the link with all logs we capture for this run.

http://logs.openstack.org/97/424697/2/check/gate-kolla-kubernetes-deploy-centos-binary-2-helm-entrypoint-nv/54871ee/

Appreciate if somebody could take a look at them. If you have questions, please let me know. Thank you Serguei

sbezverk commented 7 years ago

Better yet, this logs. http://logs.openstack.org/97/424697/3/check/gate-kolla-kubernetes-deploy-centos-binary-2-helm-entrypoint-nv/f687966/ This line shows that cinder scheduler has a dependency: http://logs.openstack.org/97/424697/3/check/gate-kolla-kubernetes-deploy-centos-binary-2-helm-entrypoint-nv/f687966/console.html#_2017-01-24_17_37_02_030588

This line show that cinder dependency is running when cinder-api pod is still in INit state:

http://logs.openstack.org/97/424697/3/check/gate-kolla-kubernetes-deploy-centos-binary-2-helm-entrypoint-nv/f687966/console.html#_2017-01-24_17_40_40_619265

PiotrProkop commented 7 years ago

Thanks, for reporting I'll look into it.

PiotrProkop commented 7 years ago

Hi @sbezverk you are right , there is a bug in this line https://github.com/stackanetes/kubernetes-entrypoint/blob/master/dependencies/service/service.go#L32 . I should have a fix today and prepare new release on Monday. Thanks for reporting this issue.

sbezverk commented 7 years ago

Thank you very much for finding it!, Looking forward to the new version.

PiotrProkop commented 7 years ago

@sbezverk https://github.com/stackanetes/kubernetes-entrypoint/pull/21 this is a PR which should fix this bug. The fix was pretty trivial https://github.com/stackanetes/kubernetes-entrypoint/pull/21/files#diff-96a47b800d818cc653a127693efd308b but i also changed go-client version to v.1.5.1.

sbezverk commented 7 years ago

Great, please let me know when you post the image, we will need to update our container with it.

PiotrProkop commented 7 years ago

HI @sbezverk I just released new version of entrypoint with a bugfix.

sbezverk commented 7 years ago

Perfect, thanks a lot! could you please point me to the location of new release?

PiotrProkop commented 7 years ago

Sure, https://github.com/stackanetes/kubernetes-entrypoint/releases/download/v0.1.1/kubernetes-entrypoint