[one-users] Clean-Up Script Insufficient
Hutson Betts
hut101 at tamu.edu
Tue Dec 20 20:45:31 PST 2011
It turns out using a VM_HOOK to remove the /var/log/one/$VMID.log file
is insufficient. The script successfully deletes the log file after
being called upon the VM transitioning to the DONE state. However,
Output is still written to the log file, thereby causing it to be
re-created. I just wanted to let any interested parties know. I'm simply
going to go with another solution unless anyone has any ideas regarding
the hooks.
Contents of the 18.log:
Tue Dec 20 22:38:26 2011 [VMM][W]: Ignored: LOG I 18 Driver command for
18 cancelled
Tue Dec 20 22:38:26 2011 [TM][W]: Ignored: LOG I 18 tm_delete.sh:
Deleting /var/lib/one//18/images
Tue Dec 20 22:38:26 2011 [TM][W]: Ignored: LOG I 18 tm_delete.sh:
Executed "rm -rf /var/lib/one//18/images".
Tue Dec 20 22:38:26 2011 [TM][W]: Ignored: LOG I 18 ExitCode: 0
Tue Dec 20 22:38:26 2011 [TM][W]: Ignored: TRANSFER SUCCESS 18 -
Tue Dec 20 22:38:26 2011 [HKM][I]: ExitCode: 0
Tue Dec 20 22:38:26 2011 [HKM][I]: Success executing Hook:
log_cleanup: .
Tue Dec 20 22:38:26 2011 [HKM][I]: ExitCode: 0
Tue Dec 20 22:38:26 2011 [HKM][I]: Success executing Hook:
vmdir_cleanup: .
Tue Dec 20 22:38:29 2011 [VMM][W]: Ignored: LOG I 18
====================
Tue Dec 20 22:38:29 2011 [VMM][W]: Ignored: LOG I 18 VTECH Network
Notice
Tue Dec 20 22:38:29 2011 [VMM][W]: Ignored: LOG I 18
====================
Tue Dec 20 22:38:29 2011 [VMM][W]: Ignored: LOG I 18
Tue Dec 20 22:38:29 2011 [VMM][W]: Ignored: LOG I 18 Unauthorized access
to this computer system is prohibited. Users have no expectation of
privacy exc$
Tue Dec 20 22:38:29 2011 [VMM][W]: Ignored: LOG I 18
Tue Dec 20 22:38:29 2011 [VMM][W]: Ignored: LOG I 18 cancel: Executed
"virsh --connect qemu:///system destroy one-18".
Tue Dec 20 22:38:29 2011 [VMM][W]: Ignored: LOG I 18 ExitCode: 0
Tue Dec 20 22:38:29 2011 [VMM][W]: Ignored: CANCEL SUCCESS 18 -
Tue Dec 20 22:38:29 2011 [HKM][I]: ====================
Tue Dec 20 22:38:29 2011 [HKM][I]: VTECH Network Notice
Tue Dec 20 22:38:29 2011 [HKM][I]: ====================
Tue Dec 20 22:38:29 2011 [HKM][I]:
Tue Dec 20 22:38:29 2011 [HKM][I]: Unauthorized access to this computer
system is prohibited. Users have no expectation of privacy except as
otherwise p$
Tue Dec 20 22:38:29 2011 [HKM][I]:
Tue Dec 20 22:38:29 2011 [HKM][I]: ExitCode: 0
Tue Dec 20 22:38:29 2011 [HKM][I]: Success executing Hook:
firewall-off: .
Relevant logs from oned.log:
Tue Dec 20 22:38:25 2011 [DiM][D]: Finalizing VM 18
Tue Dec 20 22:38:25 2011 [VMM][D]: Message received: LOG I 18 Driver
command for 18 cancelled
Tue Dec 20 22:38:25 2011 [TM][D]: Message received: LOG I 18
tm_delete.sh: Deleting /var/lib/one//18/images
Tue Dec 20 22:38:26 2011 [HKM][D]: Message received: LOG I 18 ExitCode:
0
Tue Dec 20 22:38:26 2011 [TM][D]: Message received: LOG I 18
tm_delete.sh: Executed "rm -rf /var/lib/one//18/images".
Tue Dec 20 22:38:26 2011 [TM][D]: Message received: LOG I 18 ExitCode: 0
Tue Dec 20 22:38:26 2011 [TM][D]: Message received: TRANSFER SUCCESS 18
-
Tue Dec 20 22:38:26 2011 [HKM][D]: Message received: EXECUTE SUCCESS 18
log_cleanup:
Tue Dec 20 22:38:26 2011 [HKM][D]: Message received: LOG I 18 ExitCode:
0
Tue Dec 20 22:38:26 2011 [HKM][D]: Message received: EXECUTE SUCCESS 18
vmdir_cleanup:
Tue Dec 20 22:38:27 2011 [ReM][D]: VirtualMachinePoolInfo method invoked
Tue Dec 20 22:38:27 2011 [AuM][D]: Message received: LOG I 8 ExitCode: 0
--
Hutson Betts
Computer Science and Engineering
Texas A&M University
-------- Forwarded Message --------
> From: Hutson Betts <hut101 at tamu.edu>
> To: Carlos Martín Sánchez <cmartin at opennebula.org>
> Subject: Re: [one-users] Removing old VMs
> Date: Tue, 20 Dec 2011 17:48:08 -0600
>
> Carlos,
>
> Thank you for your suggestion. It will ll cover the situation in which
> VMs transition to the DONE state, including when they are deleted. I've
> updated request #1026 [1].
>
> Here's the changes to oned.conf I made, since the update to the ticket
> wasn't saved properly:
>
> #*******************************************************************************
> # Clean-Up Hooks
> #*******************************************************************************
> # The following VM hooks can be activated in order to manage the
> # clean-up of log, and deployment files after a VM has transitioned to
> # the DONE state.
> #*******************************************************************************
> #
> #-------------------------------------------------------------------------------
> # VM Clean-Up
> #-------------------------------------------------------------------------------
> #
> # The vmdir_cleanup hook will remove the folder, and all its contents,
> # associated with VMs that have transitioned to the DONE state. The
> # log_cleanup hook will remove the OpenNebula log associated with the
> # VM.
> #-------------------------------------------------------------------------------
> #
> #VM_HOOK = [
> # name = "vmdir_cleanup",
> # on = "DONE",
> # command = "/bin/rm",
> # arguments = "-r /var/lib/one/$VMID" ]
> #
> #VM_HOOK = [
> # name = "log_cleanup",
> # on = "DONE",
> # command = "/bin/rm",
> # arguments = "/var/log/one/$VMID.log" ]
> #
>
> [1] http://dev.opennebula.org/issues/1026
>
> --
> Hutson Betts
> Computer Science and Engineering
> Texas A&M University
>
>
> On Tue, 2011-12-20 at 14:56 +0100, Carlos Martín Sánchez wrote:
> > request #1026 [1]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20111220/db6dd2aa/attachment.pgp>
More information about the Users
mailing list