Draft: Fix some error messages when manager is unhappy with webservers
Every time I set up a new manager, I slightly mess up the webserver configuration. So I've probably seen the corresponding error messages more than just about anyone. Here's an attempt to make them more accurate.
Merge request reports
Activity
1201 1198 all_req_servers = set(server_by_group.values()).union( 1202 1199 server_by_layer.values()) 1203 1200 1204 if all_req_servers != up_servers: 1201 if set(all_req_servers) > set(up_servers): Oh, fair enough, thanks for spotting this. It's probably an odd configuration to put two groups on one server, but I cannot think of a blocker for this right now. If we want to prevent it, you're right that we should validate the configuration in the first place. what do you think?
I'm surprised by the cast though, both symbols should be sets already.
994 994 # Query all servers on each host and check whether the ones we 995 995 # need are in there, and obtain their API names. 996 996 for host, req_names in hosts.items(): 997 # Retrieve hostname for nice error messages. 998 hostname = urlparse(self._server_hosts[name]).hostname I am not sure if there was ever a difference - I'm assuming
hostname
was supposed to be the name ofhost
, possibly a remnant from some refactoring. Asname
is not iterated over in the loop,hostname
was in practice theurluparse
result of the lastname
in_server_hosts
. And that dict maps hosts to Karabo server names AFAICT, so iterating overhosts
here,host
is probably the host one would want to know about in the error messages.
Superseded by !93 (merged)
mentioned in merge request !93 (merged)