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

install-cni.sh tweaks for performance #324

Merged
merged 1 commit into from
May 21, 2024

Conversation

jingyuanliang
Copy link
Member

  • Include nice command allowing setting lower nice values
  • Output all log entries with timestamps for easier observation
  • Make ENABLE_BANDWIDTH_PLUGIN optional preparing for removal
  • Remove unnecessary cat usage and avoid jq -c solely for log prettiness

/assign @marqc

Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jingyuanliang

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:

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

@jingyuanliang
Copy link
Member Author

/assign @aojea

ipv6_subnet_configured="true"
SUBNETS_REPLACEMENT+=("$(jq -nc --arg subnet "${subnet}" '[{"subnet": $subnet}]')")
ROUTES_REPLACEMENT+=('{"dst": "::/0"}')
else
echo "[ERROR] Subnet detected in .spec.podCIDRs '${subnet}' is not a valid IP range"
log "[ERROR] Subnet detected in .spec.podCIDRs '${subnet}' is not a valid IP range"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it's better to introduce log level on the log handler method instead. I.e. separate methods for log_debug, log_info and log_error. Also log_error might have built-in script termination with error code.

Copy link
Member Author

Choose a reason for hiding this comment

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

The current logs are pretty random... I just replaced all echo with log for the purpose of appending timestamps. Maybe more improvements later if we have capacity.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good! It's definitely an improvement even in current state.

@marqc marqc removed their assignment May 20, 2024
@jingyuanliang
Copy link
Member Author

/assign @sypakine

scripts/install-cni.sh Outdated Show resolved Hide resolved
@sypakine
Copy link
Collaborator

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label May 21, 2024
@google-oss-prow google-oss-prow bot merged commit 3f369c7 into GoogleCloudPlatform:master May 21, 2024
5 checks passed
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.

None yet

4 participants