-
Notifications
You must be signed in to change notification settings - Fork 32
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
JPERF-1106: Gather Apache2 logs #163
base: master
Are you sure you want to change the base?
Conversation
This requires at least 4 changes:
|
e33e49b
to
df3bd05
Compare
) | ||
val loadBalancerResultsSource = (provisionedLoadBalancer.loadBalancer as? DiagnosableLoadBalancer) |
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.
First time used this as?
syntax. Casts are usually bad, however given the circumstances of our current model I think this is a better solution than putting a new field into ProvisionedLoadBalancer
and I'm also not certain if adding methods to LoadBalancer
would be a good idea. Extending the interface and detecting it allows for wrapping of DiagnosableLoadBalancer
implementations without losing the feature.
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.
Indeed casts are bad. See https://github.com/atlassian/aws-infrastructure/blob/release-2.29.0/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/DataCenterFormula.kt#L360:
if (loadBalancer is ApacheProxyLoadBalancer) listOf(loadBalancer::updateJiraConfiguration) else emptyList()
Fortunately, ApacheProxyLoadBalancer
will match both is
/as?
casts, so it will function.
We need hooks API to avoid further tight coupling. If the apache logs are necessary, then we can merge the tech debt. But if not, then let's skip that part.
src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/Jira.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/SuppressingRunnable.kt
Outdated
Show resolved
Hide resolved
import com.atlassian.performance.tools.aws.api.StorageLocation | ||
import com.atlassian.performance.tools.infrastructure.api.loadbalancer.LoadBalancer | ||
|
||
interface DiagnosableLoadBalancer : LoadBalancer { |
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.
Name suggestions welcome
import com.atlassian.performance.tools.infrastructure.api.loadbalancer.LoadBalancer | ||
|
||
interface DiagnosableLoadBalancer : LoadBalancer { | ||
fun gatherDiagnostics(location: StorageLocation) |
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.
Name suggestions welcome
import com.atlassian.performance.tools.aws.api.StorageLocation | ||
import com.atlassian.performance.tools.infrastructure.api.loadbalancer.LoadBalancer | ||
|
||
interface DiagnosableLoadBalancer : LoadBalancer { |
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.
We could make that LoadBalancer
-agnostic, however that would make the model more abstract and that possibly could make it harder to understand. Looking for thoughts on that.
38c9b50
to
693a749
Compare
src/test/kotlin/com/atlassian/performance/tools/awsinfrastructure/SuppressingRunnableTest.kt
Outdated
Show resolved
Hide resolved
src/test/kotlin/com/atlassian/performance/tools/awsinfrastructure/SuppressingRunnableTest.kt
Outdated
Show resolved
Hide resolved
693a749
to
05c1ddd
Compare
I migrated the new tests to use AssertJ |
src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/Jira.kt
Outdated
Show resolved
Hide resolved
@dagguh do you see value in this change? If not we may want to decline it. We used the logs in our internal experiment to diagnose problem and we already know that the problem is with Jira memory usage and not load balancer. Load balancer proxy error was only a symptom of product having CPU/IO problems. |
Overall reuse of |
05c1ddd
to
af09430
Compare
This is ready for review again. I'm not planning to add integration test for the logs. |
- Make `StartedNode` a `MeasurementSource`. | ||
|
||
## Fixed | ||
- Let every `MeasurementSource` inside `Jira` finish its gathering even if one of them fails. Fix [JPERF-1114]. |
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.
Let's split those changes. One sounds good, while the other needs some further considerations.
) | ||
val loadBalancerResultsSource = (provisionedLoadBalancer.loadBalancer as? DiagnosableLoadBalancer) |
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.
Indeed casts are bad. See https://github.com/atlassian/aws-infrastructure/blob/release-2.29.0/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/DataCenterFormula.kt#L360:
if (loadBalancer is ApacheProxyLoadBalancer) listOf(loadBalancer::updateJiraConfiguration) else emptyList()
Fortunately, ApacheProxyLoadBalancer
will match both is
/as?
casts, so it will function.
We need hooks API to avoid further tight coupling. If the apache logs are necessary, then we can merge the tech debt. But if not, then let's skip that part.
Not sure how to judge that. We wanted to take a look at the appache logs when diagnosing a problem recently. We used JAR built from this code to do so, however didn't really find anything useful other than confirmation that the load balancer just times out on communication with the product. We no longer have an immediate problem to diagnose, so that would mean that the logs are not necessary. Question is if we wouldn't waste the effort if the diagnostic need will repeat itself, yet the code for it won't be merged and e.g. will have conflicts with the current master. |
No description provided.