Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No use of HOST_NAME #33

Open
thoffma opened this issue May 15, 2024 · 4 comments
Open

No use of HOST_NAME #33

thoffma opened this issue May 15, 2024 · 4 comments

Comments

@thoffma
Copy link

thoffma commented May 15, 2024

It seems, that host_name is defined in start.py but is not used for the cmd construct. So, currently the setting of host_name in a Qleverfile is ignored.

    def relevant_qleverfile_arguments(self) -> dict[str: list[str]]:
        return {"data": ["name", "description", "text_description"],
                "server": ["server_binary", "host_name", "port",
                           "access_token", "memory_for_queries",
                           "cache_max_size", "cache_max_size_single_entry",
                           "cache_max_num_entries", "num_threads",
                           "timeout", "only_pso_and_pos_permutations",
                           "use_patterns", "use_text_index",
                           "warmup_cmd"],
                "runtime": ["system", "image", "server_container"]}
# Construct the command line based on the config file.
        start_cmd = (f"{args.server_binary}"
                     f" -i {args.name}"
                     f" -j {args.num_threads}"
                     f" -p {args.port}"
                     f" -m {args.memory_for_queries}"
                     f" -c {args.cache_max_size}"
                     f" -e {args.cache_max_size_single_entry}"
                     f" -k {args.cache_max_num_entries}") 
@hannahbast
Copy link
Member

@thoffma Thanks for pointing this out to us. I don't think the host name is relevant for the start command. Is there a specific behavior that you were expecting by setting the HOST_NAME variable in the Qleverfile?

@thoffma
Copy link
Author

thoffma commented May 23, 2024

The server should run on a different address instead of localhost. I have not yet found out where I can tell qlever this.
In the start options, host-name is listed, but it does nothing.

--host-name HOST_NAME            The name of the host on which the server listens for requests [default: myhost.de]
--port PORT           The port on which the server listens for requests [default, from Qleverfile: 7001]

@Qup42
Copy link
Member

Qup42 commented May 24, 2024

host_name is used in start, ui and cache_stats. ui uses it to set the location of the server. This is useful if I am developing remotely on my laptop and the engine and ui run on a different machine than the one used to access the web ui. The engine always listens on 0.0.0.0 (all interfaces), so the option does not really make sense for the engine itself. start and ui both curl the engine but are hard coded to localhost. I think that these commands are only useful for the local test instance, because you have to be on the machine to execute them. So maybe remove host_name for start and cache_stats?

@thoffma
Copy link
Author

thoffma commented May 28, 2024

Thanks for the clarification. I was a bit confused by that. I thought I could customize the address of the engine, but that's not necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants