
hi... i want apply this script on all vm on my host but found error when start vm i put my script file in before_vm_start: script file is called: ticket !/usr/bin/python import os import sys import hooking import traceback try: domxml = hooking.read_domxml() display.setAttribute('disable-ticketing') hooking.write_domxml(domxml) except: sys.stderr.write('ticket: [unexpected error]: %s\n' % traceback.format_exc()) sys.exit(2) the error is: hread-50::DEBUG::2014-08-18 08:15:24,502::utils::642::root::(execCmd) '/usr/libexec/vdsm/hooks/before_vm_start/ticket' (cwd None) Thread-50::DEBUG::2014-08-18 08:15:24,522::utils::662::root::(execCmd) FAILED: <err> = ' File "/usr/libexec/vdsm/hooks/before_vm_start/ticket", line 8\n try:\n ^\nIndentationError: unexpected indent\n'; <rc> = 1 Thread-50::INFO::2014-08-18 08:15:24,522::hooks::100::root::(_runHooksDir) File "/usr/libexec/vdsm/hooks/before_vm_start/ticket", line 8

You have an unexpected indent at line 8 this is basic python parsing stuff and has nothing to do with ovirt. you can check your syntax on the shell prior to deploying: python -m py_compile script.py HTH Am 18.08.2014 10:21, schrieb mhd:
IndentationError: unexpected indent
-- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH & Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
participants (2)
-
mhd
-
Sven Kieske