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

Eru "Pod Resource" function returned duplicated #544

Closed
pankeshang opened this issue Jan 25, 2022 · 1 comment · Fixed by #546
Closed

Eru "Pod Resource" function returned duplicated #544

pankeshang opened this issue Jan 25, 2022 · 1 comment · Fixed by #546
Assignees

Comments

@pankeshang
Copy link

pankeshang commented Jan 25, 2022

context

given a pod called spp_dev_slave on the server, using eru-cli pod nodes would get the nodes data

root@sg2-shopee-cloud-kafka-test-10-129-106-9:~# eru-cli pod nodes spp_dev_slave
┌────────┬──────────────────────────┬────────┬────────────┬──────────────────────────────────┬─────────────┬────────────────────────────────┐
│ NAME   │ ENDPOINT                 │ STATUS │ CPU        │ MEMORY                           │ VOLUME      │ STORAGE                        │
├────────┼──────────────────────────┼────────┼────────────┼──────────────────────────────────┼─────────────┼────────────────────────────────┤
│ slave3 │ tcp://10.129.106.8:2376  │ DOWN   │ 26.00 / 48 │ 49392123904 / 107374182400 bytes │ 0 / 0 bytes │ 721554505 / 966367641600 bytes │
├────────┼──────────────────────────┼────────┼────────────┼──────────────────────────────────┼─────────────┼────────────────────────────────┤
│ slave4 │ tcp://10.129.106.8:2376  │ DOWN   │ 36.00 / 48 │ 75161927680 / 107374182400 bytes │ 0 / 0 bytes │ 721554505 / 966367641600 bytes │
├────────┼──────────────────────────┼────────┼────────────┼──────────────────────────────────┼─────────────┼────────────────────────────────┤
│ slave1 │ tcp://10.129.106.8:2376  │ DOWN   │ 33.00 / 48 │ 75161927680 / 107374182400 bytes │ 0 / 0 bytes │ 0 / 1099511627776 bytes        │
├────────┼──────────────────────────┼────────┼────────────┼──────────────────────────────────┼─────────────┼────────────────────────────────┤
│ slave2 │ tcp://10.129.106.42:2376 │ DOWN   │ 28.00 / 48 │ 60129542144 / 107374182400 bytes │ 0 / 0 bytes │ 0 / 1099511627776 bytes        │
└────────┴──────────────────────────┴────────┴────────────┴──────────────────────────────────┴─────────────┴────────────────────────────────┘

expected result

root@sg2-shopee-cloud-kafka-test-10-129-106-9:~# eru-cli pod resource spp_dev_slave
┌────────┬────────┬────────┬─────────┬────────┬───────┐
│ NAME   │ CPU    │ MEMORY │ STORAGE │ VOLUME │ DIFFS │
├────────┼────────┼────────┼─────────┼────────┼───────┤
│ slave1 │   x1%  │ y1%    │ 0.07%   │ 0.00%  │       │
│ slave2 │   x2%  │ y2%    │ 0.07%   │ 0.00%  │       │
│ slave3 │   x3%  │ y3%    │ 0.00%   │ 0.00%  │       │
│ slave4 │   x4%  │ y4%    │ 0.00%   │ 0.00%  │       │
└────────┴────────┴────────┴─────────┴────────┴───────┘
root@sg2-shopee-cloud-kafka-test-10-129-106-9:~# 


actual result

root@sg2-shopee-cloud-kafka-test-10-129-106-9:~# eru-cli pod resource spp_dev_slave
┌────────┬────────┬────────┬─────────┬────────┬───────┐
│ NAME   │ CPU    │ MEMORY │ STORAGE │ VOLUME │ DIFFS │
├────────┼────────┼────────┼─────────┼────────┼───────┤
│ slave4 │ 75.00% │ 70.00% │ 0.07%   │ 0.00%  │       │
│ slave4 │ 75.00% │ 70.00% │ 0.07%   │ 0.00%  │       │
│ slave2 │ 58.33% │ 56.00% │ 0.00%   │ 0.00%  │       │
│ slave2 │ 58.33% │ 56.00% │ 0.00%   │ 0.00%  │       │
└────────┴────────┴────────┴─────────┴────────┴───────┘
root@sg2-shopee-cloud-kafka-test-10-129-106-9:~# 

slave4 and slave2 showed up twice, slave1 and slave3 were not returned

eru log

...
DEBU[2022-01-25 16:53:50] [10.129.106.9:63856-EWHEVaht] [withNodesLocked] Node slave4 locked 
DEBU[2022-01-25 16:53:50] [10.129.106.9:63856-EWHEVaht] [doUnlock] Unlock slave4 
DEBU[2022-01-25 16:53:50] [10.129.106.9:63856-EWHEVaht] [withNodesLocked] Nodes {Podname: Includes:[slave4] Excludes:[] Labels:map[] All:true} unlocked 
DEBU[2022-01-25 16:53:50] [10.129.106.9:63856-EWHEVaht] [withNodesLocked] Node slave4 locked 
DEBU[2022-01-25 16:53:50] [10.129.106.9:63856-EWHEVaht] [withNodesLocked] Node slave2 locked 
DEBU[2022-01-25 16:53:50] [10.129.106.9:63856-EWHEVaht] [doUnlock] Unlock slave4 
DEBU[2022-01-25 16:53:50] [10.129.106.9:63856-EWHEVaht] [withNodesLocked] Nodes {Podname: Includes:[slave4] Excludes:[] Labels:map[] All:true} unlocked 
DEBU[2022-01-25 16:53:50] [10.129.106.9:63856-EWHEVaht] [doUnlock] Unlock slave2 
DEBU[2022-01-25 16:53:50] [10.129.106.9:63856-EWHEVaht] [withNodesLocked] Nodes {Podname: Includes:[slave2] Excludes:[] Labels:map[] All:true} unlocked 
DEBU[2022-01-25 16:53:50] [10.129.106.9:63856-EWHEVaht] [withNodesLocked] Node slave2 locked 
DEBU[2022-01-25 16:53:51] [10.129.106.9:63856-EWHEVaht] [doUnlock] Unlock slave2 
DEBU[2022-01-25 16:53:51] [10.129.106.9:63856-EWHEVaht] [withNodesLocked] Nodes {Podname: Includes:[slave2] Excludes:[] Labels:map[] All:true} unlocked 
^C

eru version

root@sg2-shopee-cloud-devvm-test-10-143-204-21:~# docker ps | grep eru
ad93d8feb864        projecteru2/core:v21.10.27-hotfix-1                                     "/usr/bin/eru-core -…"   2 weeks ago         Up 10 hours                             eru-core-5001-1
root@sg2-shopee-cloud-devvm-test-10-143-204-21:~# 

but actually the same problem happened in master as well

@jschwinger233 jschwinger233 self-assigned this Jan 26, 2022
@jschwinger233
Copy link
Member

Good news is this bug doesn't affect PodNodesList API, therefore workloads deployment keeps working properly.

giaosame pushed a commit to giaosame/core that referenced this issue Jan 26, 2022
@CMGS CMGS closed this as completed in #546 Jan 26, 2022
CMGS pushed a commit that referenced this issue Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants