NAUbackup / VmBackup

XenServer simple backup script
228 stars 61 forks source link

hang reading from config file #48

Closed tmllc closed 7 years ago

tmllc commented 7 years ago

When running with a config file, it seems to hang waiting for an eol.

manual break gives: Traceback (most recent call last): File "./VmBackup.py", line 1443, in ? main(session) File "./VmBackup.py", line 392, in main if run_log_out_wait_rc(cmd) == 0: File "./VmBackup.py", line 773, in run_log_out_wait_rc line = child.stdout.readline()

NAUbackup commented 7 years ago

Did you try running the script in debug mode? I suspect an extra character somewhere or perhaps an entry that needs to be quoted?

tmllc commented 7 years ago

how does one do that?

NAUbackup commented 7 years ago

Add preview ignore_extra_keys=true at the end of your existing command (in essence, use the "preview" option).

tmllc commented 7 years ago

when executing with preview ignore_extra_keys=True, It executes successfully returning:

SUCCESS preview of parameters

NAUbackup commented 7 years ago

OK. Please check for any extra characters (spaces, tabs, etc.). I'[ll try to look at the code meanwhile. Thanks for your feedback! Also, please try with just "preview" appended and not the ignore extra keys option to see if there is a difference.

NAUbackup commented 7 years ago

My guess is your log file is hanging, so check the obvious, such as if the file system is full, it doesn't have proper write access or the mount point is stale. I can't imagine you'd run out of file descriptors. Also, verify you have enough space on your storage repository that the snapshots are able to successfully complete.

tmllc commented 7 years ago

OK. If i don't run with a config file, against a vm name, it executes fine.

NAUbackup commented 7 years ago

If you put in the VM names separately (no wildcard), does that work? I am suspecting a wildcard resolution issue.

tmllc commented 7 years ago

I'm using no wildcards. only vm names.

tmllc commented 7 years ago

This may be my issue. The job ran in cron last night, for > 60 minutes (finished with a warning - am investigating). The VM is 100GB, so it takes a while. If I was killing it yesterday with a ^C, it is probably understandable that it was waiting for input while the backup was running.

tmllc commented 7 years ago

It looks like my issue for the warning was a previously incomplete backup (due to my killing it). I apologize for the wild goose chase. I am considering this closed.

Thank you for the great software!

NAUbackup commented 7 years ago

No problem, just glad you were able to resolve it!