-
Notifications
You must be signed in to change notification settings - Fork 220
RFE-3765 - Allow Ingress to Modify the HAProxy Log Length when using a Sidecar #900
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
Conversation
|
@dafsjr: This pull request references RFE-3765 which is a valid jira issue. DetailsIn response to this: 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. |
|
Hi @dafsjr. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
@dafsjr: This pull request references RFE-3765 which is a valid jira issue. DetailsIn response to this:
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. |
1 similar comment
|
@dafsjr: This pull request references RFE-3765 which is a valid jira issue. DetailsIn response to this:
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. |
|
@dafsjr: No Jira issue is referenced in the title of this pull request. DetailsIn response to this:
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. |
|
@candita if I understood correctly, it is done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not need to change the Dockerfile, please revert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I do not have access to the images in Dockerfile, I needed to use the origin image to compile.
| RouterSyslogFacilityEnvName = "ROUTER_LOG_FACILITY" | ||
| RouterSyslogMaxLengthEnvName = "ROUTER_LOG_MAX_LENGTH" | ||
|
|
||
| RouterContainerMaxLengthEnvName = "ROUTER_LOG_MAX_LENGTH" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You cannot use the same user-visible value for two different environment variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I tried something different.
|
/assign |
|
/ok-to-test |
| Destination: operatorv1.LoggingDestination{ | ||
| Type: operatorv1.ContainerLoggingDestinationType, | ||
| Container: &operatorv1.ContainerLoggingDestinationParameters{}, | ||
| Type: operatorv1.ContainerLoggingDestinationType, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add this later, but this section should be to test the default, so don't make these changes here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is for L519, will repost there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it does apply to the addition of MaxLength in this section. This should only be the default, not a changed value in MaxLength.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, understood
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is setting up the default for testing. Don't add MaxLength here.
| {"ROUTER_CANONICAL_HOSTNAME", true, "router-" + ic.Name + "." + ic.Status.Domain}, | ||
| {"ROUTER_LOG_FACILITY", false, ""}, | ||
| {"ROUTER_LOG_MAX_LENGTH", false, ""}, | ||
| {"ROUTER_LOG_MAX_LENGTH", true, "8192"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E.g. don't do this here. Add a new test elsewhere, which tests the change from default to a new value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See TestDeploymentConfigChanged for examples.
|
/retest-required |
|
/test e2e-aws-ovn-single-node |
|
/test e2e-gcp-operator |
|
/test e2e-aws-ovn-single-node |
|
/retest |
|
/test e2e-aws-operator |
| maxLength: | ||
| default: 1024 | ||
| description: "maxLength is the maximum length of the syslog message \n If this field is empty, the maxLength is set to \"1024\"." | ||
| description: "maxLength is the maximum length of the log message. \n Valid values are integers in the range 480 to 4096, inclusive. \n When omitted, the default value is 1024." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dafsjr why is the maximum different for syslog?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file is the same of vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml, it is autogenerated/updated, Miciah asked me to modify the message for syslog too in the PR for openshift/api.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But don't you want the same numeric maximum for syslog and sidecar log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I understood a total different thing, I will reply in slack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked with @Miciah and this should be fine.
test/e2e/operator_test.go
Outdated
| }).Stream(context.TODO()) | ||
| if err != nil { | ||
| t.Errorf("failed to read logs from pod %s: %v", pod.Name, err) | ||
| return false, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please log the error with t.Logf instead of t.Errorf, and then return false, nil so that the polling loop retries after logging the error.
test/e2e/operator_test.go
Outdated
| data, err := ioutil.ReadAll(readCloser) | ||
| if err != nil { | ||
| t.Errorf("failed to read logs from pod %s: %v", pod.Name, err) | ||
| return false, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, if I'm correct.
| return false, err | |
| return false, nil |
|
/lgtm |
test/e2e/operator_test.go
Outdated
| if err := readCloser.Close(); err != nil { | ||
| t.Errorf("failed to close logs reader for pod %s: %v", pod.Name, err) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned, please remove this and put in a defer function before starting scanner.Scan, here and in the other function you added.
|
/lgtm |
|
/remove-hold |
|
/retest |
…n using a sidecar.
* pkg/operator/controller/ingress/deployment.go:
- Changed the name of the var RouterSyslogMaxLengthEnvName to RouterLogMaxLengthEnvName,
thus the same var is used to Syslog and Container options
- Added a validation for containerLoggingParameters, if not null, return all the parameters
* pkg/operator/controller/ingress/rsyslog_configmap.go:
- Added the parameter MaxMessageSize with value of 10k in the configMap generator for rsyslog.conf
* test/e2e/all_test.go:
- Add tests TestContainerLoggingMaxLength and TestContainerLoggingMinLength
* test/e2e/operator_test.go:
- Added the functions for the tests TestContainerLoggingMaxLength and TestContainerLoggingMinLength
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: candita The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
/lgtm |
|
@dafsjr: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
A code to implement the RFE-3765, I also modified the maxLength of the Syslog section to be the same of the Container section.