Closed cbartz closed 5 months ago
Hi @cbartz Thanks for your issue. Only 5/edge
supports Juju 2.9
and we plan to drop support to 5/edge
very soon.
Please use Juju 3
:)
I will create a JIRA ticket to update the docs to mention that we only support 3+ on Charmed MongoDB6
. Thank you very much for helping us improve our documentation :)
@MiaAltieri Thank you for this information. Are cross-model relations with a mongodb_client consumer from a juju 2.9 model supported?
I see secret-related information in the databag
╰─$ juju show-unit data-integrator/0
data-integrator/0:
opened-ports: []
charm: ch:amd64/jammy/data-integrator-21
leader: true
life: alive
relation-info:
- relation-id: 21
endpoint: data-integrator-peers
related-endpoint: data-integrator-peers
application-data:
mongodb: ACTIVE
local-unit:
in-scope: true
data:
egress-subnets: 10.152.183.23/32
ingress-address: 10.152.183.23
private-address: 10.152.183.23
- relation-id: 22
endpoint: mongodb
cross-model: true
related-endpoint: database
application-data:
data: '{"database": "test-database", "external-node-connectivity": "true", "requested-secrets":
"[\"username\", \"password\", \"tls\", \"tls-ca\", \"uris\"]"}'
database: test-database
endpoints: 10.33.194.75
replset: mongodb
secret-user: secret://b0a940a2-3e33-4f38-81fd-73d93ab544ac/cnompr2knc4j9aa9vb80
related-units:
mongodb/0:
in-scope: true
data:
egress-subnets: 10.33.194.75/32
ingress-address: 10.33.194.75
private-address: 10.33.194.75
provider-id: data-integrator-0
address: 10.1.225.164
on. Are cross-model relations with a mongodb_client consumer from a juju 2.9 model supported?
I believe no - since in older implementations of Charmed MongoDB on Juju 2.9
(i.e. the 5/edge
charm) - we shared client relation data on the mongodb_client
interface directly in the relation_databag (i.e. URI, passwords, etc) - But in now, Juju 3
we use Juju Secrets, meaning that sensitive information in the mongodb_client
interface is now shared in secrets (i.e. the secret-user
field you have shared above) To view the contents of that secret you can do juju show-secret --reveal secret://b0a940a2-3e33-4f38-81fd-73d93ab544ac/cnompr2knc4j9aa9vb80
It might be possible that Juju has ways of reading secrets in Juju 2.9, but I am not sure if that functionality exists or not. If you would like I can ask a Juju Secrets expert from our team. :)
I did a quick test creating a cmr with juju 2.9, it seems to work (relation databag looks different)
╰─$ juju_29 show-unit data-integrator/0 130 ↵
data-integrator/0:
opened-ports: []
charm: ch:amd64/jammy/data-integrator-21
leader: true
life: alive
relation-info:
- relation-id: 0
endpoint: data-integrator-peers
related-endpoint: data-integrator-peers
application-data:
mongodb: ACTIVE
local-unit:
in-scope: true
data:
egress-subnets: 10.152.183.160/32
ingress-address: 10.152.183.160
private-address: 10.152.183.160
- relation-id: 1
endpoint: mongodb
cross-model: true
related-endpoint: database
application-data:
data: '{"database": "test-database", "external-node-connectivity": "true"}'
database: test-database
endpoints: 10.33.194.75
password: Wvwg8kqQqHRnsfY83h6QC5gZAl5Hy1sd
replset: mongodb
uris: mongodb://relation-3:Wvwg8kqQqHRnsfY83h6QC5gZAl5Hy1sd@10.33.194.75/test-database?replicaSet=mongodb&authSource=admin
username: relation-3
related-units:
mongodb/0:
in-scope: true
data:
egress-subnets: 10.33.194.75/32
ingress-address: 10.33.194.75
private-address: 10.33.194.75
provider-id: data-integrator-0
address: 10.1.225.166
@MiaAltieri It seems the docs are still not updated, have you created the JIRA ticket?
@cbartz - My apologies. I have now added something in the overview page to reflect that the charm operates on Juju 3. The tutorial also instructs the reader to deploy the charm on Juju 3. Is this what you would expect to see?
I can ask our docs team if it is needed on every single documentation page.
@cbartz - My apologies. I have now added something in the overview page to reflect that the charm operates on Juju 3. The tutorial also instructs the reader to deploy the charm on Juju 3. Is this what you would expect to see?
I can ask our docs team if it is needed on every single documentation page.
@MiaAltieri I would expect something like this, but mentioning that juju 2.9 is not supported.
As for the tutorial, I found https://github.com/canonical/mongodb-operator/blob/6/edge/docs/tutorial/t-setup-environment.md#install-and-prepare-juju which shows juju 2.9 as status output.
Hi @cbartz - thanks for this.
AFAICT we do specify the minimum requirements and state juju v3.0 or higher - is what your see here sufficient? If not, please let me know and I will correct it immediately
As for the tutorial - please view charmhub/discourse - By default Canonical uses Discourse / Charmhub as their default place for storing/viewing documentation. What we have here is part of a github workflow that is currently a WIP.
But this is a good reminder. I should remove what docs we have in the repo until this workflow is corrected. I will add you to that PR
@MiaAltieri Hi, thank you. The documentation on charmhub.io/mongodb has a problem in my browser (cannot open certain sections), so I missed it.
Hi @cbartz - yes unfortunately there is something wrong with Charmhub, from what I can tell from our internal message board it seems that the webteam is working to address it
Steps to reproduce
Use juju 2.9.46
Expected behavior
The app goes in active status. Non-support for juju 2.9 is nowhere mentioned, so I expect the charm to support it.
Actual behavior
The app goes into error state with the message hook failed: "install" . The reason seems to be that juju 2.9 does not support secrets (see log output below).
Versions
Operating system: Ubuntu 22.04.4 LTS
Juju CLI: 2.9.46-ubuntu-amd64
Juju agent: 2.9.46
Charm revision: 149 and 154
LXD: 5.0.3
Log output
Juju debug log:
Additional context