Re: [Openstack] file injection problem

2017-10-26 Thread Eugen Block
as written in source code, "config-drive = true" and file injection  
using personality are mutually exclusive mechanisms.


Interesting, I did it with config-drive=true and it worked for me. But  
it's great that you found a solution.



Zitat von Volodymyr Litovka :


Answer is:

as written in source code, "config-drive = true" and file injection  
using personality are mutually exclusive mechanisms.


On 10/25/17 2:14 AM, Volodymyr Litovka wrote:
Also, python-guestfs package installed as well, so Nova is able to  
use it, at least quick check (snipped from Nova sources) passed:


# python2.7
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from oslo_utils import importutils
g = importutils.import_module('guestfs')
print g



from eventlet import tpool
t = tpool.Proxy(g.GuestFS())
t.add_drive("/dev/null")
t.launch()
print t



No ideas why I'm facing this problem. Anybody can comment on this?

Thanks again.

On 10/25/17 1:24 AM, Volodymyr Litovka wrote:

Hi colleagues,

it makes me crazy, but how to make it work file injection into instance?

nova.conf already configured with

==
[DEFAULT]
debug=true

[libvirt]
inject_partition = -1

[guestfs]
debug=true

[quota]
injected_files = 5
injected_file_content_bytes = 10240
injected_file_path_length = 255
===

libguestfs and libguestfs-tools are installed (on host machine):

libguestfs-hfsplus:amd64    1:1.32.2-4ubuntu2
libguestfs-perl 1:1.32.2-4ubuntu2
libguestfs-reiserfs:amd64   1:1.32.2-4ubuntu2
libguestfs-tools    1:1.32.2-4ubuntu2
libguestfs-xfs:amd64    1:1.32.2-4ubuntu2
libguestfs0:amd64   1:1.32.2-4ubuntu2

and, finally,

nova --debug boot --config-drive true --image  --flavor  
 --security-groups  --key-name  --file  
/etc/qqq=/dTest.txt --nic [...] dtest


makes a correct request (note a personality parameter)

REQ: curl -g -i -X POST http://controller:8774/v2.1/servers -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, *"personality": [{"path": "/etc/qqq",  
"contents": "ZG9rYSB0ZXN0CmRva2EgdGVzdApkb2thIHRlc3QK"}]*,  
"networks": [{"uuid": "9cc72002-fe24-44a5-aa04-1ac0470f"}],  
"security_groups": [{"name":  
"dfc7d642-b55f-465c-84c2-9d95c9c565bf"}], "config_drive": true}}'


but nothing everywhere - neither '/etc/qqq' on guest VM nor logs  
(according to guestfs.debug=true) on host machine.


It's Pike on Ubuntu 16.04.3.

What I'm doing wrong?

Thanks.

--
Volodymyr Litovka
  "Vision without Execution is Hallucination." -- Thomas Edison


--
Volodymyr Litovka
  "Vision without Execution is Hallucination." -- Thomas Edison


--
Volodymyr Litovka
  "Vision without Execution is Hallucination." -- Thomas Edison




--
Eugen Block voice   : +49-40-559 51 75
NDE Netzdesign und -entwicklung AG  fax : +49-40-559 51 77
Postfach 61 03 15
D-22423 Hamburg e-mail  : ebl...@nde.ag

Vorsitzende des Aufsichtsrates: Angelika Mozdzen
  Sitz und Registergericht: Hamburg, HRB 90934
  Vorstand: Jens-U. Mozdzen
   USt-IdNr. DE 814 013 983


___
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack


Re: [Openstack] file injection problem

2017-10-26 Thread Eugen Block

Hi,

do other injections work with that image, e.g. user-data and ssh-keys?  
Is it a provider (external) network where you try to launch that  
instance? I assume you are using cloud-init for this, which version?


We've had our troubles with cloud-init, especially for external  
networks. I filed a bug report for openSUSE and cloud-init version  
17.1 just this week. The only version of cloud-init we actually could  
use (and still use) was 0.7.8. I just tested file injection with 0.7.8  
and it worked just fine.


Regards,
Eugen


Zitat von Volodymyr Litovka :


Hi colleagues,

it makes me crazy, but how to make it work file injection into instance?

nova.conf already configured with

==
[DEFAULT]
debug=true

[libvirt]
inject_partition = -1

[guestfs]
debug=true

[quota]
injected_files = 5
injected_file_content_bytes = 10240
injected_file_path_length = 255
===

libguestfs and libguestfs-tools are installed (on host machine):

libguestfs-hfsplus:amd64    1:1.32.2-4ubuntu2
libguestfs-perl 1:1.32.2-4ubuntu2
libguestfs-reiserfs:amd64   1:1.32.2-4ubuntu2
libguestfs-tools    1:1.32.2-4ubuntu2
libguestfs-xfs:amd64    1:1.32.2-4ubuntu2
libguestfs0:amd64   1:1.32.2-4ubuntu2

and, finally,

nova --debug boot --config-drive true --image  --flavor  
 --security-groups  --key-name  --file  
/etc/qqq=/dTest.txt --nic [...] dtest


makes a correct request (note a personality parameter)

REQ: curl -g -i -X POST http://controller:8774/v2.1/servers -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, *"personality": [{"path": "/etc/qqq", "contents":  
"ZG9rYSB0ZXN0CmRva2EgdGVzdApkb2thIHRlc3QK"}]*, "networks": [{"uuid":  
"9cc72002-fe24-44a5-aa04-1ac0470f"}], "security_groups":  
[{"name": "dfc7d642-b55f-465c-84c2-9d95c9c565bf"}], "config_drive":  
true}}'


but nothing everywhere - neither '/etc/qqq' on guest VM nor logs  
(according to guestfs.debug=true) on host machine.


It's Pike on Ubuntu 16.04.3.

What I'm doing wrong?

Thanks.

--
Volodymyr Litovka
  "Vision without Execution is Hallucination." -- Thomas Edison




--
Eugen Block voice   : +49-40-559 51 75
NDE Netzdesign und -entwicklung AG  fax : +49-40-559 51 77
Postfach 61 03 15
D-22423 Hamburg e-mail  : ebl...@nde.ag

Vorsitzende des Aufsichtsrates: Angelika Mozdzen
  Sitz und Registergericht: Hamburg, HRB 90934
  Vorstand: Jens-U. Mozdzen
   USt-IdNr. DE 814 013 983


___
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack


Re: [Openstack] file injection problem

2017-10-26 Thread Volodymyr Litovka

Answer is:

as written in source code, "config-drive = true" and file injection 
using personality are mutually exclusive mechanisms.


On 10/25/17 2:14 AM, Volodymyr Litovka wrote:
Also, python-guestfs package installed as well, so Nova is able to use 
it, at least quick check (snipped from Nova sources) passed:


# python2.7
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from oslo_utils import importutils
>>> g = importutils.import_module('guestfs')
>>> print g

>>> from eventlet import tpool
>>> t = tpool.Proxy(g.GuestFS())
>>> t.add_drive("/dev/null")
>>> t.launch()
>>> print t


No ideas why I'm facing this problem. Anybody can comment on this?

Thanks again.

On 10/25/17 1:24 AM, Volodymyr Litovka wrote:

Hi colleagues,

it makes me crazy, but how to make it work file injection into instance?

nova.conf already configured with

==
[DEFAULT]
debug=true

[libvirt]
inject_partition = -1

[guestfs]
debug=true

[quota]
injected_files = 5
injected_file_content_bytes = 10240
injected_file_path_length = 255
===

libguestfs and libguestfs-tools are installed (on host machine):

libguestfs-hfsplus:amd64    1:1.32.2-4ubuntu2
libguestfs-perl 1:1.32.2-4ubuntu2
libguestfs-reiserfs:amd64   1:1.32.2-4ubuntu2
libguestfs-tools    1:1.32.2-4ubuntu2
libguestfs-xfs:amd64    1:1.32.2-4ubuntu2
libguestfs0:amd64   1:1.32.2-4ubuntu2

and, finally,

nova --debug boot --config-drive true --image  --flavor 
 --security-groups  --key-name  --file 
/etc/qqq=/dTest.txt --nic [...] dtest


makes a correct request (note a personality parameter)

REQ: curl -g -i -X POST http://controller:8774/v2.1/servers -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, *"personality": [{"path": "/etc/qqq", "contents": 
"ZG9rYSB0ZXN0CmRva2EgdGVzdApkb2thIHRlc3QK"}]*, "networks": [{"uuid": 
"9cc72002-fe24-44a5-aa04-1ac0470f"}], "security_groups": 
[{"name": "dfc7d642-b55f-465c-84c2-9d95c9c565bf"}], "config_drive": 
true}}'


but nothing everywhere - neither '/etc/qqq' on guest VM nor logs 
(according to guestfs.debug=true) on host machine.


It's Pike on Ubuntu 16.04.3.

What I'm doing wrong?

Thanks.

--
Volodymyr Litovka
   "Vision without Execution is Hallucination." -- Thomas Edison


--
Volodymyr Litovka
   "Vision without Execution is Hallucination." -- Thomas Edison


