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

CFE-927: Add functionality for scripting mode as per RFE-2052 #118

Merged
merged 4 commits into from
Oct 19, 2023

Conversation

lmzuccarelli
Copy link
Contributor

@lmzuccarelli lmzuccarelli commented Sep 18, 2023

This change is to ensure functionality for RFE-2052

The PR for the agent is related and depends on this PR being merged

The scripts have been tested using the container specified by the Dockerfile.dev file

Example output

podman run --privileged --cap-add=NET_ADMIN -e NODE_IP=127.0.0.1 -e EXECUTE_SCRIPT=/tmp/scripts/metrics.sh -p 9000:9000 -it quay.io//node-observability-scripts:dev ./node-observability-agent --mode scripting --storage
/tmp/results --loglevel debug
In a new terminal execute

curl -v http://127.0.0.1:9000/node-observability-scripting
Podman output

WARN[0000] Error validating CNI config file /home/lzuccarelli/.config/cni/net.d/kind.conflist: [failed to find plugin "dnsname" in path [/usr/local/libexec/cni /usr/libexec/cni /usr/local/lib/cni /usr/lib/cni /opt/cni/bin]]
INFO[0000] Starting node-observability-agent version: "v0.0.0-unknown", commit: "00801d1", build date: "2023-08-29T11:26:31Z", go version: "go1.19.10", GOOS: "linux", GOARCH: "amd64" at log level trace
INFO[0000] Start listening on tcp://0.0.0.0:9000 module=server
INFO[0000] Targeting node 127.0.0.1 module=server
INFO[0006] start handling status request module=handler
INFO[0006] agent is ready module=handler
INFO[0018] start handling status request module=handler
INFO[0018] previous profiling is still ongoing, runID: e669a8cb-b9b0-4f21-a57d-9a2228e8bc9b module=handler
INFO[0025] Metrics collection completed module=handler
INFO[0025] successfully finished running Scripting - e669a8cb-b9b0-4f21-a57d-9a2228e8bc9b: 2023-09-08 10:55:41.63103853 +0000 UTC m=+15.849803234 -> 2023-09-08 10:55:51.726152976 +0000 UTC m=+25.944917673 module=handler

To test locally using images in a cluster please follow the README (in this repo) see section

## Deploying the `NodeObservability` Operator

@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 18, 2023

@lmzuccarelli: This pull request references CFE-927 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 story to target the "4.15.0" version, but no target version was set.

In response to this:

This change is to ensure functionality for RFE-2052

The PR for the agent is related and depends on this PR being merged

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.

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

openshift-ci-robot commented Sep 18, 2023

@lmzuccarelli: This pull request references CFE-927 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 story to target the "4.15.0" version, but no target version was set.

In response to this:

This change is to ensure functionality for RFE-2052

The PR for the agent is related and depends on this PR being merged

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.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 18, 2023
@lmzuccarelli
Copy link
Contributor Author

/test e2e-gcp

Copy link
Contributor

@sherine-k sherine-k left a comment

Choose a reason for hiding this comment

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

@@ -31,6 +31,8 @@ type NodeObservabilityRunSpec struct {
type NodeObservabilityRef struct {
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
Name string `json:"name"`
// Mode , this is used to differentiate from the current crio-kubelet profiling and scripting execution
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Add the possible values for mode. Is it an enum?

fmt.Sprintf("--caCertFile=%s%s", kbltCAMountPath, kbltCAMountedFile),
},
Resources: corev1.ResourceRequirements{},
Args: args,
Copy link
Contributor

Choose a reason for hiding this comment

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

Much nicer!

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels Sep 19, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 27, 2023
@openshift-ci
Copy link

openshift-ci bot commented Sep 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lmzuccarelli, sherine-k

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 [lmzuccarelli,sherine-k]

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

@sherine-k
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 27, 2023
@openshift-ci
Copy link

openshift-ci bot commented Sep 27, 2023

@lmzuccarelli: all tests passed!

Full PR test history. Your PR dashboard.

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.

@sherine-k
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 27, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 19, 2023

@lmzuccarelli: This pull request references CFE-927 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 story to target the "4.15.0" version, but no target version was set.

In response to this:

This change is to ensure functionality for RFE-2052

The PR for the agent is related and depends on this PR being merged

The scripts have been tested using the container specified by the Dockerfile.dev file

Example output

podman run --privileged --cap-add=NET_ADMIN -e NODE_IP=127.0.0.1 -e EXECUTE_SCRIPT=/tmp/scripts/metrics.sh -p 9000:9000 -it quay.io//node-observability-scripts:dev ./node-observability-agent --mode scripting --storage
/tmp/results --loglevel debug
In a new terminal execute

curl -v http://127.0.0.1:9000/node-observability-scripting
Podman output

WARN[0000] Error validating CNI config file /home/lzuccarelli/.config/cni/net.d/kind.conflist: [failed to find plugin "dnsname" in path [/usr/local/libexec/cni /usr/libexec/cni /usr/local/lib/cni /usr/lib/cni /opt/cni/bin]]
INFO[0000] Starting node-observability-agent version: "v0.0.0-unknown", commit: "00801d1", build date: "2023-08-29T11:26:31Z", go version: "go1.19.10", GOOS: "linux", GOARCH: "amd64" at log level trace
INFO[0000] Start listening on tcp://0.0.0.0:9000 module=server
INFO[0000] Targeting node 127.0.0.1 module=server
INFO[0006] start handling status request module=handler
INFO[0006] agent is ready module=handler
INFO[0018] start handling status request module=handler
INFO[0018] previous profiling is still ongoing, runID: e669a8cb-b9b0-4f21-a57d-9a2228e8bc9b module=handler
INFO[0025] Metrics collection completed module=handler
INFO[0025] successfully finished running Scripting - e669a8cb-b9b0-4f21-a57d-9a2228e8bc9b: 2023-09-08 10:55:41.63103853 +0000 UTC m=+15.849803234 -> 2023-09-08 10:55:51.726152976 +0000 UTC m=+25.944917673 module=handler

To test locally using images in a cluster please follow the README (in this repo) see section

## Deploying the `NodeObservability` Operator

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.

@sherine-k
Copy link
Contributor

/label docs-approved
/label px-approved
/label qe-approved

@openshift-ci openshift-ci bot added docs-approved Signifies that Docs has signed off on this PR px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR labels Oct 19, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 19, 2023

@lmzuccarelli: This pull request references CFE-927 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 story to target the "4.15.0" version, but no target version was set.

In response to this:

This change is to ensure functionality for RFE-2052

The PR for the agent is related and depends on this PR being merged

The scripts have been tested using the container specified by the Dockerfile.dev file

Example output

podman run --privileged --cap-add=NET_ADMIN -e NODE_IP=127.0.0.1 -e EXECUTE_SCRIPT=/tmp/scripts/metrics.sh -p 9000:9000 -it quay.io//node-observability-scripts:dev ./node-observability-agent --mode scripting --storage
/tmp/results --loglevel debug
In a new terminal execute

curl -v http://127.0.0.1:9000/node-observability-scripting
Podman output

WARN[0000] Error validating CNI config file /home/lzuccarelli/.config/cni/net.d/kind.conflist: [failed to find plugin "dnsname" in path [/usr/local/libexec/cni /usr/libexec/cni /usr/local/lib/cni /usr/lib/cni /opt/cni/bin]]
INFO[0000] Starting node-observability-agent version: "v0.0.0-unknown", commit: "00801d1", build date: "2023-08-29T11:26:31Z", go version: "go1.19.10", GOOS: "linux", GOARCH: "amd64" at log level trace
INFO[0000] Start listening on tcp://0.0.0.0:9000 module=server
INFO[0000] Targeting node 127.0.0.1 module=server
INFO[0006] start handling status request module=handler
INFO[0006] agent is ready module=handler
INFO[0018] start handling status request module=handler
INFO[0018] previous profiling is still ongoing, runID: e669a8cb-b9b0-4f21-a57d-9a2228e8bc9b module=handler
INFO[0025] Metrics collection completed module=handler
INFO[0025] successfully finished running Scripting - e669a8cb-b9b0-4f21-a57d-9a2228e8bc9b: 2023-09-08 10:55:41.63103853 +0000 UTC m=+15.849803234 -> 2023-09-08 10:55:51.726152976 +0000 UTC m=+25.944917673 module=handler

To test locally using images in a cluster please follow the README (in this repo) see section

## Deploying the `NodeObservability` Operator

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.

@openshift-ci openshift-ci bot merged commit 71c5ed7 into openshift:main Oct 19, 2023
6 checks passed
@lmzuccarelli lmzuccarelli deleted the CFE-927 branch November 29, 2023 07:52
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. docs-approved Signifies that Docs has signed off on this PR 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. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants