Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
calng
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
calibration
calng
Compare revisions
master to fix-manager-init-server-errors
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
calibration/calng
Select target project
No results found
fix-manager-init-server-errors
Select Git revision
Swap
Target
calibration/calng
Select target project
calibration/calng
1 result
master
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
I think the host is the hostname to report
· 8ec2de06
David Hammer
authored
2 years ago
8ec2de06
Error message implies subset; was triggered by superset, too
· 478f8797
David Hammer
authored
2 years ago
478f8797
Flipping the operator around
· f5314f43
David Hammer
authored
2 years ago
f5314f43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/calng/CalibrationManager.py
+6
-9
6 additions, 9 deletions
src/calng/CalibrationManager.py
with
6 additions
and
9 deletions
src/calng/CalibrationManager.py
View file @
f5314f43
...
...
@@ -994,36 +994,33 @@ class CalibrationManager(DeviceClientBase, Device):
# Query all servers on each host and check whether the ones we
# need are in there, and obtain their API names.
for
host
,
req_names
in
hosts
.
items
():
# Retrieve hostname for nice error messages.
hostname
=
urlparse
(
self
.
_server_hosts
[
name
]).
hostname
try
:
reply
=
await
to_asyncio_future
(
self
.
_http_client
.
fetch
(
f
'
{
host
}
/api/servers.json
'
,
method
=
'
GET
'
))
except
(
ConnectionError
,
HTTPError
)
as
e
:
err
.
append
(
f
'
-
{
e
.
__class__
.
__name__
}
when retrieving server
'
f
'
list on
{
host
name
}
:
{
e
}
'
)
f
'
list on
{
host
}
:
{
e
}
'
)
continue
body
=
json
.
loads
(
reply
.
body
)
if
not
body
[
'
success
'
]:
err
.
append
(
f
'
- Request to retrieve server list failed on
'
f
'
{
host
name
}
'
)
f
'
{
host
}
'
)
continue
servers
=
{
s
[
'
karabo_name
'
]:
s
for
s
in
body
[
'
servers
'
]
if
s
[
'
karabo_name
'
]
in
req_names
}
if
len
(
servers
)
!=
len
(
req_names
):
err
.
append
(
f
'
- Device servers missing on
{
host
name
}
:
'
+
err
.
append
(
f
'
- Device servers missing on
{
host
}
:
'
+
'
,
'
.
join
(
req_names
-
servers
.
keys
()))
servers_in_error
=
{
s
[
'
karabo_name
'
]
for
s
in
servers
.
values
()
if
'
error
'
in
s
[
'
status
'
]}
if
servers_in_error
:
err
.
append
(
f
'
- Device servers on
{
host
name
}
are in error state
'
err
.
append
(
f
'
- Device servers on
{
host
}
are in error state
'
+
'
,
'
.
join
(
servers_in_error
))
continue
...
...
@@ -1031,7 +1028,7 @@ class CalibrationManager(DeviceClientBase, Device):
if
not
s
[
'
control_allowed
'
]}
if
servers_disabled
:
err
.
append
(
f
'
- Device servers on
{
host
name
}
not controllable
'
err
.
append
(
f
'
- Device servers on
{
host
}
not controllable
'
f
'
via webserver:
'
+
'
,
'
.
join
(
servers_disabled
))
continue
...
...
@@ -1201,7 +1198,7 @@ class CalibrationManager(DeviceClientBase, Device):
all_req_servers
=
set
(
server_by_group
.
values
()).
union
(
server_by_layer
.
values
())
if
all_req_servers
!=
up_servers
:
if
set
(
all_req_servers
)
>
set
(
up_servers
)
:
return
self
.
_set_error
(
'
One or more device servers are not
'
'
listed in the device servers
'
'
configuration
'
)
...
...
This diff is collapsed.
Click to expand it.