Skip to content

Conversation

@as51340
Copy link
Contributor

@as51340 as51340 commented Jun 24, 2024

Configuration flag --coordinator-hostname is added which is used to fix the issue of having 0.0.0.0 in the output of show instances on the 1st leader. The flag has its environment variable equivalent in MEMGRAPH_COORDINATOR_HOSTNAME. The flag is used solely for the output of show instances, from the functional standpoint all stayed the same. High availability e2e tests are changed to use DNS (localhost instead of explicit 127.0.0.1) for consistency reasons. This change is breaking because now all coordinator instances need to provide a configuration option coordinator hostname.

The following output can be expected when setting --coordinator-hostname=localhost (no data instances):
memgraph> show instances;
+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+
| name | bolt_server | coordinator_server | management_server | health | role | last_succ_resp_ms |
+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+
| "coordinator_1" | "localhost:7690" | "localhost:10111" | "" | "up" | "leader" | 0 |
| "coordinator_2" | "localhost:7691" | "localhost:10112" | "" | "up" | "follower" | 45 |
| "coordinator_3" | "localhost:7692" | "localhost:10113" | "" | "up" | "follower" | 57 |
+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+
3 rows in set (0.001 sec)
memgraph>

@as51340 as51340 added feature feature Docs needed Docs needed CI -build=jepsen -test=core Run jepsen build and core tests on push CI -build=release -test=core Run release build and core tests on push CI -build=release -test=e2e Run release build and e2e tests on push labels Jun 24, 2024
@as51340 as51340 added this to the mg-v2.18.0 milestone Jun 24, 2024
@as51340 as51340 requested a review from antoniofilipovic June 24, 2024 06:06
@as51340 as51340 self-assigned this Jun 24, 2024
@as51340
Copy link
Contributor Author

as51340 commented Jun 24, 2024

Tracking

  • [Link to Epic/Issue]

Standard development

CI Testing Labels

  • Select the appropriate CI test labels (CI -build=build-name -test=test-suite)

Documentation checklist

  • Add the documentation label
  • Add the bug / feature label
  • Add the milestone for which this feature is intended
    • If not known, set for a later milestone
  • Write a release note, including added/changed clauses
    • Users should specify coordinator hostname through flag --coordinator-hostname or through env variable MEMGRAPH_COORDINATOR_HOSTNAME. For local deployment, use localhost. For containerized deployments, use the name of the container. This change is breaking because coordinators cannot be started if this configuration option isn't set.
  • Documentation PR link memgraph/documentation#XXXX
    • Is back linked to this development PR
  • [ Tag someone from docs team ]

@as51340
Copy link
Contributor Author

as51340 commented Jun 24, 2024

@kgolubic all should be written

@as51340 as51340 force-pushed the first-leader-issue branch 2 times, most recently from 8088381 to d6ae840 Compare June 24, 2024 08:49
Copy link
Contributor

@antoniofilipovic antoniofilipovic left a comment

Choose a reason for hiding this comment

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

Good work, I have only one comment

@as51340 as51340 force-pushed the first-leader-issue branch from d6ae840 to dd15da7 Compare June 24, 2024 10:40
@antoniofilipovic antoniofilipovic self-requested a review June 24, 2024 10:48
Copy link
Contributor

@antoniofilipovic antoniofilipovic left a comment

Choose a reason for hiding this comment

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

Nice!

@as51340 as51340 enabled auto-merge June 24, 2024 10:49
@kgolubic
Copy link
Contributor

I'll use this for RN:

  • Configuration flag --coordinator-hostname is added, which is used to fix the
    issue of having 0.0.0.0 in the output of SHOW INSTANCES on the first leader.
    The flag has its environment variable equivalent in
    MEMGRAPH_COORDINATOR_HOSTNAME. Now all coordinator instances need to provide a
    configuration option for the coordinator hostname. For local deployment, use
    localhost. For containerized deployments, use the name of the container. This
    change is breaking because coordinators cannot be started if this configuration
    option isn't set.
    #2131

@as51340 as51340 force-pushed the first-leader-issue branch 2 times, most recently from 8be9d6c to a9b540f Compare June 24, 2024 13:36
@as51340 as51340 added this pull request to the merge queue Jun 24, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 24, 2024
@as51340 as51340 added CI -build=coverage -test=core Run coverage build and core tests on push and removed CI -build=jepsen -test=core Run jepsen build and core tests on push CI -build=release -test=core Run release build and core tests on push CI -build=release -test=e2e Run release build and e2e tests on push labels Jun 25, 2024
@as51340 as51340 added the CI -build=debug -test=core Run debug build and core tests on push label Jun 25, 2024
@as51340 as51340 force-pushed the first-leader-issue branch from a9b540f to 2f084b7 Compare June 25, 2024 05:47
@as51340 as51340 enabled auto-merge June 25, 2024 05:48
@as51340 as51340 removed the CI -build=coverage -test=core Run coverage build and core tests on push label Jun 25, 2024
@as51340 as51340 force-pushed the first-leader-issue branch from 2f084b7 to 818a30b Compare June 25, 2024 06:45
@sonarqubecloud
Copy link

@as51340 as51340 added this pull request to the merge queue Jun 25, 2024
Merged via the queue into master with commit c20228c Jun 25, 2024
@as51340 as51340 deleted the first-leader-issue branch June 25, 2024 08:24
as51340 added a commit that referenced this pull request Oct 24, 2025
Configuration flag `--coordinator-hostname` is added which is used to
fix the issue of having 0.0.0.0 in the output of `show instances` on the
1st leader. The flag has its environment variable equivalent in
`MEMGRAPH_COORDINATOR_HOSTNAME`. The flag is used solely for the output
of `show instances`, from the functional standpoint all stayed the same.
High availability e2e tests are changed to use DNS (localhost instead of
explicit 127.0.0.1) for consistency reasons. This change is breaking
because now all coordinator instances need to provide a configuration
option coordinator hostname.

The following output can be expected when setting
`--coordinator-hostname=localhost` (no data instances):
memgraph> show instances;

+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+
| name | bolt_server | coordinator_server | management_server | health |
role | last_succ_resp_ms |

+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+
| "coordinator_1" | "localhost:7690" | "localhost:10111" | "" | "up" |
"leader" | 0 |
| "coordinator_2" | "localhost:7691" | "localhost:10112" | "" | "up" |
"follower" | 45 |
| "coordinator_3" | "localhost:7692" | "localhost:10113" | "" | "up" |
"follower" | 57 |

+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+
3 rows in set (0.001 sec)
memgraph>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking CI -build=debug -test=core Run debug build and core tests on push Docs needed Docs needed feature feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants