Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
power-node
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
power-node
Commits
665e974e
Commit
665e974e
authored
Mar 13, 2024
by
duanjinfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update connect nm count
parent
0272cf84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
11 deletions
+0
-11
monitor_seed.go
nm/monitor_seed.go
+0
-11
No files found.
nm/monitor_seed.go
View file @
665e974e
...
@@ -11,7 +11,6 @@ import (
...
@@ -11,7 +11,6 @@ import (
)
)
func
monitorNodeManagerSeed
()
{
func
monitorNodeManagerSeed
()
{
connectNmCumulativeCount
:=
0
ticker
:=
time
.
NewTicker
(
time
.
Second
*
1
)
ticker
:=
time
.
NewTicker
(
time
.
Second
*
1
)
for
{
for
{
select
{
select
{
...
@@ -20,22 +19,12 @@ func monitorNodeManagerSeed() {
...
@@ -20,22 +19,12 @@ func monitorNodeManagerSeed() {
log
.
Info
(
"Nm seed url:"
,
seed
)
log
.
Info
(
"Nm seed url:"
,
seed
)
seedServiceClient
:=
operate
.
ConnNmGrpc
(
seed
)
seedServiceClient
:=
operate
.
ConnNmGrpc
(
seed
)
if
seedServiceClient
==
nil
{
if
seedServiceClient
==
nil
{
if
connectNmCumulativeCount
==
conf
.
GetConfig
()
.
AllowConnNmCount
{
log
.
Error
(
"Dial nm seed service client failed"
)
continue
}
log
.
Warn
(
"Connect nm seed service client is nil"
)
log
.
Warn
(
"Connect nm seed service client is nil"
)
connectNmCumulativeCount
++
continue
continue
}
}
list
,
err
:=
seedServiceClient
.
ManagerList
(
context
.
Background
(),
&
nodeManagerV1
.
ManagerListRequest
{},
grpc
.
EmptyCallOption
{})
list
,
err
:=
seedServiceClient
.
ManagerList
(
context
.
Background
(),
&
nodeManagerV1
.
ManagerListRequest
{},
grpc
.
EmptyCallOption
{})
if
err
!=
nil
{
if
err
!=
nil
{
if
connectNmCumulativeCount
==
conf
.
GetConfig
()
.
AllowConnNmCount
{
log
.
Error
(
"Nm seed seed service is dealing"
)
continue
}
log
.
WithError
(
err
)
.
Warn
(
"Get manager list failed through nm seed service"
)
log
.
WithError
(
err
)
.
Warn
(
"Get manager list failed through nm seed service"
)
connectNmCumulativeCount
++
continue
continue
}
}
if
list
.
GetManagers
()
==
nil
||
len
(
list
.
GetManagers
())
==
0
{
if
list
.
GetManagers
()
==
nil
||
len
(
list
.
GetManagers
())
==
0
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment