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

OCPBUGS-31893 OCPBUGS-33919: 4.15 sync with master #929

Merged

Conversation

SchSeba
Copy link
Contributor

@SchSeba SchSeba commented May 7, 2024

skip commits on backport

Change behavior when deleting default config
65bb984

sriovOperatorconfig controller - dont create default config
45e4876

Dont create default operator config in main
add3554

remove EnableAdmissionController from vars
9fc63fa

remove use of ADMISSION_CONTROLLERS_ENABLED in test
7f3ecd0

Remove the creation of default SriovNetworkNodePolicy
dc8c040

small security improvements
0e821f2

change operator webhook image to non root user
bd69409

support switching resource injector webhook to Fail
56454db

Fix resource injector for pods wihtout annotation
74e3501

resourceInjectorMatchCondition documentation
0253817

mlguerrero12 and others added 30 commits May 6, 2024 16:29
When setSriovNumVfs fails, the error is overwritten by the return
error of RemoveUdevRule. If the latter function doesn't return an
error (most cases), the reconciliation loop will report success even
if vfs were not created/configured.
jq is a required tool in that script. Since we are not setting `-o pipefail`, the script can fail but exit with code 0
making the systemd service report success. This leaves the system in a bad state and user interaction is needed.

Signed-off-by: Vasilis Remmas <vremmas@nvidia.com>
Field `SriovOperatorConfig.Spec.LogLevel` controls the verbosity
of the operator logging system. This commit adjust the operator
controller's log level to that field, as it happens in the
config-daemon.

Note: at the moment, every log calls in the controllers are using
`V(0)`, so this commit is not supposed to change the aspect of a
logfile. Further commits will change the level of some particular
log calls.

Log the current and new value for the logger according to what
the user had set in the LogLevel field. Before this commit, a value of
-2 would produce a misleading line:
```
Set log verbose level	{"new-level": 0, "current-level": -2}
```

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
`"log"` package can't be tuned to a quite mode.
Avoid using `log.Printf(...)` in utility methods, as they create a lot
of noise in the operator logs.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
In `syncAllSriovNetworkNodeStates`, every node is
looped for every SriovNetworkNodeState resource. This
can produce up to `number_of_node^2` calls.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
Move every log call that has no effect on the clsuter to
verbosity level `1`.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
Move every log call that has no effect on the clsuter to
verbosity level `1`.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
Signed-off-by: Vasilis Remmas <vremmas@nvidia.com>
Using `@latest` for tools dependecies produces unrepeatable
builds which might break at any point in time. This is
particularly important when maintaining released versions
which need a backport fix.

Note: At the moment is not possible to reference the package
`sigs.k8s.io/controller-runtime/tools/setup-envtest` with a specific
version:

```
go: sigs.k8s.io/controller-runtime/tools/setup-envtest@v0.16.3: module sigs.k8s.io/controller-runtime@v0.16.3 found, but does not contain package sigs.k8s.io/controller-runtime/tools/setup-envtest
```

See kubernetes-sigs/kubebuilder#2480

Ref:
openshift#849
Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
A downstream merge [1][2] overrode the annotations in the config
daemonset. This resulted in he sriov-network-config-daemon pod missing
the `target.workload.openshift.io/management` annotation which led to
the pod not being pinned to the management cores when workload
partitioning is enabled.

This is a downstream-only patch.

[1] openshift#868
[2] commit 0f17753

Signed-off-by: Carlos Goncalves <cgoncalves@redhat.com>
This commits addresses an edge case where a nil object can occur
while rendering a file. In that situation, in one of the places the
renderer is used, it will try to add ownership to a nil object and
fail.

Signed-off-by: Vasilis Remmas <vremmas@nvidia.com>
This fix a crash:
```
DPANIC	sriovnetwork	webhook/validate.go:446	odd number of arguments passed as key-value pairs for logging	{"ignored key": "10ed"}
```
Signed-off-by: Vasilis Remmas <vremmas@nvidia.com>
This commit changes the ENV variable that turns on the admission
controllers to enable bundling of additional webhook related settings
via the same prefix like certificate mode, CA etc. This is a cosmetic
change.

Signed-off-by: Vasilis Remmas <vremmas@nvidia.com>
This commit starts to make use of the new ADMISSION_CONTROLLERS__*
environment variables when rendering manifests. It also adjusts the
logic with which cert-manager related annotation is used.

