[enhancement] partition tagging is not supported
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Unassigned | ||
2.3 |
Fix Released
|
High
|
Blake Rouse | ||
2.4 |
Fix Released
|
High
|
Unassigned | ||
MAAS |
Fix Released
|
High
|
Blake Rouse |
Bug Description
Tagging a block device is possible, tagging a partition is not.
juju storage allows one to create storage pools based on tags.
A usage example would be:
juju create-storage-pool osd-devices maas tags=data
and then somewhere in a charm:
storage-get -s <storage-id> <attribute>
storage-get -s data/0 location
# would return something like /dev/sdb1
The lack of partition tagging doesn't allow one to utilize partitions with juju storage.
ubuntu@maas:~$ maas maas version read
Success.
Machine-readable output follows:
{"version": "2.3.0~alpha1", "capabilities": ["networks-
http://
ubuntu@maas:~$ maas maas block-device add-tag rw7fq3 53 tag=part-tag
Not Found
ubuntu@maas:~$ maas maas block-device add-tag rw7fq3 42 tag=part-tag
Success.
Machine-readable output follows:
{
"available_
"name": "sdb",
"id": 42,
"used_for": "GPT partitioned with 1 partition",
"tags": [
"rotary",
"data",
"part-tag"
],
"path": "/dev/disk/
"model": "QEMU HARDDISK",
"partition_
"system_id": "rw7fq3",
"type": "physical",
"filesystem": null,
"size": 68719476736,
"resource_uri": "/MAAS/
"serial": "drive-
"block_size": 4096,
"used_size": 30002905088,
"partitions": [
{
"path": "/dev/disk/
"size": 29997662208,
"id": 53,
"type": "partition",
"uuid": "b5739ebc-
}
],
"id_path": "/dev/disk/
"uuid": null
}
Related branches
- MAAS Lander: Needs Fixing
- Andres Rodriguez (community): Approve
- Lee Trager (community): Approve
-
Diff: 779 lines (+439/-32)11 files modifiedsrc/maasserver/api/partitions.py (+40/-0)
src/maasserver/api/tests/test_partitions.py (+59/-1)
src/maasserver/migrations/builtin/maasserver/0172_partition_tags.py (+24/-0)
src/maasserver/models/partition.py (+31/-0)
src/maasserver/models/tests/test_partition.py (+80/-0)
src/maasserver/node_constraint_filter_forms.py (+80/-21)
src/maasserver/testing/factory.py (+4/-2)
src/maasserver/tests/test_node_constraint_filter_forms.py (+97/-1)
src/maasserver/websockets/handlers/machine.py (+10/-3)
src/maasserver/websockets/handlers/node.py (+6/-0)
src/maasserver/websockets/handlers/tests/test_machine.py (+8/-4)
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
milestone: | none → next |
tags: | added: internal |
tags: | added: cpe-onsite |
Changed in maas: | |
importance: | Wishlist → Undecided |
summary: |
- [2.3.x] partition tagging is not supported + [enhancement] partition tagging is not supported |
Changed in maas: | |
milestone: | next → 2.5.0alpha2 |
tags: | added: track |
Changed in maas: | |
importance: | Undecided → High |
Changed in maas: | |
milestone: | 2.5.0alpha2 → 2.5.0beta1 |
Changed in maas: | |
assignee: | nobody → Blake Rouse (blake-rouse) |
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Changed in juju: | |
status: | Triaged → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
Hi Dmitrii,
For partition tagging, I just want to clarify something:
1. Would you want to add any tag, or would you want maas to add a prefix/suffix for the tag. e.g. you adding the tag 'blah' on part1, would you expect the tag to be 'blah-part1' ?
2. Would you be expected to add a tag to a partition that's the same for a block-device ? e.g. sda -> nvme , sdb-part1 -> nvme?
3. If (2) is true, how would you expect to differentiate between a partition and a block device when requesting a machine ?