Charm not starting when re-using storage on jaas + AWS

Bug #1957164 reported by Erik Lönroth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Undecided
Unassigned

Bug Description

I'm deploying a nextcloud charm on AWS with jaas. My charm has storage defined.

When I remove the last nextcloud unit and do a "juju add-unit nextcloud --attach-storage datadir/0" (To re-use the storage on a new unit)

The agent seems to get stuck on "agent initializing". See attach screenshot that covers most of it.

I'm not sure where to debug.

Revision history for this message
Erik Lönroth (erik-lonroth) wrote :
Revision history for this message
Erik Lönroth (erik-lonroth) wrote :

This is what I do to reproduce this consistently

## Deploy with storage

    juju deploy postgresql
    juju deploy ./nextcloud_ubuntu-20.04-amd64_ubuntu-18.04-amd64.charm --storage datadir=ebs,1G
    juju relate nextcloud:db postgresql:db

## Remove unit and reattach storage
    juju remove-unit nextcloud/0
    juju add-unit nextcloud --attach-storage datadir/0

Revision history for this message
Erik Lönroth (erik-lonroth) wrote :

I can reproduce this again with this charm: https://github.com/erik78se/juju-operators-examples/tree/main/storage-filesystem

So, basically I think that the storage with aws must be broken.

I can only attach back storage to the same unit after detaching it.

Steps to reproduce:

* Build the charm "storage-filesystem"

# Deploy the charm
* juju deploy storage-filesystem

# Add storage to it
* juju add-storage storage-filesystem/0 logdata=ebs,1,200M

# Detach it
* juju detach-storage logdata/0

# Add a second unit
* juju add-unit storage-filesystem.

# Try attach the storage to the new unit
* juju attach-storage storage-filesystem/1 logdata/0

Expected: It would attach the storage to the second unit.

Outcome: It does not attach the storage.

Note: It can be "re-attached" to the first unit.

# re-attach
* juju attach-storage storage-filesystem/0 logdata/0

Revision history for this message
Ian Booth (wallyworld) wrote :

When add-unit is run without options, the new unit will attempt to create *new* storage and will block in initialising until that storage is attached to the machine hosting the unit. Running juju status --storage or looking at the logs should show if there's been any issue doing this.

If you want to add a new unit and reuse storage from the start, you need the --attach-storage option.

juju add-unit storage-filesystem --attach-storage logdata/0

Can you try the above.

Also, for the failure case(s), it would be interesting to set some TRACE logging on "juju.apiserver.storagecommon" and see why the pairing up of the provisioned storage and juju model is failing.

Changed in juju:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.