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

Charm cannot be installed on an Juju managed LXD machine. #354

Closed
moisesbenzan opened this issue Feb 13, 2024 · 10 comments
Closed

Charm cannot be installed on an Juju managed LXD machine. #354

moisesbenzan opened this issue Feb 13, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@moisesbenzan
Copy link

Steps to reproduce

  1. juju deploy --channel 14/edge --model postgresql --to lxd postgresql

Expected behavior

Unit would be assigned correctly to an LXD machine provisioned via Juju

Actual behavior

Model       Controller       Cloud/Region   Version  SLA          Timestamp
postgresql  foundations-aws  aws/us-east-1  3.1.7    unsupported  23:21:51

App         Version  Status  Scale  Charm       Channel  Rev  Exposed  Message
postgresql           error     0/1  postgresql  14/edge  367  no       cannot assign unit "postgresql/0" to machine 0/lxd/0: adding storage to lxd container not supported

Unit          Workload  Agent  Machine  Public address  Ports  Message
postgresql/0  error     lost                                   cannot assign unit "postgresql/0" to machine 0/lxd/0: adding storage to lxd container not supported

Machine  State    Address  Inst id  Base          AZ  Message
0        pending           pending  ubuntu@22.04      Verifying availability zone
0/lxd/0  pending           pending  ubuntu@22.04      

Versions

Operating system: Ubuntu 22.04

Juju CLI: 3.1.7

Juju agent: 3.1.7

Charm revision: 14/edge 367

LXD: 5.0.3-51452c3, rev. 26881

Log output

Juju debug log: Not captured in this run.

Additional context

@moisesbenzan moisesbenzan added the bug Something isn't working label Feb 13, 2024
Copy link
Contributor

@dragomirp
Copy link
Contributor

Hi, @moisesbenzan, are there any storage pools available to Juju? It looks to me that Juju can't provision a volume for Postgresql.

@taurus-forever
Copy link
Contributor

@moisesbenzan Is it still reproducible after adding storage pool?
@dragomirp anything we can add to our charm to print better error message/hint to users?

@dragomirp
Copy link
Contributor

I think this behaviour is entirely controlled by Juju.

@jeffreychang911
Copy link

jeffreychang911 commented Apr 2, 2024

Below is my test on top of openstack.

Confirm there's cinder storage-pools available.
ubuntu@lab1-silo1-cpe-d05f9225-46c2-4172-b113-4ec9bf8c0968:~/project$ juju storage-pools
Name Provider Attributes
cinder cinder
loop loop
rootfs rootfs
tmpfs tmpfs

Deploy postgresql with juju deploy --channel 14/stable --model postgresql postgresql --to lxd --storage pgdata=cinder,1G,
but still got same error, cannot assign unit "postgresql/0" to machine 0/lxd/0: adding storage to lxd container not supported

Found an old discussion - https://chat.charmhub.io/charmhub/pl/obumb6guybf8fmm4jhj9w1tuxh, which seems to be a charm problem?
And same problem also happens to mysql canonical/mysql-operator#408

@phvalguima
Copy link

Hi @jeffreychang911 @moisesbenzan that behavior is controlled by juju. I have issued this bug with them: https://bugs.launchpad.net/juju/+bug/2060098

Would be nice meanwhile to avoid LXCs for DB and deploy the workloads directly on VMs instead.

@taurus-forever
Copy link
Contributor

My $0.05, I second to @dragomirp and @phvalguima: it is the current limitation of Juju, IMHO.

re: Found an old discussion - https://chat.charmhub.io/charmhub/pl/obumb6guybf8fmm4jhj9w1tuxh, which seems to be a charm problem?

@jeffreychang911 I disagree. The reply there is: ... the ubuntu charm recently added the use of (Juju) storage which is not supported for lxd containers (inside VMs as for now?). You can use an older version of the ubuntu charm (which is not using Juju storage). My commends added there inside into (...).

All the modern Data team charms (PostgreSQL, MySQL, MongoDB, ... ) uses juju storage. Let's continue in https://bugs.launchpad.net/juju/+bug/2060098 and see the Juju team feedback there.

P.S. we are happy to improve something on our side here, but on this stage our charm.py code is not yet even launched.

@taurus-forever
Copy link
Contributor

We've got reply from Juju Team: Juju doesn't support this. (c) https://bugs.launchpad.net/juju/+bug/2060098/comments/1

Resolved as nothing to fix in PostgreSQL charm?

@jeffreychang911
Copy link

That would be ok, thanks.

@taurus-forever
Copy link
Contributor

Resolving as agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants