Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
noc
noc
Commits
bf82a6fa
Commit
bf82a6fa
authored
Jun 21, 2022
by
Andrey Vertiprahov
Browse files
release-22.1:Backport!6391
parent
2ca5821e
Changes
3
Hide whitespace changes
Inline
Side-by-side
fm/handlers/alarm/segment.py
View file @
bf82a6fa
...
...
@@ -26,7 +26,7 @@ def set_segment_redundancy(alarm):
mo
=
alarm
.
managed_object
seg
=
mo
.
segment
if
seg
.
is_redundant
and
not
seg
.
lost_redundancy
:
u
=
mo
.
data
.
uplinks
u
=
mo
.
uplinks
if
len
(
u
)
>
1
:
logger
.
info
(
"[%s] Redundancy lost for %s"
,
alarm
.
id
,
seg
.
name
)
seg
.
set_lost_redundancy
(
True
)
...
...
@@ -43,7 +43,7 @@ def check_segment_redundancy(alarm):
seg
=
mo
.
segment
if
not
seg
.
is_redundant
or
not
seg
.
lost_redundancy
:
return
u
=
mo
.
data
.
uplinks
u
=
mo
.
uplinks
if
len
(
u
)
<
2
:
return
seg_objects
=
list
(
seg
.
managed_objects
.
values_list
(
"id"
,
flat
=
True
))
...
...
services/correlator/service.py
View file @
bf82a6fa
...
...
@@ -1123,7 +1123,7 @@ class CorrelatorService(TornadoService):
if
self
.
is_distributed
:
# Set lock until the end of dispose
mo
=
alarm
.
managed_object
self
.
topo_rca_lock
=
RCALock
(
mo
.
data
.
rca_neighbors
+
[
mo
.
id
])
self
.
topo_rca_lock
=
RCALock
(
mo
.
rca_neighbors
+
[
mo
.
id
])
await
self
.
topo_rca_lock
.
acquire
()
# Get neighboring alarms
neighbor_alarms
=
get_neighboring_alarms
(
alarm
)
...
...
services/datastream/streams/managedobject.py
View file @
bf82a6fa
...
...
@@ -240,7 +240,7 @@ class ManagedObjectDataStream(DataStream):
# Populate
r
[
"interfaces"
]
=
[
ManagedObjectDataStream
.
_get_interface
(
i
,
subs
[
i
[
"_id"
]],
links
[
i
[
"_id"
]],
ifcache
,
set
(
mo
.
data
.
uplinks
),
services
i
,
subs
[
i
[
"_id"
]],
links
[
i
[
"_id"
]],
ifcache
,
set
(
mo
.
uplinks
),
services
)
for
i
in
interfaces
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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