Skip to content

Commit

Permalink
Merge pull request #431 from dulek/fix-unscheduled-np
Browse files Browse the repository at this point in the history
Bug 1904973: Skip unscheduled pods when handling NP creation
  • Loading branch information
openshift-merge-robot committed Jan 7, 2021
2 parents d0532b4 + a5a3db5 commit 531885a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kuryr_kubernetes/controller/handlers/kuryrnetworkpolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ def on_present(self, knp):
pods_to_update.extend(matched_pods)

for pod in pods_to_update:
if driver_utils.is_host_network(pod):
if (driver_utils.is_host_network(pod) or
not driver_utils.is_pod_scheduled(pod)):
continue
pod_sgs = self._drv_pod_sg.get_security_groups(pod, project_id)
try:
Expand Down

0 comments on commit 531885a

Please sign in to comment.