Creating server exceeding personality file size isn't throwing OverLimit exception.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Medium
|
Unassigned |
Bug Description
Description:
Server is getting created with personality file size exceeding the limit ,
but it has to OverLimit exception.
Expected:
Should raise OverLimit Exception.
Actual:
Server is getting Created.
Steps to be followed:
1. Create a file with an encoded data.
2. Set the limit of "injected_
3. Check for the Updated Limit value.
4. Try to create a server with personality file created above.
LOG:
Create a file with encoded data and check its size
>>> import os
>>> os.path.
141
Set the limit of injected_
nova-manage project quota --project=
2012-07-11 19:25:44 DEBUG nova.utils [req-bcda3941-
metadata_items: 128
injected_
volumes: 10
gigabytes: 1000
ram: 51200
floating_ips: 10
security_
instances: 10
key_pairs: 100
injected_files: 5
cores: 20
injected_
security_groups: 10
Create a server with personality file created above
muralik@ubuntu:~$ nova boot --image 9498d38d-
+------
| Property | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | building |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | 6iKunduU48vD |
| config_drive | |
| created | 2012-07-
| flavor | m1.tiny |
| hostId | |
| id | 657b4155-
| image | cirros-
| key_name | |
| metadata | {} |
| name | exceeding_limit |
| progress | 0 |
| status | BUILD |
| tenant_id | 93f94664e0734c4
| updated | 2012-07-
| user_id | a0585fd48bee4a7
+------
muralik@ubuntu:~$ nova list
+------
| ID | Name | Status | Networks |
+------
| 657b4155-
+------
Changed in nova: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Looks like you're using the wrong option to nova boot, see help:
--file <dst-path=src-path>
Store arbitrary files from <src-path> locally to <dst-
path> on the new server. You may store up to 5 files.
user data file to pass to be exposed by the metadata
server.
--user_data <user-data>
In order to trigger the injected_ file_content_ bytes, you need to use the --file option instead of --user-data.
In which case, you should see an expected 413 response such as:
PESP:{'status': '413', 'content-length': '93', 'x-compute- request- id': '...', 'retry-after': '0', 'date': 'Tue, 31 Jul 2012 14:57:12 GMT', 'content-type': 'application/json; charset=UTF-8'} {"overLimit": {"message": "Personality file content too long", "code": 413, "retryAfter": 0}}