Wrong instance xml for a volume booted instances when created using REST API
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
New
|
Undecided
|
Unassigned |
Bug Description
Description
===========
The instance XML shows that the instance is nova booted while it is volume booted when created using the below-mentioned steps.
Steps to reproduce
==================
- I used the below curl command to create a volume booted instance which worked fine and the instance got created:
```
(overcloudtrain
> -H "Accept: application/json" \
> -H "Content-Type: application/json" \
> -H "OpenStack-
> -H "User-Agent: python-novaclient" \
> -H "X-Auth-Token: gAAAAABmQhTkc8Y
> -H "X-OpenStack-
> -d '
> {
> "server": {
> "name": "temp_vol_
> "imageRef": "f2285517-
> "flavorRef": "a483e589-
> "min_count": 1,
> "max_count": 1,
> "block_
> {
> "uuid": "f2285517-
> "boot_index": "0",
> "source_type": "image",
> "destination_type": "volume",
> "volume_size": 10
> }
> ],
> "networks": [
> {
> "uuid": "6021f51f-
> }
> ]
> }
> }'
HTTP/1.1 202 Accepted
Date: Mon, 13 May 2024 13:54:24 GMT
Server: Apache
Content-Length: 418
location: https:/
OpenStack-
X-OpenStack-
Vary: OpenStack-
x-openstack-
x-compute-
Content-Type: application/json
{"server": {"id": "8cae4622-
(overcloudtrain
(overcloudtrain
+------
| Field | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | active |
| OS-SRV-
| OS-SRV-
| accessIPv4 | |
| accessIPv6 | |
| addresses | internal=
| config_drive | |
| created | 2024-05-
| description | None |
| flavor | disk='1', ephemeral='0', , original_
| hostId | 366f2ccb62c960e
| host_status | UP |
| id | 8cae4622-
| image | cirros (f2285517-
| key_name | None |
| locked | False |
| locked_reason | None |
| name | temp_vol_
| progress | 0 |
| project_id | 3df2e8acc97846a
| properties | |
| security_groups | name='default' |
| server_groups | [] |
| status | ACTIVE |
| tags | [] |
| trusted_
| updated | 2024-05-
| user_id | 27be5b757cea44f
| volumes_attached | delete_
+------
(overcloudtrain
```
Expected result
===============
The metadata from the instance XML should not have
```
<nova:root type="image" uuid="f2285517-
```
Actual result
=============
The metadata from the instance XML says the instance is image booted
```
<metadata>
<nova:instance xmlns:nova="http://
<nova:package version=
<
<
<nova:flavor name="cirros">
<
<nova:owner>
<nova:user uuid="27be5b757
</nova:owner>
<nova:root type="image" uuid="f2285517-
</nova:
</metadata>
```
Environment
===========
1. Openstack : Train
```
[root@overcloud
python3-
openstack-
openstack-
openstack-
python3-
[root@overcloud
```
2. Which hypervisor did you use?
libvirt-