Comment 2 for bug 1878086

Revision history for this message
Vladimir Grevtsev (vlgrevtsev) wrote :

Well, --force makes difference sometimes, but not this time:

ubuntu@ubuntu:~/Canonical/charm-k8s-prometheus$ juju bootstrap microk8s mk8s
Creating Juju controller "mk8s" on microk8s/localhost
Creating k8s resources for controller "controller-mk8s"
Downloading images
Starting controller pod
Bootstrap agent now started
Contacting Juju controller at 10.152.183.180 to verify accessibility...

Bootstrap complete, controller "mk8s" is now available in namespace "controller-mk8s"

Now you can run
 juju add-model <model-name>
to create a new model to deploy k8s workloads.
ubuntu@ubuntu:~/Canonical/charm-k8s-prometheus$ juju deploy . --resource prometheus-image=prom/prometheus:latest
Deploying charm "local:kubernetes/prometheus-0".
ubuntu@ubuntu:~/Canonical/charm-k8s-prometheus$ juju status
Model Controller Cloud/Region Version SLA Timestamp
controller mk8s microk8s/localhost 2.8.1 unsupported 17:39:06+03:00

App Version Status Scale Charm Store Rev OS Address Notes
prometheus error 1 prometheus local 0 kubernetes hook failed: "start"

Unit Workload Agent Address Ports Message
prometheus/0* error idle hook failed: "start"

ubuntu@ubuntu:~/Canonical/charm-k8s-prometheus$ juju destroy-model controller
WARNING! This command will destroy the "controller" model.
This includes all containers, applications, data and other resources.

Continue [y/N]? y
Destroying modelERROR cannot destroy model "controller"

The model has persistent storage remaining:
 1 volume and 1 filesystem

To destroy the storage, run the destroy-model
command again with the "--destroy-storage" option.

To release the storage from Juju's management
without destroying it, use the "--release-storage"
option instead. The storage can then be imported
into another Juju model.

ubuntu@ubuntu:~/Canonical/charm-k8s-prometheus$ juju destroy-model controller --destroy-storage --force
WARNING! This command will destroy the "controller" model.
This includes all containers, applications, data and other resources.

Continue [y/N]? y
Destroying model
Waiting for model to be removed, 1 application(s), 1 volume(s), 1 filesystems(s)....
Waiting for model to be removed, 1 application(s), 1 volume(s)....
Waiting for model to be removed, 1 application(s)...............................
.................
Waiting for model to be removed.................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
.ERROR timeout after 30m0s timeout