Signed-off-by: Vasilis Remmas <vremmas@nvidia.com>
This commit adjusts the manifests to use the new
ADMISSION_CONTROLLERS__* environment variables and also adjusts the
relevant documentation files to reflect the new changes.

Signed-off-by: Vasilis Remmas <vremmas@nvidia.com>
Signed-off-by: Vasilis Remmas <vremmas@nvidia.com>
Replace double underscores with underscores of admission controller
related ENV variables to address feedback on the PR.

Signed-off-by: Vasilis Remmas <vremmas@nvidia.com>
- Add webhook to image build target
- use APP_NAME var in image name for consistency

Signed-off-by: adrianc <adrianc@nvidia.com>
Signed-off-by: Vasilis Remmas <vremmas@nvidia.com>
Show which device is used in every test case. This
information is useful when certificating specific device
vendor.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
PR [1] changed operator's environment variable
`ENABLE_ADMISSION_CONTROLLER` to `ADMISSION_CONTROLLERS_ENABLED`.

Also, the following environment variable have been introduced
as a replacement of the constants:
- `operator-webhook-service` -> `ADMISSION_CONTROLLERS_CERTIFICATES_OPERATOR_SECRET_NAME`
- `network-resources-injector-secret` -> `ADMISSION_CONTROLLERS_CERTIFICATES_INJECTOR_SECRET_NAME`

refs:
[1] k8snetworkplumbingwg/sriov-network-operator#561

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
```
find . -not -path "./vendor*" -type f -print0 | xargs -0 sed -i 's/4\.15/4.16/g'
 make -f Makefile.bundle bundle
 ```

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
Signed-off-by: Sebastian Sch <sebassch@gmail.com>
like openstack and openshift add interfaces and mocks for better unit test

Signed-off-by: Sebastian Sch <sebassch@gmail.com>
for example MLX special mstconfig wrapper and create mock for unit tests

Signed-off-by: Sebastian Sch <sebassch@gmail.com>
…kage

create also interfaces for everything so we can have better unit tests coverage

Signed-off-by: Sebastian Sch <sebassch@gmail.com>
@openshift-ci-robot
Copy link
Contributor

@SchSeba: This pull request references Jira Issue OCPBUGS-25423, which is invalid:

  • expected the bug to target either version "4.15." or "openshift-4.15.", but it targets "4.12.z" instead
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required"
  • expected Jira Issue OCPBUGS-25423 to depend on a bug targeting a version in 4.16.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

skip commits on backport

Change behavior when deleting default config
65bb984

sriovOperatorconfig controller - dont create default config
45e4876

Dont create default operator config in main
add3554

remove EnableAdmissionController from vars
9fc63fa

remove use of ADMISSION_CONTROLLERS_ENABLED in test
7f3ecd0

Remove the creation of default SriovNetworkNodePolicy
dc8c040

small security improvements
0e821f2

change operator webhook image to non root user
bd69409

support switching resource injector webhook to Fail
56454db

Fix resource injector for pods wihtout annotation
74e3501

resourceInjectorMatchCondition documentation
0253817

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.

@SchSeba
Copy link
Contributor Author

SchSeba commented May 19, 2024

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@SchSeba: This pull request references Jira Issue OCPBUGS-25423, which is invalid:

  • expected the bug to target either version "4.15." or "openshift-4.15.", but it targets "4.12.z" instead
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required"
  • expected Jira Issue OCPBUGS-25423 to depend on a bug targeting a version in 4.16.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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.

@SchSeba SchSeba changed the title OCPBUGS-31893 OCPBUGS-25423: 4.15 sync with master OCPBUGS-31893 OCPBUGS-33919: 4.15 sync with master May 19, 2024
@openshift-ci-robot
Copy link
Contributor

@SchSeba: This pull request references Jira Issue OCPBUGS-33919, which is invalid:

  • expected the bug to target either version "4.15." or "openshift-4.15.", but it targets "4.12.z" instead
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required"
  • expected Jira Issue OCPBUGS-33919 to depend on a bug targeting a version in 4.16.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

skip commits on backport

Change behavior when deleting default config
65bb984

sriovOperatorconfig controller - dont create default config
45e4876

Dont create default operator config in main
add3554

remove EnableAdmissionController from vars
9fc63fa

remove use of ADMISSION_CONTROLLERS_ENABLED in test
7f3ecd0

