If a workload annotation has a key with spaces in it, filtering doesn't work
Bug #1928098 reported by
Björn Tillenius
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Alberto Donato |
Bug Description
This with MAAS 3.0.0~rc1-
Create a workload annotation where the key has a space in it:
maas $profile machine set-owner-data $systemid "my key"="my value"
Now if you go to the machine details page, you'll see that "my value" is a link that takes you to the machine listing with the following filter set:
workload-my key:(my value)
The space in there makes it now work.
Looks like we either have to escape the spaces somehow in the UI, or restrict the keys to not contain spaces.
Related branches
~ack/maas:1928098-workload-annotation-keys-format
Merged
into
maas:master
- Björn Tillenius: Approve
- MAAS Lander: Approve
-
Diff: 228 lines (+90/-24)5 files modifiedsrc/maasserver/migrations/maasserver/0240_ownerdata_key_fix.py (+42/-0)
src/maasserver/models/ownerdata.py (+15/-12)
src/maasserver/models/tests/test_ownerdata.py (+7/-0)
src/maasserver/websockets/handlers/machine.py (+4/-1)
src/maasserver/websockets/handlers/tests/test_machine.py (+22/-11)
Changed in maas: | |
milestone: | none → 3.0.1 |
Changed in maas: | |
milestone: | 3.0.1 → 3.0.0-rc1 |
Changed in maas: | |
assignee: | nobody → Alberto Donato (ack) |
status: | New → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Note that characters like :, (, and ) also cause problem. So we probably want to restrict keys to only contain certain characters, like alphanumeric, _, ., -