<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font face="SFNS Display">Answer is:<br>
<br>
as written in source code, "config-drive = true" and file
injection using personality are mutually exclusive mechanisms.<br>
</font><br>
<div class="moz-cite-prefix">On 10/25/17 2:14 AM, Volodymyr Litovka
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:073cc57d-3fdf-debb-6ce0-e84d9df2fcab@gmx.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<font face="SFNS Display">Also, python-guestfs package installed
as well, so Nova is able to use it, at least quick check
(snipped from Nova sources) passed:<br>
<br>
</font><tt># python2.7</tt><tt><br>
</tt><tt>Python 2.7.12 (default, Nov 19 2016, 06:48:10)</tt><tt><br>
</tt><tt>[GCC 5.4.0 20160609] on linux2</tt><tt><br>
</tt><tt>Type "help", "copyright", "credits" or "license" for more
information.</tt><tt><br>
</tt><tt>>>> from oslo_utils import importutils</tt><tt><br>
</tt><tt>>>> g = importutils.import_module('guestfs')</tt><tt><br>
</tt><tt>>>> print g</tt><tt><br>
</tt><tt><module 'guestfs' from
'/usr/lib/python2.7/dist-packages/guestfs.pyc'></tt><tt><br>
</tt><tt>>>> from eventlet import tpool</tt><tt><br>
</tt><tt>>>> t = tpool.Proxy(g.GuestFS())</tt><tt><br>
</tt><tt>>>> t.add_drive("/dev/null")</tt><tt><br>
</tt><tt>>>> t.launch()</tt><tt><br>
</tt><tt>>>> print t</tt><tt><br>
</tt><tt><guestfs.GuestFS object at 0x7f99c437e410></tt><font
face="SFNS Display"><br>
</font><br>
No ideas why I'm facing this problem. Anybody can comment on this?<br>
<br>
Thanks again.<br>
<br>
<div class="moz-cite-prefix">On 10/25/17 1:24 AM, Volodymyr
Litovka wrote:<br>
</div>
<blockquote type="cite"
cite="mid:7663195d-1f43-af32-0576-a5e52e01ee8e@gmx.com">
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
<font face="SFNS Display">Hi colleagues,<br>
<br>
it makes me crazy, but how to make it work file injection into
instance?<br>
<br>
nova.conf already configured with<br>
<br>
======<br>
[DEFAULT]<br>
debug=true<br>
<br>
[libvirt]<br>
inject_partition = -1<br>
<br>
[guestfs]<br>
debug=true<br>
<br>
[quota]<br>
injected_files = 5<br>
injected_file_content_bytes = 10240<br>
injected_file_path_length = 255<br>
=======<br>
<br>
libguestfs and libguestfs-tools are installed (on host
machine):<br>
<br>
libguestfs-hfsplus:amd64 1:1.32.2-4ubuntu2<br>
libguestfs-perl 1:1.32.2-4ubuntu2<br>
libguestfs-reiserfs:amd64 1:1.32.2-4ubuntu2<br>
libguestfs-tools 1:1.32.2-4ubuntu2<br>
libguestfs-xfs:amd64 1:1.32.2-4ubuntu2<br>
libguestfs0:amd64 1:1.32.2-4ubuntu2<br>
<br>
and, finally,<br>
<br>
nova --debug boot --config-drive true --image <image>
--flavor <flavor> --security-groups <group>
--key-name <key> --file /etc/qqq=/dTest.txt --nic [...]
dtest<br>
<br>
makes a correct request (note a personality parameter)<br>
<br>
REQ: curl -g -i -X POST <a class="moz-txt-link-freetext"
href="http://controller:8774/v2.1/servers"
moz-do-not-send="true">http://controller:8774/v2.1/servers</a>
-H "Accept: application/json" -H "User-Agent:
python-novaclient" -H "OpenStack-API-Version: compute 2.53" -H
"X-OpenStack-Nova-API-Version: 2.53" -H "X-Auth-Token:
{SHA1}11e6bac1ea20a124903ff967873c186a179d545e" -H
"Content-Type: application/json" -d '{"server": {"name":
"dtest", "imageRef": "12c86830-8d76-4159-a6bc-81966d7a220e",
"key_name": "xxx", "flavorRef":
"d0ff4bc5-df38-4f20-8908-afc516d594e6", "max_count": 1,
"min_count": 1, <b>"personality": [{"path": "/etc/qqq",
"contents": "ZG9rYSB0ZXN0CmRva2EgdGVzdApkb2thIHRlc3QK"}]</b>,
"networks": [{"uuid":
"9cc72002-fe24-44a5-aa04-22221ac0470f"}], "security_groups":
[{"name": "dfc7d642-b55f-465c-84c2-9d95c9c565bf"}],
"config_drive": true}}'<br>
<br>
but nothing everywhere - neither '/etc/qqq' on guest VM nor
logs (according to guestfs.debug=true) on host machine.<br>
<br>
It's Pike on Ubuntu 16.04.3.<br>
<br>
What I'm doing wrong?<br>
<br>
Thanks.<br>
<br>
</font>
<pre class="moz-signature" cols="72">--
Volodymyr Litovka
"Vision without Execution is Hallucination." -- Thomas Edison
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Volodymyr Litovka
"Vision without Execution is Hallucination." -- Thomas Edison
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Volodymyr Litovka
"Vision without Execution is Hallucination." -- Thomas Edison
</pre>
</body>
</html>