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

Create JMXAgentConfig to add Hosts in JMX Session Through ecc.yml #675

Closed
2 of 3 tasks
VictorCavichioli opened this issue Jun 17, 2024 · 2 comments
Closed
2 of 3 tasks
Assignees
Labels
enhancement New feature or request PoC/Agent Tasks related to new generation of ecchronos as an agent

Comments

@VictorCavichioli
Copy link
Contributor

VictorCavichioli commented Jun 17, 2024

Story Description:
Create new object in package com.ericsson.bss.cassandra.ecchronos.application.config.connection called DatacenterAwareConfig(If it not exists), it must represent the below configuration in ecc.yml:

jmx:
    datacenterAware:
      enabled: false
      datacenters:
      - name: datacenter1
        hosts:
        - host: 127.0.0.1
          port: 7100
        - host: 127.0.0.2
          port: 7200
        - host: 127.0.0.3
          port: 7300
        - host: 127.0.0.4
          port: 7400

connection.jmx.datacenterAware.enabled must be false by default to avoid breaking the sidecar functionality; these described hosts will be added in the JmxConnection on the application startup; in the a future task we'll create a new JmxConnectionProvider specific for the agent, which will be activated by the connection.jmx.datacenterAware.enabled=true and connection.jmx.provider=DatacenterJMXConnectionProvider.java, so to avoid future problems, expose the DatacenterAwareConfig in the JmxConnection.java class.

Acceptance Criteria:

  • DatacenterAwareConfig Designed as Described;
  • New TestConfig class created to specific Agent tests, also is proposed to change the old name of TestConfig to TestDefaultConfig or TestSidecarConfig;
  • Architecture documentation updated with new topics.

Definition of Done:

Code tested and approved by maintainers.

Notes:

Related to #652

@VictorCavichioli
Copy link
Contributor Author

After some discussions we decided to change the configuration shape for the new below:

agent:
      enabled: false
      type: datacenterAware
      contactPoints:
      - host: 127.0.0.1
        port: 9042
      - host: 127.0.0.2
        port: 9042
      datacenterAware:
        datacenters:
        - name: datacenter1
      rackAware:
        racks:
        - datacenterName: datacenter1
          rackName: rack1
      hostAware:
        hosts:
          - host: 127.0.0.1
            port: 9042
          - host: 127.0.0.2
            port: 9042
          - host: 127.0.0.3
            port: 9042
          - host: 127.0.0.4
            port: 9042

@VictorCavichioli VictorCavichioli self-assigned this Jul 17, 2024
@VictorCavichioli VictorCavichioli changed the title Create DatacenterAwareConfig to add Hosts in JMX Session Through ecc.yml Create JMXAgentConfig to add Hosts in JMX Session Through ecc.yml Jul 19, 2024
@VictorCavichioli
Copy link
Contributor Author

After issue #671 and #673 we create a list of nodes based on the cql.agent.type, so we don't need to specify anymore the same structure to declare the nodes to the jmx session, we just need to enable the agent on jmx, so ecchronos will get the nodes from the nativeConnectionProvider and create the jmx connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PoC/Agent Tasks related to new generation of ecchronos as an agent
Projects
None yet
Development

No branches or pull requests

1 participant