Skip to content

ROX-12942: Introduce Compliance Full Node Scan message#3298

Merged
Maddosaurus merged 9 commits intomasterfrom
mm/rox-12942-nodescan-protobuf
Oct 12, 2022
Merged

ROX-12942: Introduce Compliance Full Node Scan message#3298
Maddosaurus merged 9 commits intomasterfrom
mm/rox-12942-nodescan-protobuf

Conversation

@Maddosaurus
Copy link
Contributor

@Maddosaurus Maddosaurus commented Oct 4, 2022

Description

As a prereq for later work, a new Protobuf message is introduced to represent a full node scan result (generated in compliance).
When the timer fires, Compliance scans the Node and then sends a FullNodeScanRequest with the scan results to Scanner.

Checklist

  • Investigated and inspected CI test results
  • Unit test and regression tests added
  • Evaluated and added CHANGELOG entry if required
  • [ ] Determined and documented upgrade steps
  • [ ] Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)

As this PR only introduces a new protobuf message, no specific upgrade steps or user-facing changes are introduced

Testing Performed

None

@ghost
Copy link

ghost commented Oct 4, 2022

Images are ready for the commit at 9fd6488.

To use with deploy scripts, first export MAIN_IMAGE_TAG=3.72.x-288-g9fd6488d70.

@Maddosaurus Maddosaurus requested a review from RTann October 4, 2022 16:47
@@ -0,0 +1,22 @@
syntax = "proto3";
Copy link
Contributor

Choose a reason for hiding this comment

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

About the file name compliance_nodescan.proto. I think, the fact that we put Scanner in Compliance is just an implementation detail that we shouldn't promote to the contract. As a thought exercise, compliance_ part will become misleading if we decide to set up a dedicated DaemonSet for node scanner.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would make more sense to actually put this in proto/storage/node.proto next to Node and the older NodeScan. That way we can store it in Central once all the vulns are filled in, and we can use it in other places as well. It also decouples it from the internal API. I believe internalapi/... can import from storage/, right?

@@ -0,0 +1,22 @@
syntax = "proto3";
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would make more sense to actually put this in proto/storage/node.proto next to Node and the older NodeScan. That way we can store it in Central once all the vulns are filled in, and we can use it in other places as well. It also decouples it from the internal API. I believe internalapi/... can import from storage/, right?


// Names and data types are designed to follow proto/storage/node.proto as close as possible
// Next tag: 7
message FullNodeScan {
Copy link
Contributor

Choose a reason for hiding this comment

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

Mentioned on Slack, but I wonder if something like NodeScanV2 would also work? Makes it clear this is the newer version of node scanning

@@ -0,0 +1,18 @@
syntax = "proto3";
Copy link
Contributor

@RTann RTann Oct 7, 2022

Choose a reason for hiding this comment

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

Why not just update internalapi/sensor/compliance_iservice.proto? It already is implemented to control the communication between Compliance pods and Sensor. Node scanning can just be added to the oneof in MsgFromCompliance. Similarly, if we ever want to have Sensor trigger node scans or something, we can just update the MsgToCompliance message since the bidi stream already exists

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Originally, I wanted to make sure we have completely separated processing pipelines for the two different NodeScan messages.
With a better idea of the work involved to set up a new bidi stream, your idea makes way more sense. Let me set that up!

@Maddosaurus
Copy link
Contributor Author

/retest

@Maddosaurus Maddosaurus force-pushed the mm/rox-12942-nodescan-protobuf branch from 3473439 to 9fd6488 Compare October 12, 2022 08:40
@openshift-ci
Copy link

openshift-ci bot commented Oct 12, 2022

@Maddosaurus: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/osd-aws-qa-e2e-tests 9fd6488 link false /test osd-aws-qa-e2e-tests
ci/prow/rosa-qa-e2e-tests 9fd6488 link false /test rosa-qa-e2e-tests
ci/prow/openshift-oldest-qa-e2e-tests 9fd6488 link false /test openshift-oldest-qa-e2e-tests
ci/prow/aro-qa-e2e-tests 9fd6488 link false /test aro-qa-e2e-tests
ci/prow/gke-upgrade-tests 9fd6488 link false /test gke-upgrade-tests

Full PR test history. Your PR dashboard.

Details

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 kubernetes/test-infra repository. I understand the commands that are listed here.

@Maddosaurus Maddosaurus merged commit aa090d2 into master Oct 12, 2022
@Maddosaurus Maddosaurus deleted the mm/rox-12942-nodescan-protobuf branch October 12, 2022 12:48
@vikin91 vikin91 changed the title Introduce Compliance Full Node Scan message ROX-12942: Introduce Compliance Full Node Scan message Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants