From blanchet at abes.fr Fri May 30 11:49:40 2014
Content-Type: multipart/mixed; boundary="===============7048795673726905239=="
MIME-Version: 1.0
From: =?utf-8?q?Nathana=C3=ABl_Blanchet_=3Cblanchet_at_abes=2Efr=3E?=
To: users at ovirt.org
Subject: [ovirt-users] yaml cloud-init custom scripts
Date: Fri, 30 May 2014 17:49:34 +0200
Message-ID: <5388A88E.7070504@abes.fr>
--===============7048795673726905239==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
This is a multi-part message in MIME format.
--------------030008090705050402030703
Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed
Content-Transfer-Encoding: 8bit
Hello,
I've been unsuccessfully trying to make work a custom yalm script with =
the cloud-init option in 3.4.1.
All other native UI parameters are correctly configured (hostname...)
My goal is to change the keyboard layout:
write_files:
- content: |
# My new /etc/sysconfig/keyboard file
KEYTABLE=3D"fr"
MODEL=3D"pc105"
LAYOUT=3D"fr"
KEYBOARDTYPE=3D"pc"
path: /etc/sysconfig/keyboard
permissions: '0644'
I can't see what is wrong and there is nothing into cloud-init logs on =
the guest (/var/log/clou-init-output.log).
Is it possible to see the whole yalm file generated by the engine somewhere?
-- =
Nathana=C3=ABl Blanchet
Supervision r=C3=A9seau
P=C3=B4le exploitation et maintenance
D=C3=A9partement des syst=C3=A8mes d'information
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5 =
T=C3=A9l. 33 (0)4 67 54 84 55
Fax 33 (0)4 67 54 84 14
blanchet(a)abes.fr
--------------030008090705050402030703
Content-Type: text/html; charset=3DISO-8859-1
Content-Transfer-Encoding: 7bit
Hello,
I've been unsuccessfully trying to make work a custom yalm script
with the cloud-init option in 3.4.1.
All other native UI parameters are correctly configured
(hostname...)
My goal is to change the keyboard layout:
write_files:
- content: |
# My new /etc/sysconfig/keyboard file
KEYTABLE=3D"f=
r"
MODEL=3D"pc105"
LAYOUT=3D"fr"
KEYBOARDTYPE=3D"pc"
path: /etc/sysconfig/keyboard
permissions: '0644'
I can't see what is wrong and there is nothing into cloud-init
logs on the guest (/var/log/clou-init-output.log).
Is it possible to see the whole yalm file generated by the engine
somewhere?
-- =
Nathanaël Blanchet
Supervision réseau
Pôle exploitation et maintenance
Département des systèmes d'information
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5 =
Tél. 33 (0)4 67 54 84 55
Fax 33 (0)4 67 54 84 14
bl=
anchet(a)abes.fr
--------------030008090705050402030703--
--===============7048795673726905239==
Content-Type: multipart/alternative
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="attachment.bin"
VGhpcyBpcyBhIG11bHRpLXBhcnQgbWVzc2FnZSBpbiBNSU1FIGZvcm1hdC4KLS0tLS0tLS0tLS0t
LS0wMzAwMDgwOTA3MDUwNTA0MDIwMzA3MDMKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFy
c2V0PUlTTy04ODU5LTE7IGZvcm1hdD1mbG93ZWQKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzog
OGJpdAoKSGVsbG8sCgpJJ3ZlIGJlZW4gdW5zdWNjZXNzZnVsbHkgdHJ5aW5nIHRvIG1ha2Ugd29y
ayBhIGN1c3RvbSB5YWxtIHNjcmlwdCB3aXRoIAp0aGUgY2xvdWQtaW5pdCBvcHRpb24gaW4gMy40
LjEuCkFsbCBvdGhlciBuYXRpdmUgVUkgcGFyYW1ldGVycyBhcmUgY29ycmVjdGx5IGNvbmZpZ3Vy
ZWQgKGhvc3RuYW1lLi4uKQoKTXkgZ29hbCBpcyB0byBjaGFuZ2UgdGhlIGtleWJvYXJkIGxheW91
dDoKICB3cml0ZV9maWxlczoKLSAgIGNvbnRlbnQ6IHwKICAgICAjIE15IG5ldyAvZXRjL3N5c2Nv
bmZpZy9rZXlib2FyZCBmaWxlCiAgICAgICAgICAgIEtFWVRBQkxFPSJmciIKICAgICBNT0RFTD0i
cGMxMDUiCiAgICAgTEFZT1VUPSJmciIKICAgICBLRVlCT0FSRFRZUEU9InBjIgogICAgIHBhdGg6
IC9ldGMvc3lzY29uZmlnL2tleWJvYXJkCiAgICAgcGVybWlzc2lvbnM6ICcwNjQ0JwoKSSBjYW4n
dCBzZWUgd2hhdCBpcyB3cm9uZyBhbmQgdGhlcmUgaXMgbm90aGluZyBpbnRvIGNsb3VkLWluaXQg
bG9ncyBvbiAKdGhlIGd1ZXN0ICgvdmFyL2xvZy9jbG91LWluaXQtb3V0cHV0LmxvZykuCklzIGl0
IHBvc3NpYmxlIHRvIHNlZSB0aGUgd2hvbGUgeWFsbSBmaWxlIGdlbmVyYXRlZCBieSB0aGUgZW5n
aW5lIHNvbWV3aGVyZT8KCi0tIApOYXRoYW5h62wgQmxhbmNoZXQKClN1cGVydmlzaW9uIHLpc2Vh
dQpQ9GxlIGV4cGxvaXRhdGlvbiBldCBtYWludGVuYW5jZQpE6XBhcnRlbWVudCBkZXMgc3lzdOht
ZXMgZCdpbmZvcm1hdGlvbgoyMjcgYXZlbnVlIFByb2Zlc3NldXItSmVhbi1Mb3Vpcy1WaWFsYQoz
NDE5MyBNT05UUEVMTElFUiBDRURFWCA1IAkKVOlsLiAzMyAoMCk0IDY3IDU0IDg0IDU1CkZheCAg
MzMgKDApNCA2NyA1NCA4NCAxNApibGFuY2hldEBhYmVzLmZyCgoKLS0tLS0tLS0tLS0tLS0wMzAw
MDgwOTA3MDUwNTA0MDIwMzA3MDMKQ29udGVudC1UeXBlOiB0ZXh0L2h0bWw7IGNoYXJzZXQ9SVNP
LTg4NTktMQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiA3Yml0Cgo8aHRtbD4KICA8aGVhZD4K
CiAgICA8bWV0YSBodHRwLWVxdWl2PSJjb250ZW50LXR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDsg
Y2hhcnNldD1JU08tODg1OS0xIj4KICA8L2hlYWQ+CiAgPGJvZHkgYmdjb2xvcj0iI0ZGRkZGRiIg
dGV4dD0iIzAwMDAwMCI+CiAgICA8Zm9udCBzaXplPSItMSI+SGVsbG8sPGJyPgogICAgICA8YnI+
CiAgICAgIEkndmUgYmVlbiB1bnN1Y2Nlc3NmdWxseSB0cnlpbmcgdG8gbWFrZSB3b3JrIGEgY3Vz
dG9tIHlhbG0gc2NyaXB0CiAgICAgIHdpdGggdGhlIGNsb3VkLWluaXQgb3B0aW9uIGluIDMuNC4x
Ljxicj4KICAgICAgQWxsIG90aGVyIG5hdGl2ZSBVSSBwYXJhbWV0ZXJzIGFyZSBjb3JyZWN0bHkg
Y29uZmlndXJlZAogICAgICAoaG9zdG5hbWUuLi4pPGJyPgogICAgICA8YnI+CiAgICAgIE15IGdv
YWwgaXMgdG8gY2hhbmdlIHRoZSBrZXlib2FyZCBsYXlvdXQ6PGJyPgogICAgICAmbmJzcDt3cml0
ZV9maWxlczo8YnI+CiAgICAgIC0mbmJzcDsmbmJzcDsgY29udGVudDogfDxicj4KICAgICAgJm5i
c3A7Jm5ic3A7Jm5ic3A7ICMgTXkgbmV3IC9ldGMvc3lzY29uZmlnL2tleWJvYXJkIGZpbGU8YnI+
CiAgICAgICZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyAmbmJzcDsmbmJzcDsm
bmJzcDsgS0VZVEFCTEU9ImZyIjxicj4KICAgICAgJm5ic3A7Jm5ic3A7Jm5ic3A7IE1PREVMPSJw
YzEwNSI8YnI+CiAgICAgICZuYnNwOyZuYnNwOyZuYnNwOyBMQVlPVVQ9ImZyIjxicj4KICAgICAg
Jm5ic3A7Jm5ic3A7Jm5ic3A7IEtFWUJPQVJEVFlQRT0icGMiPGJyPgogICAgICAmbmJzcDsmbmJz
cDsmbmJzcDsgcGF0aDogL2V0Yy9zeXNjb25maWcva2V5Ym9hcmQ8YnI+CiAgICAgICZuYnNwOyZu
YnNwOyZuYnNwOyBwZXJtaXNzaW9uczogJzA2NDQnPGJyPgogICAgICA8YnI+CiAgICAgIEkgY2Fu
J3Qgc2VlIHdoYXQgaXMgd3JvbmcgYW5kIHRoZXJlIGlzIG5vdGhpbmcgaW50byBjbG91ZC1pbml0
CiAgICAgIGxvZ3Mgb24gdGhlIGd1ZXN0ICgvdmFyL2xvZy9jbG91LWluaXQtb3V0cHV0LmxvZyku
PGJyPgogICAgICBJcyBpdCBwb3NzaWJsZSB0byBzZWUgdGhlIHdob2xlIHlhbG0gZmlsZSBnZW5l
cmF0ZWQgYnkgdGhlIGVuZ2luZQogICAgICBzb21ld2hlcmU/PGJyPgogICAgICA8YnI+CiAgICA8
L2ZvbnQ+CiAgICA8cHJlIGNsYXNzPSJtb3otc2lnbmF0dXJlIiBjb2xzPSI3MiI+LS0gCk5hdGhh
bmEmZXVtbDtsIEJsYW5jaGV0CgpTdXBlcnZpc2lvbiByJmVhY3V0ZTtzZWF1ClAmb2NpcmM7bGUg
ZXhwbG9pdGF0aW9uIGV0IG1haW50ZW5hbmNlCkQmZWFjdXRlO3BhcnRlbWVudCBkZXMgc3lzdCZl
Z3JhdmU7bWVzIGQnaW5mb3JtYXRpb24KMjI3IGF2ZW51ZSBQcm9mZXNzZXVyLUplYW4tTG91aXMt
VmlhbGEKMzQxOTMgTU9OVFBFTExJRVIgQ0VERVggNSAJClQmZWFjdXRlO2wuIDMzICgwKTQgNjcg
NTQgODQgNTUKRmF4ICAzMyAoMCk0IDY3IDU0IDg0IDE0CjxhIGNsYXNzPSJtb3otdHh0LWxpbmst
YWJicmV2aWF0ZWQiIGhyZWY9Im1haWx0bzpibGFuY2hldEBhYmVzLmZyIj5ibGFuY2hldEBhYmVz
LmZyPC9hPiA8L3ByZT4KICA8L2JvZHk+CjwvaHRtbD4KCi0tLS0tLS0tLS0tLS0tMDMwMDA4MDkw
NzA1MDUwNDAyMDMwNzAzLS0K
--===============7048795673726905239==--
From ofrenkel at redhat.com Sun Jun 1 11:20:42 2014
Content-Type: multipart/mixed; boundary="===============9094708075402699737=="
MIME-Version: 1.0
From: Omer Frenkel
To: users at ovirt.org
Subject: Re: [ovirt-users] yaml cloud-init custom scripts
Date: Sun, 01 Jun 2014 11:20:38 -0400
Message-ID: <1101284041.18419189.1401636038696.JavaMail.zimbra@redhat.com>
In-Reply-To: 5388A88E.7070504@abes.fr
--===============9094708075402699737==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
----- Original Message -----
> From: "Nathana=C3=ABl Blanchet"
> To: "users"
> Sent: Friday, May 30, 2014 6:49:34 PM
> Subject: [ovirt-users] yaml cloud-init custom scripts
> =
> Hello,
> =
> I've been unsuccessfully trying to make work a custom yalm script with the
> cloud-init option in 3.4.1.
> All other native UI parameters are correctly configured (hostname...)
> =
> My goal is to change the keyboard layout:
> write_files:
> - content: |
> # My new /etc/sysconfig/keyboard file
> KEYTABLE=3D"fr"
> MODEL=3D"pc105"
> LAYOUT=3D"fr"
> KEYBOARDTYPE=3D"pc"
> path: /etc/sysconfig/keyboard
> permissions: '0644'
> =
> I can't see what is wrong and there is nothing into cloud-init logs on the
> guest (/var/log/clou-init-output.log).
isn't it in /var/log/cloud-init.log ?
> Is it possible to see the whole yalm file generated by the engine somewhe=
re?
> =
the cloud init data is attached to the vm as a cd-rom
you can mount it locally and look inside the drive name is config-2 (look f=
or it with blkid)
for me on fedora 19 it always appear in /dev/sr1 =
> --
> Nathana=C3=ABl Blanchet
> =
> Supervision r=C3=A9seau
> P=C3=B4le exploitation et maintenance
> D=C3=A9partement des syst=C3=A8mes d'information
> 227 avenue Professeur-Jean-Louis-Viala
> 34193 MONTPELLIER CEDEX 5
> T=C3=A9l. 33 (0)4 67 54 84 55
> Fax 33 (0)4 67 54 84 14 blanchet(a)abes.fr
> =
> _______________________________________________
> Users mailing list
> Users(a)ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>=20
--===============9094708075402699737==--
From shaharh at redhat.com Sun Jun 1 14:00:51 2014
Content-Type: multipart/mixed; boundary="===============0599275971180455498=="
MIME-Version: 1.0
From: Shahar Havivi
To: users at ovirt.org
Subject: Re: [ovirt-users] yaml cloud-init custom scripts
Date: Sun, 01 Jun 2014 21:00:44 +0300
Message-ID: <20140601180044.GA7682@redhat.com>
In-Reply-To: 1101284041.18419189.1401636038696.JavaMail.zimbra@redhat.com
--===============0599275971180455498==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
On 01.06.14 11:20, Omer Frenkel wrote:
> =
> =
> ----- Original Message -----
> > From: "Nathana=C3=ABl Blanchet"
> > To: "users"
> > Sent: Friday, May 30, 2014 6:49:34 PM
> > Subject: [ovirt-users] yaml cloud-init custom scripts
> > =
> > Hello,
> > =
> > I've been unsuccessfully trying to make work a custom yalm script with =
the
> > cloud-init option in 3.4.1.
> > All other native UI parameters are correctly configured (hostname...)
> > =
> > My goal is to change the keyboard layout:
> > write_files:
> > - content: |
> > # My new /etc/sysconfig/keyboard file
> > KEYTABLE=3D"fr"
> > MODEL=3D"pc105"
> > LAYOUT=3D"fr"
> > KEYBOARDTYPE=3D"pc"
> > path: /etc/sysconfig/keyboard
> > permissions: '0644'
> > =
> > I can't see what is wrong and there is nothing into cloud-init logs on =
the
> > guest (/var/log/clou-init-output.log).
> =
> isn't it in /var/log/cloud-init.log ?
> =
> > Is it possible to see the whole yalm file generated by the engine somew=
here?
> > =
> =
> the cloud init data is attached to the vm as a cd-rom
> you can mount it locally and look inside the drive name is config-2 (look=
for it with blkid)
> for me on fedora 19 it always appear in /dev/sr1 =
First look at the mounted content as Omer suggested and take a look if the =
YAML
output as you expected.
You can also try to set the data that is written in the "custom script"
commit:
http://gerrit.ovirt.org/gitweb?p=3Dovirt-engine.git;a=3Dcommit;h=3Dd46ebd87=
12f369b924e199b82197e59568a686ff
see if adding this content is working for your setup:
write_files:
- content: |
# some file content
path: /root/myfile
This sample was tested and worked under RHEL 6 and Fedora 19.
Please note that you need to add a tab/4 spaces as shown above.
What OS and what version of cloud-init you are using?
> =
> > --
> > Nathana=C3=ABl Blanchet
> > =
> > Supervision r=C3=A9seau
> > P=C3=B4le exploitation et maintenance
> > D=C3=A9partement des syst=C3=A8mes d'information
> > 227 avenue Professeur-Jean-Louis-Viala
> > 34193 MONTPELLIER CEDEX 5
> > T=C3=A9l. 33 (0)4 67 54 84 55
> > Fax 33 (0)4 67 54 84 14 blanchet(a)abes.fr
> > =
> > _______________________________________________
> > Users mailing list
> > Users(a)ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> > =
> _______________________________________________
> Users mailing list
> Users(a)ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
--===============0599275971180455498==--
From blanchet at abes.fr Mon Jun 2 07:07:46 2014
Content-Type: multipart/mixed; boundary="===============3256783490081185485=="
MIME-Version: 1.0
From: =?utf-8?q?Nathana=C3=ABl_Blanchet_=3Cblanchet_at_abes=2Efr=3E?=
To: users at ovirt.org
Subject: Re: [ovirt-users] yaml cloud-init custom scripts
Date: Mon, 02 Jun 2014 13:07:42 +0200
Message-ID: <538C5AFE.4030509@abes.fr>
In-Reply-To: 20140601180044.GA7682@redhat.com
--===============3256783490081185485==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Le 01/06/2014 20:00, Shahar Havivi a =C3=A9crit :
> On 01.06.14 11:20, Omer Frenkel wrote:
>>
>> ----- Original Message -----
>>> From: "Nathana=C3=ABl Blanchet"
>>> To: "users"
>>> Sent: Friday, May 30, 2014 6:49:34 PM
>>> Subject: [ovirt-users] yaml cloud-init custom scripts
>>>
>>> Hello,
>>>
>>> I've been unsuccessfully trying to make work a custom yalm script with =
the
>>> cloud-init option in 3.4.1.
>>> All other native UI parameters are correctly configured (hostname...)
>>>
>>> My goal is to change the keyboard layout:
>>> write_files:
>>> - content: |
>>> # My new /etc/sysconfig/keyboard file
>>> KEYTABLE=3D"fr"
>>> MODEL=3D"pc105"
>>> LAYOUT=3D"fr"
>>> KEYBOARDTYPE=3D"pc"
>>> path: /etc/sysconfig/keyboard
>>> permissions: '0644'
>>>
>>> I can't see what is wrong and there is nothing into cloud-init logs on =
the
>>> guest (/var/log/clou-init-output.log).
>> isn't it in /var/log/cloud-init.log ?
>>
>>> Is it possible to see the whole yalm file generated by the engine somew=
here?
>>>
>> the cloud init data is attached to the vm as a cd-rom
>> you can mount it locally and look inside the drive name is config-2 (loo=
k for it with blkid)
>> for me on fedora 19 it always appear in /dev/sr1
> First look at the mounted content as Omer suggested and take a look if th=
e YAML
> output as you expected.
> You can also try to set the data that is written in the "custom script"
> commit:
> http://gerrit.ovirt.org/gitweb?p=3Dovirt-engine.git;a=3Dcommit;h=3Dd46ebd=
8712f369b924e199b82197e59568a686ff
> see if adding this content is working for your setup:
> write_files:
> - content: |
> # some file content
> path: /root/myfile
>
> This sample was tested and worked under RHEL 6 and Fedora 19.
> Please note that you need to add a tab/4 spaces as shown above.
>
> What OS and what version of cloud-init you are using?
that's it, I finally managed to make it work after many an many tests, =
that wasn't so trivial.
First I followed your advices and I successfully tested the sample =
script you suggested without modify it. Then each time I attempted to =
add a line to the same file, it wasn't executed anymore. I read the file =
with cat -T /media/openstack/latest/user_data and then noticed that the =
lines weren't uniformly formated : some were with tab and other ones =
with 8 spaces.
Following "Please note that you need to add a tab/4 spaces as shown =
above" I added tab on every lines related to content of the file, but it =
didn't work.
I began again with only 8 spaces and then it ran.
Seems YAML to be very format sensitive and it is not clear enough when =
begining this kind of job, so that I hope my leak will help many other ones.
I think the custom script field in the UI is not helpful because it is =
impossible to insert a line, when doing a CR it leads to the end of =
file, and it is a behaviour which easily leads to format error. It could =
be a good idea to refuse validating OK if any tab is detected there.
Can I have your feeling about this?
>>> --
>>> Nathana=C3=ABl Blanchet
>>>
>>> Supervision r=C3=A9seau
>>> P=C3=B4le exploitation et maintenance
>>> D=C3=A9partement des syst=C3=A8mes d'information
>>> 227 avenue Professeur-Jean-Louis-Viala
>>> 34193 MONTPELLIER CEDEX 5
>>> T=C3=A9l. 33 (0)4 67 54 84 55
>>> Fax 33 (0)4 67 54 84 14 blanchet(a)abes.fr
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users(a)ovirt.org
>>> http://lists.ovirt.org/mailman/listinfo/users
>>>
>> _______________________________________________
>> Users mailing list
>> Users(a)ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
-- =
Nathana=C3=ABl Blanchet
Supervision r=C3=A9seau
P=C3=B4le exploitation et maintenance
D=C3=A9partement des syst=C3=A8mes d'information
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5 =
T=C3=A9l. 33 (0)4 67 54 84 55
Fax 33 (0)4 67 54 84 14
blanchet(a)abes.fr
--===============3256783490081185485==--
From shaharh at redhat.com Mon Jun 2 07:25:20 2014
Content-Type: multipart/mixed; boundary="===============2078819251393808108=="
MIME-Version: 1.0
From: Shahar Havivi
To: users at ovirt.org
Subject: Re: [ovirt-users] yaml cloud-init custom scripts
Date: Mon, 02 Jun 2014 14:25:16 +0300
Message-ID: <20140602112515.GA9121@redhat.com>
In-Reply-To: 538C5AFE.4030509@abes.fr
--===============2078819251393808108==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
On 02.06.14 13:07, Nathana=C3=ABl Blanchet wrote:
> =
> Le 01/06/2014 20:00, Shahar Havivi a =C3=A9crit :
> >On 01.06.14 11:20, Omer Frenkel wrote:
> >>
> >>----- Original Message -----
> >>>From: "Nathana=C3=ABl Blanchet"
> >>>To: "users"
> >>>Sent: Friday, May 30, 2014 6:49:34 PM
> >>>Subject: [ovirt-users] yaml cloud-init custom scripts
> >>>
> >>>Hello,
> >>>
> >>>I've been unsuccessfully trying to make work a custom yalm script with=
the
> >>>cloud-init option in 3.4.1.
> >>>All other native UI parameters are correctly configured (hostname...)
> >>>
> >>>My goal is to change the keyboard layout:
> >>>write_files:
> >>>- content: |
> >>># My new /etc/sysconfig/keyboard file
> >>>KEYTABLE=3D"fr"
> >>>MODEL=3D"pc105"
> >>>LAYOUT=3D"fr"
> >>>KEYBOARDTYPE=3D"pc"
> >>>path: /etc/sysconfig/keyboard
> >>>permissions: '0644'
> >>>
> >>>I can't see what is wrong and there is nothing into cloud-init logs on=
the
> >>>guest (/var/log/clou-init-output.log).
> >>isn't it in /var/log/cloud-init.log ?
> >>
> >>>Is it possible to see the whole yalm file generated by the engine some=
where?
> >>>
> >>the cloud init data is attached to the vm as a cd-rom
> >>you can mount it locally and look inside the drive name is config-2 (lo=
ok for it with blkid)
> >>for me on fedora 19 it always appear in /dev/sr1
> >First look at the mounted content as Omer suggested and take a look if t=
he YAML
> >output as you expected.
> >You can also try to set the data that is written in the "custom script"
> >commit:
> >http://gerrit.ovirt.org/gitweb?p=3Dovirt-engine.git;a=3Dcommit;h=3Dd46eb=
d8712f369b924e199b82197e59568a686ff
> >see if adding this content is working for your setup:
> >write_files:
> >- content: |
> > # some file content
> > path: /root/myfile
> >
> >This sample was tested and worked under RHEL 6 and Fedora 19.
> >Please note that you need to add a tab/4 spaces as shown above.
> >
> >What OS and what version of cloud-init you are using?
> that's it, I finally managed to make it work after many an many tests, th=
at
> wasn't so trivial.
> First I followed your advices and I successfully tested the sample script
> you suggested without modify it. Then each time I attempted to add a line=
to
> the same file, it wasn't executed anymore. I read the file with cat -T
> /media/openstack/latest/user_data and then noticed that the lines weren't
> uniformly formated : some were with tab and other ones with 8 spaces.
> Following "Please note that you need to add a tab/4 spaces as shown above=
" I
> added tab on every lines related to content of the file, but it didn't wo=
rk.
> I began again with only 8 spaces and then it ran.
> Seems YAML to be very format sensitive and it is not clear enough when
> begining this kind of job, so that I hope my leak will help many other on=
es.
> I think the custom script field in the UI is not helpful because it is
> impossible to insert a line, when doing a CR it leads to the end of file,
> and it is a behaviour which easily leads to format error. It could be a g=
ood
> idea to refuse validating OK if any tab is detected there.
> Can I have your feeling about this?
The problem was the CR at the end of the "custom script" field, or any CR?
> >>>--
> >>>Nathana=C3=ABl Blanchet
> >>>
> >>>Supervision r=C3=A9seau
> >>>P=C3=B4le exploitation et maintenance
> >>>D=C3=A9partement des syst=C3=A8mes d'information
> >>>227 avenue Professeur-Jean-Louis-Viala
> >>>34193 MONTPELLIER CEDEX 5
> >>>T=C3=A9l. 33 (0)4 67 54 84 55
> >>>Fax 33 (0)4 67 54 84 14 blanchet(a)abes.fr
> >>>
> >>>_______________________________________________
> >>>Users mailing list
> >>>Users(a)ovirt.org
> >>>http://lists.ovirt.org/mailman/listinfo/users
> >>>
> >>_______________________________________________
> >>Users mailing list
> >>Users(a)ovirt.org
> >>http://lists.ovirt.org/mailman/listinfo/users
> =
> -- =
> Nathana=C3=ABl Blanchet
> =
> Supervision r=C3=A9seau
> P=C3=B4le exploitation et maintenance
> D=C3=A9partement des syst=C3=A8mes d'information
> 227 avenue Professeur-Jean-Louis-Viala
> 34193 MONTPELLIER CEDEX 5 =
> T=C3=A9l. 33 (0)4 67 54 84 55
> Fax 33 (0)4 67 54 84 14
> blanchet(a)abes.fr
>=20
--===============2078819251393808108==--
From blanchet at abes.fr Mon Jun 2 08:28:49 2014
Content-Type: multipart/mixed; boundary="===============0259714310194462622=="
MIME-Version: 1.0
From: =?utf-8?q?Nathana=C3=ABl_Blanchet_=3Cblanchet_at_abes=2Efr=3E?=
To: users at ovirt.org
Subject: Re: [ovirt-users] yaml cloud-init custom scripts
Date: Mon, 02 Jun 2014 14:28:45 +0200
Message-ID: <538C6DFD.2000005@abes.fr>
In-Reply-To: 20140602112515.GA9121@redhat.com
--===============0259714310194462622==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Le 02/06/2014 13:25, Shahar Havivi a =C3=A9crit :
> On 02.06.14 13:07, Nathana=C3=ABl Blanchet wrote:
>> Le 01/06/2014 20:00, Shahar Havivi a =C3=A9crit :
>>> On 01.06.14 11:20, Omer Frenkel wrote:
>>>> ----- Original Message -----
>>>>> From: "Nathana=C3=ABl Blanchet"
>>>>> To: "users"
>>>>> Sent: Friday, May 30, 2014 6:49:34 PM
>>>>> Subject: [ovirt-users] yaml cloud-init custom scripts
>>>>>
>>>>> Hello,
>>>>>
>>>>> I've been unsuccessfully trying to make work a custom yalm script wit=
h the
>>>>> cloud-init option in 3.4.1.
>>>>> All other native UI parameters are correctly configured (hostname...)
>>>>>
>>>>> My goal is to change the keyboard layout:
>>>>> write_files:
>>>>> - content: |
>>>>> # My new /etc/sysconfig/keyboard file
>>>>> KEYTABLE=3D"fr"
>>>>> MODEL=3D"pc105"
>>>>> LAYOUT=3D"fr"
>>>>> KEYBOARDTYPE=3D"pc"
>>>>> path: /etc/sysconfig/keyboard
>>>>> permissions: '0644'
>>>>>
>>>>> I can't see what is wrong and there is nothing into cloud-init logs o=
n the
>>>>> guest (/var/log/clou-init-output.log).
>>>> isn't it in /var/log/cloud-init.log ?
>>>>
>>>>> Is it possible to see the whole yalm file generated by the engine som=
ewhere?
>>>>>
>>>> the cloud init data is attached to the vm as a cd-rom
>>>> you can mount it locally and look inside the drive name is config-2 (l=
ook for it with blkid)
>>>> for me on fedora 19 it always appear in /dev/sr1
>>> First look at the mounted content as Omer suggested and take a look if =
the YAML
>>> output as you expected.
>>> You can also try to set the data that is written in the "custom script"
>>> commit:
>>> http://gerrit.ovirt.org/gitweb?p=3Dovirt-engine.git;a=3Dcommit;h=3Dd46e=
bd8712f369b924e199b82197e59568a686ff
>>> see if adding this content is working for your setup:
>>> write_files:
>>> - content: |
>>> # some file content
>>> path: /root/myfile
>>>
>>> This sample was tested and worked under RHEL 6 and Fedora 19.
>>> Please note that you need to add a tab/4 spaces as shown above.
>>>
>>> What OS and what version of cloud-init you are using?
>> that's it, I finally managed to make it work after many an many tests, t=
hat
>> wasn't so trivial.
>> First I followed your advices and I successfully tested the sample script
>> you suggested without modify it. Then each time I attempted to add a lin=
e to
>> the same file, it wasn't executed anymore. I read the file with cat -T
>> /media/openstack/latest/user_data and then noticed that the lines weren't
>> uniformly formated : some were with tab and other ones with 8 spaces.
>> Following "Please note that you need to add a tab/4 spaces as shown abov=
e" I
>> added tab on every lines related to content of the file, but it didn't w=
ork.
>> I began again with only 8 spaces and then it ran.
>> Seems YAML to be very format sensitive and it is not clear enough when
>> begining this kind of job, so that I hope my leak will help many other o=
nes.
>> I think the custom script field in the UI is not helpful because it is
>> impossible to insert a line, when doing a CR it leads to the end of file,
>> and it is a behaviour which easily leads to format error. It could be a =
good
>> idea to refuse validating OK if any tab is detected there.
>> Can I have your feeling about this?
> The problem was the CR at the end of the "custom script" field, or any CR?
any CR in the field leads to the end on the script
>>>>> --
>>>>> Nathana=C3=ABl Blanchet
>>>>>
>>>>> Supervision r=C3=A9seau
>>>>> P=C3=B4le exploitation et maintenance
>>>>> D=C3=A9partement des syst=C3=A8mes d'information
>>>>> 227 avenue Professeur-Jean-Louis-Viala
>>>>> 34193 MONTPELLIER CEDEX 5
>>>>> T=C3=A9l. 33 (0)4 67 54 84 55
>>>>> Fax 33 (0)4 67 54 84 14 blanchet(a)abes.fr
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users(a)ovirt.org
>>>>> http://lists.ovirt.org/mailman/listinfo/users
>>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users(a)ovirt.org
>>>> http://lists.ovirt.org/mailman/listinfo/users
>> -- =
>> Nathana=C3=ABl Blanchet
>>
>> Supervision r=C3=A9seau
>> P=C3=B4le exploitation et maintenance
>> D=C3=A9partement des syst=C3=A8mes d'information
>> 227 avenue Professeur-Jean-Louis-Viala
>> 34193 MONTPELLIER CEDEX 5 =
>> T=C3=A9l. 33 (0)4 67 54 84 55
>> Fax 33 (0)4 67 54 84 14
>> blanchet(a)abes.fr
>>
-- =
Nathana=C3=ABl Blanchet
Supervision r=C3=A9seau
P=C3=B4le exploitation et maintenance
D=C3=A9partement des syst=C3=A8mes d'information
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5 =
T=C3=A9l. 33 (0)4 67 54 84 55
Fax 33 (0)4 67 54 84 14
blanchet(a)abes.fr
--===============0259714310194462622==--
From shaharh at redhat.com Mon Jun 2 08:38:46 2014
Content-Type: multipart/mixed; boundary="===============2933694971442977675=="
MIME-Version: 1.0
From: Shahar Havivi
To: users at ovirt.org
Subject: Re: [ovirt-users] yaml cloud-init custom scripts
Date: Mon, 02 Jun 2014 15:38:42 +0300
Message-ID: <20140602123841.GB9121@redhat.com>
In-Reply-To: 538C6DFD.2000005@abes.fr
--===============2933694971442977675==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
On 02.06.14 14:28, Nathana=C3=ABl Blanchet wrote:
> =
> Le 02/06/2014 13:25, Shahar Havivi a =C3=A9crit :
> >On 02.06.14 13:07, Nathana=C3=ABl Blanchet wrote:
> >>Le 01/06/2014 20:00, Shahar Havivi a =C3=A9crit :
> >>>On 01.06.14 11:20, Omer Frenkel wrote:
> >>>>----- Original Message -----
> >>>>>From: "Nathana=C3=ABl Blanchet"
> >>>>>To: "users"
> >>>>>Sent: Friday, May 30, 2014 6:49:34 PM
> >>>>>Subject: [ovirt-users] yaml cloud-init custom scripts
> >>>>>
> >>>>>Hello,
> >>>>>
> >>>>>I've been unsuccessfully trying to make work a custom yalm script wi=
th the
> >>>>>cloud-init option in 3.4.1.
> >>>>>All other native UI parameters are correctly configured (hostname...)
> >>>>>
> >>>>>My goal is to change the keyboard layout:
> >>>>>write_files:
> >>>>>- content: |
> >>>>># My new /etc/sysconfig/keyboard file
> >>>>>KEYTABLE=3D"fr"
> >>>>>MODEL=3D"pc105"
> >>>>>LAYOUT=3D"fr"
> >>>>>KEYBOARDTYPE=3D"pc"
> >>>>>path: /etc/sysconfig/keyboard
> >>>>>permissions: '0644'
> >>>>>
> >>>>>I can't see what is wrong and there is nothing into cloud-init logs =
on the
> >>>>>guest (/var/log/clou-init-output.log).
> >>>>isn't it in /var/log/cloud-init.log ?
> >>>>
> >>>>>Is it possible to see the whole yalm file generated by the engine so=
mewhere?
> >>>>>
> >>>>the cloud init data is attached to the vm as a cd-rom
> >>>>you can mount it locally and look inside the drive name is config-2 (=
look for it with blkid)
> >>>>for me on fedora 19 it always appear in /dev/sr1
> >>>First look at the mounted content as Omer suggested and take a look if=
the YAML
> >>>output as you expected.
> >>>You can also try to set the data that is written in the "custom script"
> >>>commit:
> >>>http://gerrit.ovirt.org/gitweb?p=3Dovirt-engine.git;a=3Dcommit;h=3Dd46=
ebd8712f369b924e199b82197e59568a686ff
> >>>see if adding this content is working for your setup:
> >>>write_files:
> >>>- content: |
> >>> # some file content
> >>> path: /root/myfile
> >>>
> >>>This sample was tested and worked under RHEL 6 and Fedora 19.
> >>>Please note that you need to add a tab/4 spaces as shown above.
> >>>
> >>>What OS and what version of cloud-init you are using?
> >>that's it, I finally managed to make it work after many an many tests, =
that
> >>wasn't so trivial.
> >>First I followed your advices and I successfully tested the sample scri=
pt
> >>you suggested without modify it. Then each time I attempted to add a li=
ne to
> >>the same file, it wasn't executed anymore. I read the file with cat -T
> >>/media/openstack/latest/user_data and then noticed that the lines weren=
't
> >>uniformly formated : some were with tab and other ones with 8 spaces.
> >>Following "Please note that you need to add a tab/4 spaces as shown abo=
ve" I
> >>added tab on every lines related to content of the file, but it didn't =
work.
> >>I began again with only 8 spaces and then it ran.
> >>Seems YAML to be very format sensitive and it is not clear enough when
> >>begining this kind of job, so that I hope my leak will help many other =
ones.
> >>I think the custom script field in the UI is not helpful because it is
> >>impossible to insert a line, when doing a CR it leads to the end of fil=
e,
> >>and it is a behaviour which easily leads to format error. It could be a=
good
> >>idea to refuse validating OK if any tab is detected there.
> >>Can I have your feeling about this?
> >The problem was the CR at the end of the "custom script" field, or any C=
R?
> any CR in the field leads to the end on the script
So only when you copy/paste the custom script content it works for you?
> >>>>>--
> >>>>>Nathana=C3=ABl Blanchet
> >>>>>
> >>>>>Supervision r=C3=A9seau
> >>>>>P=C3=B4le exploitation et maintenance
> >>>>>D=C3=A9partement des syst=C3=A8mes d'information
> >>>>>227 avenue Professeur-Jean-Louis-Viala
> >>>>>34193 MONTPELLIER CEDEX 5
> >>>>>T=C3=A9l. 33 (0)4 67 54 84 55
> >>>>>Fax 33 (0)4 67 54 84 14 blanchet(a)abes.fr
> >>>>>
> >>>>>_______________________________________________
> >>>>>Users mailing list
> >>>>>Users(a)ovirt.org
> >>>>>http://lists.ovirt.org/mailman/listinfo/users
> >>>>>
> >>>>_______________________________________________
> >>>>Users mailing list
> >>>>Users(a)ovirt.org
> >>>>http://lists.ovirt.org/mailman/listinfo/users
> >>-- =
> >>Nathana=C3=ABl Blanchet
> >>
> >>Supervision r=C3=A9seau
> >>P=C3=B4le exploitation et maintenance
> >>D=C3=A9partement des syst=C3=A8mes d'information
> >>227 avenue Professeur-Jean-Louis-Viala
> >>34193 MONTPELLIER CEDEX 5 =
> >>T=C3=A9l. 33 (0)4 67 54 84 55
> >>Fax 33 (0)4 67 54 84 14
> >>blanchet(a)abes.fr
> >>
> =
> -- =
> Nathana=C3=ABl Blanchet
> =
> Supervision r=C3=A9seau
> P=C3=B4le exploitation et maintenance
> D=C3=A9partement des syst=C3=A8mes d'information
> 227 avenue Professeur-Jean-Louis-Viala
> 34193 MONTPELLIER CEDEX 5 =
> T=C3=A9l. 33 (0)4 67 54 84 55
> Fax 33 (0)4 67 54 84 14
> blanchet(a)abes.fr
>=20
--===============2933694971442977675==--
From blanchet at abes.fr Mon Jun 2 09:16:56 2014
Content-Type: multipart/mixed; boundary="===============6414826656842716880=="
MIME-Version: 1.0
From: =?utf-8?q?Nathana=C3=ABl_Blanchet_=3Cblanchet_at_abes=2Efr=3E?=
To: users at ovirt.org
Subject: Re: [ovirt-users] yaml cloud-init custom scripts
Date: Mon, 02 Jun 2014 15:16:52 +0200
Message-ID: <538C7944.40107@abes.fr>
In-Reply-To: 20140602123841.GB9121@redhat.com
--===============6414826656842716880==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Le 02/06/2014 14:38, Shahar Havivi a =C3=A9crit :
> On 02.06.14 14:28, Nathana=C3=ABl Blanchet wrote:
>> Le 02/06/2014 13:25, Shahar Havivi a =C3=A9crit :
>>> On 02.06.14 13:07, Nathana=C3=ABl Blanchet wrote:
>>>> Le 01/06/2014 20:00, Shahar Havivi a =C3=A9crit :
>>>>> On 01.06.14 11:20, Omer Frenkel wrote:
>>>>>> ----- Original Message -----
>>>>>>> From: "Nathana=C3=ABl Blanchet"
>>>>>>> To: "users"
>>>>>>> Sent: Friday, May 30, 2014 6:49:34 PM
>>>>>>> Subject: [ovirt-users] yaml cloud-init custom scripts
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I've been unsuccessfully trying to make work a custom yalm script w=
ith the
>>>>>>> cloud-init option in 3.4.1.
>>>>>>> All other native UI parameters are correctly configured (hostname..=
.)
>>>>>>>
>>>>>>> My goal is to change the keyboard layout:
>>>>>>> write_files:
>>>>>>> - content: |
>>>>>>> # My new /etc/sysconfig/keyboard file
>>>>>>> KEYTABLE=3D"fr"
>>>>>>> MODEL=3D"pc105"
>>>>>>> LAYOUT=3D"fr"
>>>>>>> KEYBOARDTYPE=3D"pc"
>>>>>>> path: /etc/sysconfig/keyboard
>>>>>>> permissions: '0644'
>>>>>>>
>>>>>>> I can't see what is wrong and there is nothing into cloud-init logs=
on the
>>>>>>> guest (/var/log/clou-init-output.log).
>>>>>> isn't it in /var/log/cloud-init.log ?
>>>>>>
>>>>>>> Is it possible to see the whole yalm file generated by the engine s=
omewhere?
>>>>>>>
>>>>>> the cloud init data is attached to the vm as a cd-rom
>>>>>> you can mount it locally and look inside the drive name is config-2 =
(look for it with blkid)
>>>>>> for me on fedora 19 it always appear in /dev/sr1
>>>>> First look at the mounted content as Omer suggested and take a look i=
f the YAML
>>>>> output as you expected.
>>>>> You can also try to set the data that is written in the "custom scrip=
t"
>>>>> commit:
>>>>> http://gerrit.ovirt.org/gitweb?p=3Dovirt-engine.git;a=3Dcommit;h=3Dd4=
6ebd8712f369b924e199b82197e59568a686ff
>>>>> see if adding this content is working for your setup:
>>>>> write_files:
>>>>> - content: |
>>>>> # some file content
>>>>> path: /root/myfile
>>>>>
>>>>> This sample was tested and worked under RHEL 6 and Fedora 19.
>>>>> Please note that you need to add a tab/4 spaces as shown above.
>>>>>
>>>>> What OS and what version of cloud-init you are using?
>>>> that's it, I finally managed to make it work after many an many tests,=
that
>>>> wasn't so trivial.
>>>> First I followed your advices and I successfully tested the sample scr=
ipt
>>>> you suggested without modify it. Then each time I attempted to add a l=
ine to
>>>> the same file, it wasn't executed anymore. I read the file with cat -T
>>>> /media/openstack/latest/user_data and then noticed that the lines were=
n't
>>>> uniformly formated : some were with tab and other ones with 8 spaces.
>>>> Following "Please note that you need to add a tab/4 spaces as shown ab=
ove" I
>>>> added tab on every lines related to content of the file, but it didn't=
work.
>>>> I began again with only 8 spaces and then it ran.
>>>> Seems YAML to be very format sensitive and it is not clear enough when
>>>> begining this kind of job, so that I hope my leak will help many other=
ones.
>>>> I think the custom script field in the UI is not helpful because it is
>>>> impossible to insert a line, when doing a CR it leads to the end of fi=
le,
>>>> and it is a behaviour which easily leads to format error. It could be =
a good
>>>> idea to refuse validating OK if any tab is detected there.
>>>> Can I have your feeling about this?
>>> The problem was the CR at the end of the "custom script" field, or any =
CR?
>> any CR in the field leads to the end on the script
> So only when you copy/paste the custom script content it works for you?
Copy/past is the best way for not having tabs instead of the correct 8 =
spaces before each file content instruction
>>>>>>> --
>>>>>>> Nathana=C3=ABl Blanchet
>>>>>>>
>>>>>>> Supervision r=C3=A9seau
>>>>>>> P=C3=B4le exploitation et maintenance
>>>>>>> D=C3=A9partement des syst=C3=A8mes d'information
>>>>>>> 227 avenue Professeur-Jean-Louis-Viala
>>>>>>> 34193 MONTPELLIER CEDEX 5
>>>>>>> T=C3=A9l. 33 (0)4 67 54 84 55
>>>>>>> Fax 33 (0)4 67 54 84 14 blanchet(a)abes.fr
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Users mailing list
>>>>>>> Users(a)ovirt.org
>>>>>>> http://lists.ovirt.org/mailman/listinfo/users
>>>>>>>
>>>>>> _______________________________________________
>>>>>> Users mailing list
>>>>>> Users(a)ovirt.org
>>>>>> http://lists.ovirt.org/mailman/listinfo/users
>>>> -- =
>>>> Nathana=C3=ABl Blanchet
>>>>
>>>> Supervision r=C3=A9seau
>>>> P=C3=B4le exploitation et maintenance
>>>> D=C3=A9partement des syst=C3=A8mes d'information
>>>> 227 avenue Professeur-Jean-Louis-Viala
>>>> 34193 MONTPELLIER CEDEX 5 =
>>>> T=C3=A9l. 33 (0)4 67 54 84 55
>>>> Fax 33 (0)4 67 54 84 14
>>>> blanchet(a)abes.fr
>>>>
>> -- =
>> Nathana=C3=ABl Blanchet
>>
>> Supervision r=C3=A9seau
>> P=C3=B4le exploitation et maintenance
>> D=C3=A9partement des syst=C3=A8mes d'information
>> 227 avenue Professeur-Jean-Louis-Viala
>> 34193 MONTPELLIER CEDEX 5 =
>> T=C3=A9l. 33 (0)4 67 54 84 55
>> Fax 33 (0)4 67 54 84 14
>> blanchet(a)abes.fr
>>
-- =
Nathana=C3=ABl Blanchet
Supervision r=C3=A9seau
P=C3=B4le exploitation et maintenance
D=C3=A9partement des syst=C3=A8mes d'information
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5 =
T=C3=A9l. 33 (0)4 67 54 84 55
Fax 33 (0)4 67 54 84 14
blanchet(a)abes.fr
--===============6414826656842716880==--
From shaharh at redhat.com Mon Jun 2 09:37:52 2014
Content-Type: multipart/mixed; boundary="===============3585421868783098253=="
MIME-Version: 1.0
From: Shahar Havivi
To: users at ovirt.org
Subject: Re: [ovirt-users] yaml cloud-init custom scripts
Date: Mon, 02 Jun 2014 16:37:47 +0300
Message-ID: <20140602133746.GC9121@redhat.com>
In-Reply-To: 538C7944.40107@abes.fr
--===============3585421868783098253==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
On 02.06.14 15:16, Nathana=C3=ABl Blanchet wrote:
> =
> Le 02/06/2014 14:38, Shahar Havivi a =C3=A9crit :
> >On 02.06.14 14:28, Nathana=C3=ABl Blanchet wrote:
> >>Le 02/06/2014 13:25, Shahar Havivi a =C3=A9crit :
> >>>On 02.06.14 13:07, Nathana=C3=ABl Blanchet wrote:
> >>>>Le 01/06/2014 20:00, Shahar Havivi a =C3=A9crit :
> >>>>>On 01.06.14 11:20, Omer Frenkel wrote:
> >>>>>>----- Original Message -----
> >>>>>>>From: "Nathana=C3=ABl Blanchet"
> >>>>>>>To: "users"
> >>>>>>>Sent: Friday, May 30, 2014 6:49:34 PM
> >>>>>>>Subject: [ovirt-users] yaml cloud-init custom scripts
> >>>>>>>
> >>>>>>>Hello,
> >>>>>>>
> >>>>>>>I've been unsuccessfully trying to make work a custom yalm script =
with the
> >>>>>>>cloud-init option in 3.4.1.
> >>>>>>>All other native UI parameters are correctly configured (hostname.=
..)
> >>>>>>>
> >>>>>>>My goal is to change the keyboard layout:
> >>>>>>>write_files:
> >>>>>>>- content: |
> >>>>>>># My new /etc/sysconfig/keyboard file
> >>>>>>>KEYTABLE=3D"fr"
> >>>>>>>MODEL=3D"pc105"
> >>>>>>>LAYOUT=3D"fr"
> >>>>>>>KEYBOARDTYPE=3D"pc"
> >>>>>>>path: /etc/sysconfig/keyboard
> >>>>>>>permissions: '0644'
> >>>>>>>
> >>>>>>>I can't see what is wrong and there is nothing into cloud-init log=
s on the
> >>>>>>>guest (/var/log/clou-init-output.log).
> >>>>>>isn't it in /var/log/cloud-init.log ?
> >>>>>>
> >>>>>>>Is it possible to see the whole yalm file generated by the engine =
somewhere?
> >>>>>>>
> >>>>>>the cloud init data is attached to the vm as a cd-rom
> >>>>>>you can mount it locally and look inside the drive name is config-2=
(look for it with blkid)
> >>>>>>for me on fedora 19 it always appear in /dev/sr1
> >>>>>First look at the mounted content as Omer suggested and take a look =
if the YAML
> >>>>>output as you expected.
> >>>>>You can also try to set the data that is written in the "custom scri=
pt"
> >>>>>commit:
> >>>>>http://gerrit.ovirt.org/gitweb?p=3Dovirt-engine.git;a=3Dcommit;h=3Dd=
46ebd8712f369b924e199b82197e59568a686ff
> >>>>>see if adding this content is working for your setup:
> >>>>>write_files:
> >>>>>- content: |
> >>>>> # some file content
> >>>>> path: /root/myfile
> >>>>>
> >>>>>This sample was tested and worked under RHEL 6 and Fedora 19.
> >>>>>Please note that you need to add a tab/4 spaces as shown above.
> >>>>>
> >>>>>What OS and what version of cloud-init you are using?
> >>>>that's it, I finally managed to make it work after many an many tests=
, that
> >>>>wasn't so trivial.
> >>>>First I followed your advices and I successfully tested the sample sc=
ript
> >>>>you suggested without modify it. Then each time I attempted to add a =
line to
> >>>>the same file, it wasn't executed anymore. I read the file with cat -T
> >>>>/media/openstack/latest/user_data and then noticed that the lines wer=
en't
> >>>>uniformly formated : some were with tab and other ones with 8 spaces.
> >>>>Following "Please note that you need to add a tab/4 spaces as shown a=
bove" I
> >>>>added tab on every lines related to content of the file, but it didn'=
t work.
> >>>>I began again with only 8 spaces and then it ran.
> >>>>Seems YAML to be very format sensitive and it is not clear enough when
> >>>>begining this kind of job, so that I hope my leak will help many othe=
r ones.
> >>>>I think the custom script field in the UI is not helpful because it is
> >>>>impossible to insert a line, when doing a CR it leads to the end of f=
ile,
> >>>>and it is a behaviour which easily leads to format error. It could be=
a good
> >>>>idea to refuse validating OK if any tab is detected there.
> >>>>Can I have your feeling about this?
> >>>The problem was the CR at the end of the "custom script" field, or any=
CR?
> >>any CR in the field leads to the end on the script
> >So only when you copy/paste the custom script content it works for you?
> Copy/past is the best way for not having tabs instead of the correct 8
> spaces before each file content instruction
Ok,
Thank you for the help, I will test it and send a patch.
> >>>>>>>--
> >>>>>>>Nathana=C3=ABl Blanchet
> >>>>>>>
> >>>>>>>Supervision r=C3=A9seau
> >>>>>>>P=C3=B4le exploitation et maintenance
> >>>>>>>D=C3=A9partement des syst=C3=A8mes d'information
> >>>>>>>227 avenue Professeur-Jean-Louis-Viala
> >>>>>>>34193 MONTPELLIER CEDEX 5
> >>>>>>>T=C3=A9l. 33 (0)4 67 54 84 55
> >>>>>>>Fax 33 (0)4 67 54 84 14 blanchet(a)abes.fr
> >>>>>>>
> >>>>>>>_______________________________________________
> >>>>>>>Users mailing list
> >>>>>>>Users(a)ovirt.org
> >>>>>>>http://lists.ovirt.org/mailman/listinfo/users
> >>>>>>>
> >>>>>>_______________________________________________
> >>>>>>Users mailing list
> >>>>>>Users(a)ovirt.org
> >>>>>>http://lists.ovirt.org/mailman/listinfo/users
> >>>>-- =
> >>>>Nathana=C3=ABl Blanchet
> >>>>
> >>>>Supervision r=C3=A9seau
> >>>>P=C3=B4le exploitation et maintenance
> >>>>D=C3=A9partement des syst=C3=A8mes d'information
> >>>>227 avenue Professeur-Jean-Louis-Viala
> >>>>34193 MONTPELLIER CEDEX 5 =
> >>>>T=C3=A9l. 33 (0)4 67 54 84 55
> >>>>Fax 33 (0)4 67 54 84 14
> >>>>blanchet(a)abes.fr
> >>>>
> >>-- =
> >>Nathana=C3=ABl Blanchet
> >>
> >>Supervision r=C3=A9seau
> >>P=C3=B4le exploitation et maintenance
> >>D=C3=A9partement des syst=C3=A8mes d'information
> >>227 avenue Professeur-Jean-Louis-Viala
> >>34193 MONTPELLIER CEDEX 5 =
> >>T=C3=A9l. 33 (0)4 67 54 84 55
> >>Fax 33 (0)4 67 54 84 14
> >>blanchet(a)abes.fr
> >>
> =
> -- =
> Nathana=C3=ABl Blanchet
> =
> Supervision r=C3=A9seau
> P=C3=B4le exploitation et maintenance
> D=C3=A9partement des syst=C3=A8mes d'information
> 227 avenue Professeur-Jean-Louis-Viala
> 34193 MONTPELLIER CEDEX 5 =
> T=C3=A9l. 33 (0)4 67 54 84 55
> Fax 33 (0)4 67 54 84 14
> blanchet(a)abes.fr
> =
> _______________________________________________
> Users mailing list
> Users(a)ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
--===============3585421868783098253==--