no swap if block-device-mapping of /dev/vdb=swap
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Isaku Yamahata |
Bug Description
Assuming:
nova-manage instance_type create --flavor=0 --memory=512 --local_gb=2 --swap=512 --cpu=1 --name "m1.xsmall"
Running m1.xsmall instances like the following yeilds the given output:
A. <no block device mappings>
md: { ami: vda, root: /dev/vda, ephemeral0: /dev/vdb, swap: /dev/vdc }
disks: vda, vdb(ephemeral0), vdc(swap)
B. /dev/vdb=swap /dev/vdc=ephemeral0
md: { ami: vda, root: /dev/vda, ephemeral0: /dev/vdc }
disks: vdb(ephemeral0)
C. /dev/vdc=ephemeral0
md: { ami: vda, root: /dev/vda, ephemeral0: /dev/vdc }
disks: vda, vdb(ephemeral0)
D. /dev/vdb=ephemeral0
md: { ami: vda, root: /dev/vda, swap: /dev/vdc, ephemeral0: /dev/vdb }
disks: vda, vdb(ephemeral0), vdc(swap)
E. /dev/vdb=ephemeral0 /dev/vdc=swap
md: { ami: vda, root: /dev/vda, ephemeral0: /dev/vdb, swap: /dev/vdc }
disks: vda, vdb(ephemeral0), vdc(swap)
Above 'md' means data pulled from the instance's metadata service, 'disks' are disks actually seen to the instance.
Basically, above, if you specify swap "wrong", then you just lose it.
This is a low priority issue really. The user just needs to know that if the instance-type has swap, and they want to use it, they have to specify block device mappings correctly or not at all.
Related branches
- Devin Carlen (community): Approve
- Vish Ishaya (community): Approve
-
Diff: 91 lines (+30/-25)2 files modifiednova/compute/api.py (+21/-20)
nova/tests/test_compute.py (+9/-5)
- OpenStack release team: Pending requested
-
Diff: 91 lines (+30/-25)2 files modifiednova/compute/api.py (+21/-20)
nova/tests/test_compute.py (+9/-5)
Changed in nova: | |
assignee: | nobody → Isaku Yamahata (yamahata) |
status: | New → In Progress |
Changed in nova: | |
importance: | Undecided → High |
milestone: | none → 2011.3 |
status: | In Progress → Fix Committed |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Case B seems a bug. However other case seem correct according as the device is overriden.