containous / traefik-extra-service-fabric

Traefik extra: Service Fabric Provider
Apache License 2.0
12 stars 14 forks source link

Incorrect logic when checking replica health #18

Closed lawrencegripper closed 6 years ago

lawrencegripper commented 6 years ago

I picked this up while updating the tests. Don't this it is a serious issue as it could be impossible to achieve.

The following line, I believe has the wrong logic.

(instanceData.ReplicaStatus == "Ready" || instanceData.HealthState != "Error")

I think this should be:

(instanceData.ReplicaStatus == "Ready" && instanceData.HealthState != "Error")

To handle a scenario where ReplicaStatus: Down and HealthState: Warning. As I say I'm unsure if this is possible in the cluster but happy to put in a PR to fix just in case.

What do you think?

ldez commented 6 years ago

Yes open a PR on the branch v1.0 👍