Remove the creation of default SriovNetworkNodePolicy
dc8c040

small security improvements
0e821f2

change operator webhook image to non root user
bd69409

support switching resource injector webhook to Fail
56454db

Fix resource injector for pods wihtout annotation
74e3501

resourceInjectorMatchCondition documentation
0253817

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.

@SchSeba
Copy link
Contributor Author

SchSeba commented May 19, 2024

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@SchSeba: This pull request references Jira Issue OCPBUGS-33919, which is invalid:

  • expected the bug to target either version "4.15." or "openshift-4.15.", but it targets "4.14.z" instead
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required"
  • expected Jira Issue OCPBUGS-33919 to depend on a bug targeting a version in 4.16.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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.

@SchSeba
Copy link
Contributor Author

SchSeba commented May 19, 2024

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@SchSeba: This pull request references Jira Issue OCPBUGS-33919, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required"
  • expected Jira Issue OCPBUGS-33919 to depend on a bug targeting a version in 4.16.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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.

@SchSeba
Copy link
Contributor Author

SchSeba commented May 19, 2024

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@SchSeba: This pull request references Jira Issue OCPBUGS-33919, which is invalid:

  • expected Jira Issue OCPBUGS-33919 to depend on a bug targeting a version in 4.16.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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.

@SchSeba
Copy link
Contributor Author

SchSeba commented May 19, 2024

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@SchSeba: This pull request references Jira Issue OCPBUGS-33919, which is invalid:

  • expected Jira Issue OCPBUGS-33919 to depend on a bug targeting a version in 4.16.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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.

@SchSeba
Copy link
Contributor Author

SchSeba commented May 19, 2024

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@SchSeba: This pull request references Jira Issue OCPBUGS-33919, which is invalid:

  • expected Jira Issue OCPBUGS-33919 to depend on a bug targeting a version in 4.16.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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.

@SchSeba
Copy link
Contributor Author

SchSeba commented May 19, 2024

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@SchSeba: This pull request references Jira Issue OCPBUGS-33919, which is invalid:

  • expected Jira Issue OCPBUGS-33919 to depend on a bug targeting a version in 4.16.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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.

@SchSeba
Copy link
Contributor Author

SchSeba commented May 19, 2024

/jira refresh

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label May 19, 2024
@openshift-ci-robot
Copy link
Contributor

@SchSeba: This pull request references Jira Issue OCPBUGS-33919, which is valid.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.z) matches configured target version for branch (4.15.z)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-33920 is in the state Closed (Done), which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-33920 targets the "4.16.0" version, which is one of the valid target versions: 4.16.0
  • bug has dependents

Requesting review from QA contact:
/cc @zhaozhanqi

In response to this:

/jira refresh

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-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label May 19, 2024
@openshift-ci openshift-ci bot requested a review from zhaozhanqi May 19, 2024 10:44
@evgenLevin
Copy link

/label cherry-pick-approved

@openshift-ci openshift-ci bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label May 20, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 0fb72f7 into openshift:release-4.15 May 20, 2024
10 checks passed
@openshift-ci-robot
Copy link
Contributor

@SchSeba: Jira Issue OCPBUGS-33919: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-33919 has been moved to the MODIFIED state.

In response to this:

skip commits on backport

Change behavior when deleting default config
65bb984

sriovOperatorconfig controller - dont create default config
45e4876

Dont create default operator config in main
add3554

remove EnableAdmissionController from vars
9fc63fa

remove use of ADMISSION_CONTROLLERS_ENABLED in test
7f3ecd0

Remove the creation of default SriovNetworkNodePolicy
dc8c040

small security improvements
0e821f2

change operator webhook image to non root user
bd69409

support switching resource injector webhook to Fail
56454db

Fix resource injector for pods wihtout annotation
74e3501

resourceInjectorMatchCondition documentation
0253817

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-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build sriov-network-webhook-container-v4.15.0-202405200237.p0.g0fb72f7.assembly.stream.el9 for distgit sriov-network-webhook.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build sriov-network-operator-container-v4.15.0-202405200237.p0.g0fb72f7.assembly.stream.el9 for distgit sriov-network-operator.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build sriov-network-config-daemon-container-v4.15.0-202405200237.p0.g0fb72f7.assembly.stream.el9 for distgit sriov-network-config-daemon.
All builds following this will include this PR.

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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
Development

Successfully merging this pull request may close these issues.

None yet