[2.7.0][caas] removing an application with block storage fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Ian Booth |
Bug Description
juju remove-application --force test
removing application test failed: BlockStorage instance not implemented
storage:
database:
type: filesystem
location: /srv/mysql
backup:
type: block
multiple:
range: 0-
stash:
type: block
multiple:
range: 0-
# from bash history
juju deploy ./ test0 --storage 'database=
juju run --unit test/0 'storage-list'
juju run --unit test/0 'storage-add backup count=1'
juju run --unit test/0 'storage-list'
juju remove-application --force test
juju remove-application --force test
removing application test failed: BlockStorage instance not implemented
---------------
The root cause seems to be that Juju allows this situation to happen in the first place by not properly validating storage constraints:
1) When backup=loop,100M is used to deploy a k8s charm without any file system storage the error is present at the deploy time;
2) when both file system storage and block storage constraints are present, the error is not thrown:
'database-
1)
juju deploy ./ test --storage 'backup=loop,100M stash=loop,100M' --debug
12:28:37 INFO juju.cmd supercommand.go:80 running juju [2.7.0 gc go1.10.4]
12:28:37 DEBUG juju.cmd supercommand.go:81 args: []string{
12:28:37 INFO juju.juju api.go:67 connecting to API addresses: [10.152.
12:28:37 DEBUG juju.api apiclient.go:1092 successfully dialed "wss://
12:28:37 INFO juju.api apiclient.go:624 connection established to "wss://
12:28:37 INFO juju.juju api.go:67 connecting to API addresses: [10.152.
12:28:37 DEBUG juju.api apiclient.go:1092 successfully dialed "wss://
12:28:37 INFO juju.api apiclient.go:624 connection established to "wss://
12:28:37 DEBUG httpbakery client.go:243 client do POST https:/
12:28:38 DEBUG httpbakery client.go:245 } -> error <nil>
12:28:38 INFO cmd deploy.go:1460 Deploying charm "local:
12:28:38 DEBUG juju.api monitor.go:35 RPC connection died
ERROR getting workload storage params for "test": storage provider "loop" not valid
12:28:38 DEBUG cmd supercommand.go:519 error stack:
getting workload storage params for "test": storage provider "loop" not valid
/build/
/build/
/build/
/build/
2)
juju deploy ./ test --storage 'database-
12:28:54 INFO juju.cmd supercommand.go:80 running juju [2.7.0 gc go1.10.4]
12:28:54 DEBUG juju.cmd supercommand.go:81 args: []string{
12:28:54 INFO juju.juju api.go:67 connecting to API addresses: [10.152.
12:28:54 DEBUG juju.api apiclient.go:1092 successfully dialed "wss://
12:28:54 INFO juju.api apiclient.go:624 connection established to "wss://
12:28:54 INFO juju.juju api.go:67 connecting to API addresses: [10.152.
12:28:54 DEBUG juju.api apiclient.go:1092 successfully dialed "wss://
12:28:54 INFO juju.api apiclient.go:624 connection established to "wss://
12:28:54 DEBUG httpbakery client.go:243 client do POST https:/
12:28:55 DEBUG httpbakery client.go:245 } -> error <nil>
12:28:55 INFO cmd deploy.go:1460 Deploying charm "local:
12:28:56 DEBUG juju.api monitor.go:35 RPC connection died
12:28:56 INFO cmd supercommand.go:525 command finished
cat metadata.yaml
name: wordpress
summary: WordPress
maintainer: Operator Framework Developers https:/
description: |
WordPress CMS charm.
tags:
- blog
series:
- kubernetes
requires:
db:
interface: mysql
storage:
database-a:
type: filesystem
location: /srv/mysqla
database-b:
type: filesystem
location: /srv/mysqlb
database-c:
type: filesystem
location: /srv/mysqlc
backup:
type: block
multiple:
range: 0-
stash:
type: block
multiple:
range: 0-
An error message is present in the log after the deployment time:
application-test: 12:29:15 ERROR juju.worker.
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in juju: | |
milestone: | none → 2.7.1 |
status: | New → Triaged |
importance: | Undecided → High |
Changed in juju: | |
milestone: | 2.7.1 → 2.7.2 |
Changed in juju: | |
milestone: | 2.7.2 → 2.7.3 |
Changed in juju: | |
milestone: | 2.7.3 → 2.7.4 |
Changed in juju: | |
milestone: | 2.7.4 → 2.7.5 |
Changed in juju: | |
milestone: | 2.7.5 → 2.7.6 |
Changed in juju: | |
milestone: | 2.7.6 → 2.8-rc1 |
Changed in juju: | |
assignee: | nobody → Yang Kelvin Liu (kelvin.liu) |
status: | Triaged → In Progress |
Changed in juju: | |
status: | In Progress → Triaged |
Changed in juju: | |
milestone: | 2.8-rc1 → none |
Changed in juju: | |
milestone: | none → 2.8-rc2 |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
Hi Dmitrii,
I have reviewed the bug and it looks to me like an error with the command line args for storage constraints. Reviewing the code and multiple storage constraints cannot be provided in the one argument to --storage. I have done a PR here https:/ /github. com/juju/ juju/pull/ 10998 that should more explicitly error on the above conditions.