canonical / canonical/jhack

`show-relation` fails on cross model relations with alias

Open
#178 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
60
Forks
31
Avg merge
2d 15h
Merged PRs (30d)
1

Description

On a cross model relation with an offer made with an alias, the `show-relation` sub-command is unable to resolve the app from both the "offerer" and the "consumer" models.

Model `dev`:
```
juju deploy opensearch main
juju offer main:peer-cluster-orchestrator main-orchestrator
```

Model `dev1`:
```
juju deploy opensearch data
juju integrate data:peer-cluster admin/dev.main-orchestrator
```
------
Then from the model `dev1`:
```
jhack show-relation main-orchestrator:peer-cluster-orchestrator data:peer-cluster

===> KeyError: 'main-orchestrator'
```

or by specifying the model name:
```
jhack show-relation -m dev main-orchestrator:peer-cluster-orchestrator data:peer-cluster

===> RuntimeError: No relation found with endpoints 'main-orchestrator:peer-cluster-orchestrator' -> 'data:peer-cluster' in model 'dev'. 'data' not found in model 'dev'
```
-----

jhack version: `0.4.3.1`

-----
Simplified juju status:
```
Model Controller Cloud/Region Version SLA Timestamp
dev1 lxd localhost/localhost 3.4.5 unsupported 16:14:28Z

SAAS Status Store URL
main unknown lxd admin/dev.main
main-orchestrator active lxd admin/dev.main-orchestrator

App Version Status Scale Charm Channel Rev Exposed Message
data active. 3 opensearch 0 no

Unit Workload Agent Machine Public address Ports Message
data/0* active idle 0 10.122.32.14
data/1 active idle 1 10.122.32.134
data/2 active idle 2 10.122.32.195

Machine State Address Inst id Base AZ Message
0 started 10.122.32.14 juju-075bd2-0 ubuntu@22.04 Running
1 started 10.122.32.134 juju-075bd2-1 ubuntu@22.04 Running
2 started 10.122.32.195 juju-075bd2-2 ubuntu@22.04 Running

Integration provider Requirer Interface Type Message
main-orchestrator:peer-cluster-orchestrator data:peer-cluster peer_cluster regular
```

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.