juju status
...
App Version Status Scale Charm Channel Rev Exposed Message
psql-fail error 0/1 postgresql 14/stable 363 no cannot assign unit "psql-fail/0" to machine 2/lxd/0: adding storage to lxd container not supported
Unit Workload Agent Machine Public address Ports Message
psql-fail/0 error lost cannot assign unit "psql-fail/0" to machine 2/lxd/0: adding storage to lxd container not supported
...
```
I believe `--to lxd` confused SQA Team... and they should use `add-machine && deploy --to $id` as above.
Maybe we should document this somewhere.
Thank you John for the quick answer.
Just for the history only. Simplified steps to reproduce (inside VM or just on your laptop):
```
juju add-model teststorage # juju 3.4.1 (rev 26895), lxd 5.20-f3dd836 (rev 27049)
juju deploy postgresql psql-ok1 --channel 14/stable # ALL OK, our default testcase
juju add-machine
juju deploy postgresql psql-ok2 --channel 14/stable --to 1 # ALL OK, if container manually specified
juju deploy postgresql psql-fail --channel 14/stable --to lxd # ERROR (for container `2/lxd/0` inside the container `2`?)
juju status
...
App Version Status Scale Charm Channel Rev Exposed Message
psql-fail error 0/1 postgresql 14/stable 363 no cannot assign unit "psql-fail/0" to machine 2/lxd/0: adding storage to lxd container not supported
Unit Workload Agent Machine Public address Ports Message
psql-fail/0 error lost cannot assign unit "psql-fail/0" to machine 2/lxd/0: adding storage to lxd container not supported
...
```
I believe `--to lxd` confused SQA Team... and they should use `add-machine && deploy --to $id` as above.
Maybe we should document this somewhere.