--
Volodymyr Litovka
  "Vision without Execution is Hallucination." -- Thomas Edison

___
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack


Re: [Openstack] file injection problem

2017-10-24 Thread Volodymyr Litovka
Also, python-guestfs package installed as well, so Nova is able to use 
it, at least quick check (snipped from Nova sources) passed:


# python2.7
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from oslo_utils import importutils
>>> g = importutils.import_module('guestfs')
>>> print g

>>> from eventlet import tpool
>>> t = tpool.Proxy(g.GuestFS())
>>> t.add_drive("/dev/null")
>>> t.launch()
>>> print t


No ideas why I'm facing this problem. Anybody can comment on this?

Thanks again.

On 10/25/17 1:24 AM, Volodymyr Litovka wrote:

Hi colleagues,

it makes me crazy, but how to make it work file injection into instance?

nova.conf already configured with

==
[DEFAULT]
debug=true

[libvirt]
inject_partition = -1

[guestfs]
debug=true

[quota]
injected_files = 5
injected_file_content_bytes = 10240
injected_file_path_length = 255
===

libguestfs and libguestfs-tools are installed (on host machine):

libguestfs-hfsplus:amd64    1:1.32.2-4ubuntu2
libguestfs-perl 1:1.32.2-4ubuntu2
libguestfs-reiserfs:amd64   1:1.32.2-4ubuntu2
libguestfs-tools    1:1.32.2-4ubuntu2
libguestfs-xfs:amd64    1:1.32.2-4ubuntu2
libguestfs0:amd64   1:1.32.2-4ubuntu2

and, finally,

nova --debug boot --config-drive true --image  --flavor 
 --security-groups  --key-name  --file 
/etc/qqq=/dTest.txt --nic [...] dtest


makes a correct request (note a personality parameter)

REQ: curl -g -i -X POST http://controller:8774/v2.1/servers -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, *"personality": [{"path": "/etc/qqq", "contents": 
"ZG9rYSB0ZXN0CmRva2EgdGVzdApkb2thIHRlc3QK"}]*, "networks": [{"uuid": 
"9cc72002-fe24-44a5-aa04-1ac0470f"}], "security_groups": [{"name": 
"dfc7d642-b55f-465c-84c2-9d95c9c565bf"}], "config_drive": true}}'


but nothing everywhere - neither '/etc/qqq' on guest VM nor logs 
(according to guestfs.debug=true) on host machine.


It's Pike on Ubuntu 16.04.3.

What I'm doing wrong?

Thanks.

--
Volodymyr Litovka
   "Vision without Execution is Hallucination." -- Thomas Edison


--
Volodymyr Litovka
  "Vision without Execution is Hallucination." -- Thomas Edison

___
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack


[Openstack] file injection problem

2017-10-24 Thread Volodymyr Litovka

Hi colleagues,

it makes me crazy, but how to make it work file injection into instance?

nova.conf already configured with

==
[DEFAULT]
debug=true

[libvirt]
inject_partition = -1

[guestfs]
debug=true

[quota]
injected_files = 5
injected_file_content_bytes = 10240
injected_file_path_length = 255
===

libguestfs and libguestfs-tools are installed (on host machine):

libguestfs-hfsplus:amd64    1:1.32.2-4ubuntu2
libguestfs-perl 1:1.32.2-4ubuntu2
libguestfs-reiserfs:amd64   1:1.32.2-4ubuntu2
libguestfs-tools    1:1.32.2-4ubuntu2
libguestfs-xfs:amd64    1:1.32.2-4ubuntu2
libguestfs0:amd64   1:1.32.2-4ubuntu2

and, finally,

nova --debug boot --config-drive true --image  --flavor  
--security-groups  --key-name  --file /etc/qqq=/dTest.txt 
--nic [...] dtest


makes a correct request (note a personality parameter)

REQ: curl -g -i -X POST http://controller:8774/v2.1/servers -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, *"personality": [{"path": "/etc/qqq", "contents": 
"ZG9rYSB0ZXN0CmRva2EgdGVzdApkb2thIHRlc3QK"}]*, "networks": [{"uuid": 
"9cc72002-fe24-44a5-aa04-1ac0470f"}], "security_groups": [{"name": 
"dfc7d642-b55f-465c-84c2-9d95c9c565bf"}], "config_drive": true}}'


but nothing everywhere - neither '/etc/qqq' on guest VM nor logs 
(according to guestfs.debug=true) on host machine.


It's Pike on Ubuntu 16.04.3.

What I'm doing wrong?

Thanks.

--
Volodymyr Litovka
  "Vision without Execution is Hallucination." -- Thomas Edison

___
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack