Cannot deploy k8s charm with multiple stores

Bug #1977775 reported by Leon
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

According to [1], multiple stores are specified as follows:

storage:
  database:
    type: filesystem
    multiple: 3-5

But deploying this errors out with:

ERROR attempting to deploy "./prometheus-k8s_ubuntu-20.04-amd64.charm": metadata: storage.database.multiple: expected map, got string("3-5")

According to [2], multiple stores are specified as follows:

storage:
  database:
    type: filesystem
    multiple:
      range: 3-5

But deploying this errors out with:

ERROR juju.worker.caasapplicationprovisioner.runner exited "prometheus-k8s": ensuring application "prometheus-k8s": duplicated storage name "database" for "prometheus-k8s" not valid

[1]: https://juju.is/docs/sdk/metadata-reference
[2]: https://juju.is/docs/sdk/storage

Leon (sed-i)
summary: - Errors deploying k8s charm with multiple stores
+ Cannot deploy k8s charm with multiple stores
Revision history for this message
Harry Pidcock (hpidcock) wrote :

Thanks for the bug report. This is indeed a bug, but I'd like to understand your use case for this? Just so we can make sure it works as expected in Kubernetes.

Changed in juju:
importance: Undecided → Medium
milestone: none → 2.9-next
status: New → Triaged
Revision history for this message
Leon (sed-i) wrote :

That's an excellent question.

Given the fact that metadata.yaml mount points seem to not support multiple stores,

    mounts:
      - storage: database
        location: /var/lib/prometheus

i.e. there is no way to map between mounted location in the workload (/var/lib/prometheus) and mounted locations in the charm container (/var/lib/juju/storage/<name>/<num>), it indeed seems that:

> "Juju does not currently support multiple storage instances for charms using “containers” functionality." [1]

Regardless, I don't think I have a use case at all: prometheus, in this example, does not support splitting its db across multiple volumes.

But this originally came up because I was trying to see if a PVC's capacity could change from one store instance to another. [2]

[1]: https://juju.is/docs/sdk/storage#heading--storage-model
[2]: https://github.com/canonical/prometheus-k8s-operator/pull/295/files

Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This Medium-priority bug has not been updated in 60 days, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: Medium → Low
tags: added: expirebugs-bot
Harry Pidcock (hpidcock)
Changed in juju:
milestone: 2.9-next → 3.2-beta1
Changed in juju:
milestone: 3.2-beta1 → 3.2-rc1
Changed in juju:
milestone: 3.2-rc1 → 3.2.0
Changed in juju:
milestone: 3.2.0 → 3.2.1
Changed in juju:
milestone: 3.2.1 → 3.2.2
Changed in juju:
milestone: 3.2.2 → 3.2.3
Changed in juju:
milestone: 3.2.3 → 3.2.4
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.