Cannot remove application with storage (k8s)

Bug #1997469 reported by Maksim Beliaev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Unassigned

Bug Description

Tested in multipass and on AWS VM

deploy postgres and add a relation to the app that will cause psql to create a database.
Then try to remove application and destroy storage. Application hangs forever.

postgresql-k8s/0 unknown lost 10.1.59.73 agent lost, see 'juju show-status-log postgresql-k8s/0'

Script to reproduce:

# Configure LXD:
lxd init --auto
sudo snap install microk8s --channel 1.25-strict/stable
# Add the 'ubuntu' user to the Microk8s group:
sudo usermod -a -G snap_microk8s ubuntu
# Give the 'ubuntu' user permissions to read the ~/.kube directory:
sudo chown -f -R ubuntu ~/.kube
exit

sudo microk8s enable hostpath-storage dns
sudo snap install juju --channel 3.0/stable
mkdir -p ~/.local/share
# Install a "juju" controller into your "microk8s" cloud. We'll name ours "tutorial-controller".
juju bootstrap microk8s tutorial-controller
# Create a workspace, or 'model', on this controller. We'll call ours "charm-model".
juju add-model charm-model

juju deploy postgresql-k8s --channel edge
juju deploy mattermost-k8s
juju status --watch 2s
juju integrate mattermost-k8s:db postgresql-k8s:db

juju status --watch 2s
juju remove-application postgresql-k8s --destroy-storage
juju status --watch 2s

Additional data:

ubuntu@ip-172-31-11-229:~$ juju version
3.0.0-genericlinux-amd64
ubuntu@ip-172-31-11-229:~$ microk8s version
MicroK8s v1.25.3 revision 4127
ubuntu@ip-172-31-11-229:~$ lxd version
5.0.1
ubuntu@ip-172-31-11-229:~$ lsb_release
No LSB modules are available.
ubuntu@ip-172-31-11-229:~$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
ubuntu@ip-172-31-11-229:~$ juju clouds
Only clouds with registered credentials are shown.
There are more clouds, use --all to see them.

Clouds available on the controller:
Cloud Regions Default Type
microk8s 1 localhost k8s

Clouds available on the client:
Cloud Regions Default Type Credentials Source Description
localhost 1 localhost lxd 0 built-in LXD Container Hypervisor
microk8s 1 localhost k8s 1 built-in A Kubernetes Cluster

summary: - Cannot remove applcacation with storage (k8s)
+ Cannot remove application with storage (k8s)
Harry Pidcock (hpidcock)
Changed in juju:
importance: Undecided → High
milestone: none → 3.0.4
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.