BaldMansMojo / check_vmware_esx

chech_vmware_esx Fork of check_vmware_api.pl
GNU General Public License v2.0
124 stars 67 forks source link

Rewrite session locking behavior #73

Closed lazyfrosch closed 5 years ago

lazyfrosch commented 9 years ago

Only a lock file is used when actually updating the session, which happens when:

Parallel jobs will try to use the old session, if that fails every process will re-login, but the session file will only be written once. The scripts checks if the session file has been changed since their own program start time.

I had problems with several checks over a few ESX hosts, where the plugin is racing against it's sisters for the lock file.

lazyfrosch commented 9 years ago

This PR also adds some debugging for sessions, debug() would be reusable anywhere, the option --debug is not documented, as it doesn't do much currently.

BaldMansMojo commented 9 years ago

I haven't understand completely what you have changed. Can you explain it in more detail? You can send me a mail (german possible) to mf(at)maerber.de. Martin

lazyfrosch commented 9 years ago

We talked about this in private. I'll make a few further tests, if that might cause trouble anyway.

The real problem seems to be that the VMware API doesn't like parallel requests

BaldMansMojo commented 9 years ago

That's why I implemented the serialization.