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

Дублирование порта при удалении инстанса #150

Open
avprotsenko opened this issue Feb 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@avprotsenko
Copy link
Collaborator

Если удалить из середины кластера инстанс через upgrade, а затем добавить в конец новый инстанс, он продублирует порт последнего инстанса.
Как воспроизвести:
cluster.genin.old.yml:

topology:
  - name: router
    replicasets_count: 2
    failure_domains: [router-1-1, router-2-1]
    roles:
      - app.roles.router
      - failover-coordinator
  - name: test1
    replicasets_count: 1
    replication_factor: 2
    failure_domains: [router-1-1, router-2-1]
    roles:
      - app.roles.test1
  - name: test2
    replicasets_count: 1
    replication_factor: 2
    failure_domains: [router-1-1, router-2-1]
    roles:
      - app.roles.test2
  - name: storage
    replicasets_count: 2
    replication_factor: 2
    failure_domains: [storage-1-1, storage-2-1]
    roles:
      - app.roles.storage

cluster.genin.new.yml:

topology:
  - name: router
    replicasets_count: 2
    failure_domains: [router-1-1, router-2-1]
    roles:
      - app.roles.router
      - failover-coordinator
  - name: test2
    replicasets_count: 1
    replication_factor: 2
    failure_domains: [router-1-1, router-2-1]
    roles:
      - app.roles.test2
  - name: storage
    replicasets_count: 2
    replication_factor: 2
    failure_domains: [storage-1-1, storage-2-1]
    roles:
      - app.roles.storage
genin upgrade --old cluster.genin.old.yml --new cluster.genin.new.yml

cluster.genin.new.yml:

topology:
  - name: router
    replicasets_count: 2
    failure_domains: [router-1-1, router-2-1]
    roles:
      - app.roles.router
      - failover-coordinator
  - name: test2
    replicasets_count: 1
    replication_factor: 2
    failure_domains: [router-1-1, router-2-1]
    roles:
      - app.roles.test2
  - name: storage
    replicasets_count: 2
    replication_factor: 2
    failure_domains: [storage-1-1, storage-2-1]
    roles:
      - app.roles.storage
  - name: test3
    replicasets_count: 1
    replication_factor: 2
    failure_domains: [router-1-1, router-2-1]
    roles:
      - ttc.roles.test3
genin upgrade --from-latest-state --new cluster.genin.new.yml

Результат:

+------------+-------------+------------+-------------+
|                       cluster                       |
+------------+-------------+------------+-------------+
|           DC1            |           DC2            |
+------------+-------------+------------+-------------+
| router-1-1 | storage-1-1 | router-2-1 | storage-2-1 |
+------------+-------------+------------+-------------+
| router-1   | storage-1-1 | router-2   | storage-1-2 |
| 8081/3031  | 8081/3031   | 8081/3031  | 8081/3031   |
+------------+-------------+------------+-------------+
| test2-1-1  | storage-2-1 | test2-1-2  | storage-2-2 |
| 8083/3033  | 8082/3032   | 8083/3033  | 8082/3032   |
+------------+-------------+------------+-------------+
| test3-1-1  |             | test3-1-2  |             |
| 8083/3033  |             | 8083/3033  |             |
+------------+-------------+------------+-------------+

@avprotsenko avprotsenko added the bug Something isn't working label Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant