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

if a zone without and host, cannot display in 'show zones' #2915

Closed
HarrisChu opened this issue Sep 23, 2021 · 1 comment · Fixed by #2927
Closed

if a zone without and host, cannot display in 'show zones' #2915

HarrisChu opened this issue Sep 23, 2021 · 1 comment · Fixed by #2927
Assignees
Labels
type/bug Type: something is unexpected
Milestone

Comments

@HarrisChu
Copy link
Contributor

HarrisChu commented Sep 23, 2021

general speaking, as we can drop hosts from zone, and make a zone without any hosts, it should more verification for that.
e.g.

  1. add zone to group, then drop all host in zone, then create space.
  2. drop all hosts in zone, then add the zone to a group, then create space.
(root@nebula) [(none)]> add zone z1 "lekesr-storaged-0.lekesr-storaged-headless.default.svc.cluster.local":9779,"lekesr-storaged-1.lekesr-storaged-headless.default.svc.cluster.local":9779
Execution succeeded (time spent 2881/3852 us)

Thu, 23 Sep 2021 17:21:04 CST

(root@nebula) [(none)]>
(root@nebula) [(none)]>
(root@nebula) [(none)]> show zones
+------+------------------------------------------------------------------------+------+
| Name | Host                                                                   | Port |
+------+------------------------------------------------------------------------+------+
| "z1" | "lekesr-storaged-0.lekesr-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z1" | "lekesr-storaged-1.lekesr-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z2" | "lekesr-storaged-2.lekesr-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z3" | "lekesr-storaged-3.lekesr-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z4" | "lekesr-storaged-4.lekesr-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z4" | "lekesr-storaged-5.lekesr-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
Got 6 rows (time spent 1961/2975 us)
(root@nebula) [(none)]> drop host "lekesr-storaged-0.lekesr-storaged-headless.default.svc.cluster.local":9779 from zone z1
Execution succeeded (time spent 1469/2004 us)

(root@nebula) [(none)]> drop host "lekesr-storaged-1.lekesr-storaged-headless.default.svc.cluster.local":9779 from zone z1

Execution succeeded (time spent 1952/2600 us)
(root@nebula) [(none)]> show zones
+------+------------------------------------------------------------------------+------+
| Name | Host                                                                   | Port |
+------+------------------------------------------------------------------------+------+
| "z2" | "lekesr-storaged-2.lekesr-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z3" | "lekesr-storaged-3.lekesr-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z4" | "lekesr-storaged-4.lekesr-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z4" | "lekesr-storaged-5.lekesr-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
Got 4 rows (time spent 1145/1794 us)

Thu, 23 Sep 2021 17:22:57 CST

(root@nebula) [(none)]>       ADD GROUP g1 z1

Execution succeeded (time spent 1649/2619 us)

Thu, 23 Sep 2021 17:25:56 CST

(root@nebula) [(none)]>
(root@nebula) [(none)]>
(root@nebula) [(none)]> show groups
+------+------+
| Name | Zone |
+------+------+
| "g1" | "z1" |
+------+------+
| "g2" | "z2" |
+------+------+
| "g2" | "z3" |
+------+------+
| "g2" | "z4" |
+------+------+
Got 4 rows (time spent 1550/2325 us)
(root@nebula) [(none)]>  CREATE SPACE s1 (vid_type=int, replica_factor=1, partition_num=4) on g1
Execution succeeded (time spent 2110/2907 us)

Thu, 23 Sep 2021 17:27:40 CST

(root@nebula) [s1]> use s1;show parts
+--------------+--------+-------+-------+
| Partition ID | Leader | Peers | Losts |
+--------------+--------+-------+-------+
| 1            | ""     | ""    | ""    |
+--------------+--------+-------+-------+
| 2            | ""     | ""    | ""    |
+--------------+--------+-------+-------+
| 3            | ""     | ""    | ""    |
+--------------+--------+-------+-------+
| 4            | ""     | ""    | ""    |
+--------------+--------+-------+-------+
Got 4 rows (time spent 3046/3820 us)

Thu, 23 Sep 2021 17:28:22 CST
@HarrisChu HarrisChu added the type/bug Type: something is unexpected label Sep 23, 2021
@Sophie-Xie Sophie-Xie added this to the v2.6.0 milestone Sep 23, 2021
@darionyaphet
Copy link
Contributor

#2927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants