Skip to content
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

SDN-4481: Set up NetPolicyTimeoutsHostNetworkedPodTraffic #4744

Conversation

petr-muller
Copy link
Member

@petr-muller petr-muller commented Feb 8, 2024

Current understanding of the issue:

  • 4.12.48+ potentially affected, so we may block upgrades from all 4.11 and 4.12.x<48
  • 4.13.30+ confirmed affected, so we should block upgrades from <4.12.x<48 and k
  • 4.14.9+ potentially affected, so we may block upgrades from 4.13.x<30 and 4.14.x<9
  • 4.15.0-rc.1+ potentially affected, so we may block upgrades from 4.14.x<9 (I guess we can ignore rc0)
  • 4.16.0-ec.0+ potentially affected but there's no relevant unaffected 4.16 or 4.15 so there is nothing to block.

Using PromQL to apply only on clusters that use NetworkPolicy objects.

I have handrafted a file for each minor version and then copied the
rest:

$ for fifteen in 2 3 4 5
    cp blocked-edges/4.15.0-rc.1-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml blocked-edges/4.15.0-rc.$fifteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
    sed -i -e "s|4.15.0-rc.1|4.15.0-rc.$fifteen|" blocked-edges/4.15.0-rc.$fifteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
  end

$ for fourteen in 10 11 12
    cp blocked-edges/4.14.9-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml  blocked-edges/4.14.$fourteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
    sed -i -e "s|4.14.9|4.14.$fourteen|" blocked-edges/4.14.$fourteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
  end

$ for thirteen in 31 32 33
    cp blocked-edges/4.13.30-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml  blocked-edges/4.13.$thirteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
    sed -i -e "s|4.13.30|4.13.$thirteen|" blocked-edges/4.13.$thirteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
  end

$ for twelve in 49
    cp blocked-edges/4.12.48-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml  blocked-edges/4.12.$twelve-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
    sed -i -e "s|4.12.48|4.12.$twelve|" blocked-edges/4.12.$twelve-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
  end

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 8, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 8, 2024

@petr-muller: This pull request references SDN-4481 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the spike to target the "4.16.0" version, but no target version was set.

In response to this:

Current understanding of the issue:

  • 4.12.48+ potentially affected, so we may block upgrades from all 4.11 and 4.12.x<48
  • 4.13.30+ confirmed affected, so we should block upgrades from <4.12.x<48 and k
  • 4.14.9+ potentially affected, so we may block upgrades from 4.13.x<30 and 4.14.x<9
  • 4.15.0-rc.1+ potentially affected, so we may block upgrades from 4.14.x<9 (I guess we can ignore rc0)
  • 4.16.0-ec.0+ potentially affected but there's no relevant unaffected 4.16 or 4.15 so there is nothing to block.

Currently we have no good PromQL to filter the affected clusters, so Always for now. I have not yet copied for each affected releases, just for each initial in given minor. Will create copies once we agree on how we proceed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 8, 2024
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 8, 2024
@petr-muller petr-muller force-pushed the NetPolicyTimeoutsHostNetworkedPodTraffic branch from 2528c04 to 8e5bdd9 Compare February 8, 2024 17:50
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 8, 2024

@petr-muller: This pull request references SDN-4481 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the spike to target the "4.16.0" version, but no target version was set.

In response to this:

Current understanding of the issue:

  • 4.12.48+ potentially affected, so we may block upgrades from all 4.11 and 4.12.x<48
  • 4.13.30+ confirmed affected, so we should block upgrades from <4.12.x<48 and k
  • 4.14.9+ potentially affected, so we may block upgrades from 4.13.x<30 and 4.14.x<9
  • 4.15.0-rc.1+ potentially affected, so we may block upgrades from 4.14.x<9 (I guess we can ignore rc0)
  • 4.16.0-ec.0+ potentially affected but there's no relevant unaffected 4.16 or 4.15 so there is nothing to block.

Using PromQL to apply only on clusters that use NetworkPolicy objects.

I have handrafted a file for each minor version and then copied the
rest:

$ for fifteen in 2 3 4 5
   cp blocked-edges/4.15.0-rc.1-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml blocked-edges/4.15.0-rc.$fifteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
   sed -i -e "s|4.15.0-rc.1|4.15.0-rc.$fifteen|" blocked-edges/4.15.0-rc.$fifteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
 end

$ for fourteen in 10 11 12
   cp blocked-edges/4.14.9-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml  blocked-edges/4.14.$fourteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
   sed -i -e "s|4.14.9|4.14.$fourteen|" blocked-edges/4.14.$fourteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
 end

$ for thirteen in 31 32 33
   cp blocked-edges/4.13.30-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml  blocked-edges/4.13.$thirteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
   sed -i -e "s|4.13.30|4.13.$thirteen|" blocked-edges/4.13.$thirteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
 end

$ for twelve in 49
   cp blocked-edges/4.12.48-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml  blocked-edges/4.12.$twelve-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
   sed -i -e "s|4.12.48|4.12.$twelve|" blocked-edges/4.12.$twelve-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
 end

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@petr-muller petr-muller changed the title WIP: SDN-4481: Set up NetPolicyTimeoutsHostNetworkedPodTraffic SDN-4481: Set up NetPolicyTimeoutsHostNetworkedPodTraffic Feb 8, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 8, 2024
@petr-muller petr-muller force-pushed the NetPolicyTimeoutsHostNetworkedPodTraffic branch 2 times, most recently from 6b47fbd to c2d8dbe Compare February 8, 2024 18:06
@LalatenduMohanty
Copy link
Member

/assign @wking

Current understanding of the issue:
- 4.12.48+ _potentially_ affected, so we _may_ block upgrades from all 4.11 and 4.12.x<48
- 4.13.30+ confirmed affected, so we should block upgrades from <4.12.x<48 and k
- 4.14.9+ _potentially_ affected, so we _may_ block upgrades from 4.13.x<30  and 4.14.x<9
- 4.15.0-rc.1+ _potentially_ affected, so we _may_ block upgrades from 4.14.x<9 (I guess we can ignore rc0)
- 4.16.0-ec.0+ _potentially_ affected but there's no relevant unaffected 4.16 or 4.15 so there is nothing to block.

Using PromQL to apply only on clusters that use NetworkPolicy objects.

I have handrafted a file for each minor version and then copied the
rest:

```
$ for fifteen in 2 3 4 5
    cp blocked-edges/4.15.0-rc.1-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml blocked-edges/4.15.0-rc.$fifteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
    sed -i -e "s|4.15.0-rc.1|4.15.0-rc.$fifteen|" blocked-edges/4.15.0-rc.$fifteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
  end

$ for fourteen in 10 11 12
    cp blocked-edges/4.14.9-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml  blocked-edges/4.14.$fourteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
    sed -i -e "s|4.14.9|4.14.$fourteen|" blocked-edges/4.14.$fourteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
  end

$ for thirteen in 31 32 33
    cp blocked-edges/4.13.30-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml  blocked-edges/4.13.$thirteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
    sed -i -e "s|4.13.30|4.13.$thirteen|" blocked-edges/4.13.$thirteen-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
  end

$ for twelve in 49
    cp blocked-edges/4.12.48-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml  blocked-edges/4.12.$twelve-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
    sed -i -e "s|4.12.48|4.12.$twelve|" blocked-edges/4.12.$twelve-NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
  end
```

Review:

Applied the following to append a `[+].*` suffix to `from:`, to stop
incorrectly matching the path from 4.13.30 to 4.13.31+:

```
$ sed -r -i -e 's|(from:.*)|\1\[+].*|' blocked-edges/*NetPolicyTimeoutsHostNetworkedPodTraffic.yaml
```
@petr-muller petr-muller force-pushed the NetPolicyTimeoutsHostNetworkedPodTraffic branch from c2d8dbe to 53ce42f Compare February 8, 2024 18:40
@LalatenduMohanty
Copy link
Member

Lets drop 4.13.33 from this PR as signatures are missing for this build which is causing the tests to fail.

Copy link
Member

@LalatenduMohanty LalatenduMohanty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Contributor

openshift-ci bot commented Feb 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LalatenduMohanty, petr-muller

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [LalatenduMohanty,petr-muller]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 8, 2024
@LalatenduMohanty
Copy link
Member

/hold to sanity check the promql

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 8, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit beebfc5 into openshift:master Feb 8, 2024
4 of 5 checks passed
@wking
Copy link
Member

wking commented Feb 8, 2024

I'm not clear on which clusters have NetworkPolicies, but:

image

is an OCP 4.16.0-ec.2 GCP TechPreviewNoUpgrade cluster where the CRD doesn't exist at all understanding that it is not exposed, and:

image

is an OSD 4.15.0-rc.5 AWS cluster where the CRD and some CRs exist understanding that it might be exposed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
4 participants