inveniosoftware / inveniosoftware/invenio-cli

invenio-cli services status does not use invenio.cfg for opensearch host/port

Open
#337 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Python
Stars
14
Forks
49
PR merge metrics
No merged PRs in 30d

Description

Package version (if known): 1.0.13

## Describe the bug
Invenio-cli checks connection to opensearch via the following lines:

[source code](https://github.com/inveniosoftware/invenio-cli/blob/master/invenio_cli/commands/services_health.py#L33)

```python
return run_cmd(
["curl", "-f", "localhost:9200/_cluster/health?wait_for_status=yellow"]
)
```

If elasticsearch runs on different host or port, this check fails.

## Steps to Reproduce
1. Install RDM site
2. Change port mapping in docker-services.yaml and set opensearch local port to a different value
3. Run invenio-cli services status
4. This will fail

## Expected behavior

The host, port and authorization info should be read from the invenio.cfg.

I can make a pull request (using the requests module which is already in the dependencies) if it helps.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.