Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.toolbox
Commits
6fd5eebe
Commit
6fd5eebe
authored
Feb 01, 2019
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
promise fix failures
parent
8db39d3b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
5 deletions
+8
-5
slapos/promise/plugin/check_error_on_http_log.py
slapos/promise/plugin/check_error_on_http_log.py
+1
-1
slapos/promise/plugin/check_icmp_packet_lost.py
slapos/promise/plugin/check_icmp_packet_lost.py
+1
-1
slapos/promise/plugin/check_re6st_optimal_status.py
slapos/promise/plugin/check_re6st_optimal_status.py
+1
-1
slapos/promise/plugin/trafficserver_cache_availability.py
slapos/promise/plugin/trafficserver_cache_availability.py
+5
-2
No files found.
slapos/promise/plugin/check_error_on_http_log.py
View file @
6fd5eebe
...
...
@@ -74,7 +74,7 @@ class RunPromise(GenericPromise):
timeout
+=
1
error_amount
+=
1
if
error_amount
:
self
.
logger
.
error
(
"ERROR=%s (NO
TROUTE=%s, UNREACHE
ABLENET=%s, TIMEOUT=%s)"
%
(
self
.
logger
.
error
(
"ERROR=%s (NO
ROUTE=%s, UNREACH
ABLENET=%s, TIMEOUT=%s)"
%
(
error_amount
,
no_route_error
,
network_is_unreacheable
,
timeout
))
else
:
self
.
logger
.
info
(
"OK"
)
...
...
slapos/promise/plugin/check_icmp_packet_lost.py
View file @
6fd5eebe
...
...
@@ -25,7 +25,7 @@ class RunPromise(GenericPromise):
raise
ValueError
(
"'address' was not set in promise parameters."
)
# Force use ipv4 protocol ?
ipv4
=
self
.
getConfig
(
'ipv4'
)
in
(
'True'
,
'true'
,
'1'
)
count
=
self
.
getConfig
(
'count'
,
10
)
count
=
int
(
self
.
getConfig
(
'count'
,
10
)
)
threshold
=
int
(
self
.
getConfig
(
'threshold'
,
0
))
if
threshold
<
0
:
raise
ValueError
(
"'threshold' value should be greater than 0."
)
...
...
slapos/promise/plugin/check_re6st_optimal_status.py
View file @
6fd5eebe
...
...
@@ -22,7 +22,7 @@ class RunPromise(GenericPromise):
# promise ipv6 and ipv4 address to compare.
ipv4
=
self
.
getConfig
(
'ipv4'
)
ipv6
=
self
.
getConfig
(
'ipv6'
)
count
=
self
.
getConfig
(
'count'
,
10
)
count
=
int
(
self
.
getConfig
(
'count'
,
10
)
)
if
not
ipv4
:
raise
ValueError
(
"'ipv4' was not set in promise parameters."
)
if
not
ipv6
:
...
...
slapos/promise/plugin/trafficserver_cache_availability.py
View file @
6fd5eebe
...
...
@@ -2,7 +2,10 @@ from zope import interface as zope_interface
from
slapos.grid.promise
import
interface
from
slapos.grid.promise.generic
import
GenericPromise
import
subprocess
try
:
import
subprocess32
as
subprocess
except
ImportError
:
import
subprocess
class
RunPromise
(
GenericPromise
):
...
...
@@ -10,7 +13,7 @@ class RunPromise(GenericPromise):
def
__init__
(
self
,
config
):
GenericPromise
.
__init__
(
self
,
config
)
self
.
setPeriodicity
(
minute
=
5
)
self
.
setPeriodicity
(
minute
=
int
(
self
.
getConfig
(
'frequency'
,
5
))
)
def
sense
(
self
):
"""
...
...
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