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 <[email protected]> > To: Carlos Martín Sánchez <[email protected]> > 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]
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Users mailing list [email protected] http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
