bowei

bowei

☁🌤🌦

Member Since 10 years ago

Google, Mountain View

Experience Points
140
follower
Lessons Completed
2
follow
Lessons Completed
32
stars
Best Reply Awards
146
repos

100 contributions in the last year

Pinned
⚡ Production-Grade Container Scheduling and Management
⚡ DNS server and related things
⚡ Ingress controller for Google Cloud
⚡ Repository for the next iteration of composite service (e.g. Ingress) and load balancing APIs.
Activity
May
18
5 days ago
Activity icon
issue

bowei issue comment kubernetes/ingress-gce

bowei
bowei

Do not include User Errors in L4NetLBInError metric

There are errors related to Network Tier that are caused by User misconfigurations and they should be filtered out from ServicesInError metrics. This errors are:

  1. Ip address and forwarding rule Network Tier mismatch
  2. User created service in Standard Tier and deleted the annotation, this action will changed desired service Network Tier to PREMIUM but IP address and forwarding rule should be tear down first because we cannot update Network Tier in this resources. We can tear down resources only when Network Tier from annotation mismatch with network tier in IP address or forwarding rule.
pull request

bowei merge to kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

open pull request

bowei wants to merge kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

bowei
bowei

Don't we need to take the lock here to avoid something creating in parallel to the deletion? This has a lock read unlock; A ; lock write unlock issue -- there might be some operation occurring at A that is a race.

open pull request

bowei wants to merge kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

bowei
bowei

can we use this comment?

pull request

bowei merge to kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

open pull request

bowei wants to merge kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

bowei
bowei

you don't need this if any more

pull request

bowei merge to kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

open pull request

bowei wants to merge kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

bowei
bowei

You need to put this first, no? the instance != nil needs to be guarded.

pull request

bowei merge to kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

open pull request

bowei wants to merge kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

bowei
bowei

We should be more explicit:

// sharedResourceLock serializes operations on the healthcheck and firewall // resources shared across multiple Services.

pull request

bowei merge to kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

open pull request

bowei wants to merge kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

bowei
bowei

go style puts the mutex in the same block as the protected var:

struct {
  lock
  var
  var

  nonProtectedVar
  ...
}
pull request

bowei merge to kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

open pull request

bowei wants to merge kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

bowei
bowei

it's easier to maintain if we make this straight line code:

if ! utils.EqualStringSets() { return false }
if ! utils.EqualStringSets() { return false }
if ! skipDescription && a.Description != b.Description {
  return false
}
return true
pull request

bowei merge to kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

open pull request

bowei wants to merge kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

bowei
bowei

can we add a comment describing why

pull request

bowei merge to kubernetes/ingress-gce

bowei
bowei

Rewrite L4 healthchecks creation and deletion

  • create a common singleton like struct fot l4 health checks
  • new struct holds mutex for common resources
  • delete shared healtcheck firewall rules safely

without proper guarding of shared healtcheck firewall rules, the NetLB controller may delete the ILB healthcheck firewall or vice versa

May
17
6 days ago
Activity icon
issue

bowei issue comment kubernetes/ingress-gce

bowei
bowei

Truncate nodes list to maximum instance group size (1000) before adding to instance group

This fixes a bug for clusters bigger than instance group max size, cause we were trying to add more than allowed number of nodes to instance group and gcp api returned an error

bowei
bowei

/approve

Ping back when you add the comment.

open pull request

bowei wants to merge kubernetes/ingress-gce

bowei
bowei

Truncate nodes list to maximum instance group size (1000) before adding to instance group

This fixes a bug for clusters bigger than instance group max size, cause we were trying to add more than allowed number of nodes to instance group and gcp api returned an error

bowei
bowei

Let's add a comment here so future reviewers don't have the same question

// List() will return a sorted list so the kubeNodesList truncation will have a stable set of nodes.

pull request

bowei merge to kubernetes/ingress-gce

bowei
bowei

Truncate nodes list to maximum instance group size (1000) before adding to instance group

This fixes a bug for clusters bigger than instance group max size, cause we were trying to add more than allowed number of nodes to instance group and gcp api returned an error

Activity icon
issue

bowei issue comment kubernetes/ingress-gce

bowei
bowei

Truncate nodes list to maximum instance group size (1000) before adding to instance group

This fixes a bug for clusters bigger than instance group max size, cause we were trying to add more than allowed number of nodes to instance group and gcp api returned an error

Activity icon
issue

bowei issue comment kubernetes/ingress-gce

bowei
bowei

Fix for backend service update

We should update backend service with ig llinks only when ig links changed.

open pull request

bowei wants to merge kubernetes/ingress-gce

bowei
bowei

Fix for backend service update

We should update backend service with ig llinks only when ig links changed.

bowei
bowei

We can do this as a follow up

pull request

bowei merge to kubernetes/ingress-gce

bowei
bowei

Fix for backend service update

We should update backend service with ig llinks only when ig links changed.

open pull request

bowei wants to merge kubernetes/ingress-gce

bowei
bowei

Fix for backend service update

We should update backend service with ig llinks only when ig links changed.

bowei
bowei

Can we have this at V(2) so it appears in the normal log? Is it too noisy?

pull request

bowei merge to kubernetes/ingress-gce

bowei
bowei

Fix for backend service update

We should update backend service with ig llinks only when ig links changed.

open pull request

bowei wants to merge kubernetes/ingress-gce

bowei
bowei

Fix for backend service update

We should update backend service with ig llinks only when ig links changed.

bowei
bowei

Same comment here V(2)

pull request

bowei merge to kubernetes/ingress-gce

bowei
bowei

Do not include User Errors in L4NetLBInError metric

There are errors related to Network Tier that are caused by User misconfigurations and they should be filtered out from ServicesInError metrics. This errors are:

  1. Ip address and forwarding rule Network Tier mismatch
  2. User created service in Standard Tier and deleted the annotation, this action will changed desired service Network Tier to PREMIUM but IP address and forwarding rule should be tear down first because we cannot update Network Tier in this resources. We can tear down resources only when Network Tier from annotation mismatch with network tier in IP address or forwarding rule.
bowei
bowei
open pull request

bowei wants to merge kubernetes/ingress-gce

bowei
bowei

Do not include User Errors in L4NetLBInError metric

There are errors related to Network Tier that are caused by User misconfigurations and they should be filtered out from ServicesInError metrics. This errors are:

  1. Ip address and forwarding rule Network Tier mismatch
  2. User created service in Standard Tier and deleted the annotation, this action will changed desired service Network Tier to PREMIUM but IP address and forwarding rule should be tear down first because we cannot update Network Tier in this resources. We can tear down resources only when Network Tier from annotation mismatch with network tier in IP address or forwarding rule.
bowei
bowei

I think you can just do

var ( networkTierErrorRegexp = regexp.MustCompile...

open pull request

bowei wants to merge kubernetes/ingress-gce

bowei
bowei

Do not include User Errors in L4NetLBInError metric

There are errors related to Network Tier that are caused by User misconfigurations and they should be filtered out from ServicesInError metrics. This errors are:

  1. Ip address and forwarding rule Network Tier mismatch
  2. User created service in Standard Tier and deleted the annotation, this action will changed desired service Network Tier to PREMIUM but IP address and forwarding rule should be tear down first because we cannot update Network Tier in this resources. We can tear down resources only when Network Tier from annotation mismatch with network tier in IP address or forwarding rule.
bowei
bowei

we shouldn't call this re -- that is too generic to be a variable at package scope.

networkTierErrorRegexp

Previous