On 05/02/2014 05:05 PM, Sven Kieske wrote:
Hi,
please review this bug report:
I can't boot this vm via cloud init, this
worked before, it causes an unhandled exception
in jboss:
https://bugzilla.redhat.com/show_bug.cgi?id=1093755
I'm aware I may have an error in my json syntax
as this got changed from 3.3.x to 3.4.x .
I tried to keep up with the changes and hope
I got everything right.
So please correct my json, or if it is correct
please help me debug while this raises an exception.
I believe I'm one of not too many people (maybe the only
one?) who tests cloud-init via REST/json
so maybe I hit a bug.
Thanks for your help in advance.
PS:
Here again the json for lazy people who don't
want to click links ;)
{"vm":{"initialization":{"cloud_init":{"host":{"address":"test"},"network_configuration":{"nics":{"nics":[{"name":"eth0","boot_protocol":"STATIC","network":{"ip":{"address":"10.211.0.236","netmask":"255.255.255.248","gateway":"10.211.0.233"}},"on_boot":true}]},"dns":{"servers":{"hosts":[{"address":"46.30.62.99"},{"address":"46.30.62.98"},{"address":"46.30.62.97"}]}}},"users":{"users":[{"name":"root","password":"#9Dh2--3xz-h95Zy"}]},"files":{"files":[{"name":"\/foo\/test","content":"test","type":"PLAINTEXT"}]}}}}}
There are two issues here. One is that the JSON isn't correct, the other
is a bug when reporting the error.
The correct JSON should look like this:
{
"name": "yourvm",
"cluster": {
"id": "49548b92-4eeb-448a-842d-3c323370e0b2"
},
"template": {
"id": "00000000-0000-0000-0000-000000000000"
},
"initialization": {
"cloud_init": {
"host": {
"address": "test"
},
"network_configuration": {
"nics": {
"nic": [
{
"name": "eth0",
"boot_protocol": "STATIC",
"network": {
"ip": {
"address": "10.211.0.236",
"netmask": "255.255.255.248",
"gateway": "10.211.0.233"
}
},
"on_boot": true
}
]
},
"dns": {
"servers": {
"host": [
{
"address": "46.30.62.99"
},
{
"address": "46.30.62.98"
},
{
"address": "46.30.62.97"
}
]
}
}
},
"users": {
"user": [
{
"name": "root",
"password": "#9Dh2--3xz-h95Zy"
}
]
},
"files": {
"file": [
{
"name": "\/foo\/test",
"content": "test",
"type": "PLAINTEXT"
}
]
}
}
}
}
There are some additional explanations in the bug.
If you change your client to send the correct JSON then the VM should
work correctly, as the bug only triggers when you send incorrect JSON.
--
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.