Re: [Openstack] Libguestfs in Icehouse with ubuntu 14

2014-06-17 Thread Pádraig Brady
On 06/17/2014 11:47 AM, Mahardhika Gilang wrote:
 Hi, i've got this warning in nova-compute.log
 *Failed to close augeas aug_close: call launch before using this function**
 **(in guestfish, don't forget to use the 'run' command)*
 
 is that mean i have to install libguestfs?
 thanks

Is this intermittent?
Perhaps there was an issue starting the VM,
and this is just a warning issued when making sure everything is torn down.

thanks,
Pádraig


___
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] Libguestfs in Icehouse with ubuntu 14

2014-06-17 Thread Richard W.M. Jones
[Sorry this email is not threaded correctly -- I was not subscribed
to the mailing list before]

 *Failed to close augeas aug_close: call launch before using this function**

From an end-user point of view, if it's a warning, I wouldn't worry
too much.

For developers, this is a problem.  It indicates that there is a path
through the Nova code, which is supposed to be doing something like
this:

  g = guestfs.GuestFS ()   # allocate the handle
  g.add_drive (...)
  g.launch ()  # launch the backend
  g.aug_init (...)
  ...
  g.aug_close ()
  g.shutdown ()# shutdown the backend (undoes launch)
  g.close ()   # free the handle (undoes __init__)

But in fact what must be happening is one of these:

 (1) g.launch () is not being called, or

 (2) g.launch () is throwing an exception which is being ignored, or

 (3) the backend crashes or is killed, and the exception which would
 have been thrown when that happened (from one of the other method
 calls) is being ignored

Without more information it's hard to tell.  As usual what's really
needed here is for libguestfs debugging information to be collected by
Nova logging.  There's a bug open about this:

  https://bugs.launchpad.net/nova/+bug/1279857

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html

___
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] Libguestfs in Icehouse with ubuntu 14

2014-06-17 Thread Pádraig Brady
On 06/17/2014 03:17 PM, Pádraig Brady wrote:
 On 06/17/2014 11:47 AM, Mahardhika Gilang wrote:
 Hi, i've got this warning in nova-compute.log
 *Failed to close augeas aug_close: call launch before using this function**
 **(in guestfish, don't forget to use the 'run' command)*

 is that mean i have to install libguestfs?
 thanks
 
 Is this intermittent?
 Perhaps there was an issue starting the VM,
 and this is just a warning issued when making sure everything is torn down.

The unbalanced teardown() calls seem to be since:
https://review.openstack.org/#/c/67586/
These should not cause a problem,
though we might we able to clean things up here.

thanks,
Pádraig.

___
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] Libguestfs in Icehouse with ubuntu 14

2014-06-17 Thread Richard W.M. Jones
On Tue, Jun 17, 2014 at 04:41:21PM +0100, Pádraig Brady wrote:
 On 06/17/2014 03:17 PM, Pádraig Brady wrote:
  On 06/17/2014 11:47 AM, Mahardhika Gilang wrote:
  Hi, i've got this warning in nova-compute.log
  *Failed to close augeas aug_close: call launch before using this function**
  **(in guestfish, don't forget to use the 'run' command)*
 
  is that mean i have to install libguestfs?
  thanks
  
  Is this intermittent?
  Perhaps there was an issue starting the VM,
  and this is just a warning issued when making sure everything is torn down.
 
 The unbalanced teardown() calls seem to be since:

The teardown function has a hunk that calls g.aug_close().  I think
that whole hunk could be dropped as it is unnecessary.

I suspect that hunk is the one which is printing the warning.

 https://review.openstack.org/#/c/67586/
 These should not cause a problem,
 though we might we able to clean things up here.

Setting self.handle = None is sufficient to completely clean up
libguestfs, including destroying the appliance, *provided* that
self.handle hasn't been leaked outside the class (ie. another
reference is held).

In guestfs.py:

def __del__ (self):
if self._o:
libguestfsmod.close (self._o)

In guestfs-py.c:

  static PyMethodDef methods[] = {
  ...
{ (char *) close, py_guestfs_close, METH_VARARGS, NULL },
  ...

py_guestfs_close is defined here:

  
https://github.com/libguestfs/libguestfs/blob/master/python/guestfs-py-byhand.c#L60

and it calls guestfs_close.

guestfs_close is defined here:

  https://github.com/libguestfs/libguestfs/blob/master/src/handle.c#L296

and you can see that it shuts down the backend, removes the temporary
directory and finally frees the handle.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

___
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] Libguestfs in Icehouse with ubuntu 14

2014-06-17 Thread Mahardhika Gilang

Hi sorry, this error log from nova-compute.log that in my first concern
* RemoteError: Remote error: DBError SQLite DateTime type only accepts 
Python datetime and date objects as input. *


i used mysql connection, i have turn off ceilometer service but no luck 
with that.


thanks
On 6/17/2014 9:17 PM, Pádraig Brady wrote:

On 06/17/2014 11:47 AM, Mahardhika Gilang wrote:

Hi, i've got this warning in nova-compute.log
*Failed to close augeas aug_close: call launch before using this function**
**(in guestfish, don't forget to use the 'run' command)*

is that mean i have to install libguestfs?
thanks

Is this intermittent?
Perhaps there was an issue starting the VM,
and this is just a warning issued when making sure everything is torn down.

thanks,
Pádraig




--
Regards,
Mahardhika Gilang

___
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