Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vars.db.lock - multiple rex execution #13

Open
Azryel opened this issue Jul 21, 2015 · 1 comment
Open

vars.db.lock - multiple rex execution #13

Azryel opened this issue Jul 21, 2015 · 1 comment

Comments

@Azryel
Copy link

Azryel commented Jul 21, 2015

Hello,

I use a tasks scheduler i made to run a lot of simultaneous rex jobs in threads.
I run into problems when i try to execute it through crontab.
This is what i get in mail after execution :
Permission denied at /usr/share/perl5/vendor_perl/Rex/Shared/Var/Array.pm line 138.

which refers to :
sysopen( my $dblock, "vars.db.lock", O_RDONLY | O_CREAT ) or die($!);

I don't understand what this file is used for and where/when it is created.
I run rex with the "-F" flag to avoid the rexfile lock to be significant (even though it still gets created).

It doesn't seem to get in the way of my tasks, they still get executed fine.
I get the logs through a web interface i also made and which reports rex errors. It logs the "Permission denied" error after the tasks have been successfully executed, not before.

I can't reproduce the error via the user's cli, only through his crontab.

Could you give me a hint what this "vars.db" file is and what it is used for ?

Thank you very much :)
Daryl

@mbroadhead
Copy link

@Azryel and Daryl,
Have a look at the perldoc for Rex::Shared::Var. The following is from version 1.5.0-3-g06d9602:

NAME
    Rex::Shared::Var - Share variables across Rex tasks

DESCRIPTION
    Share variables across Rex tasks with the help of Storable, using a
    "vars.db.$PID" file in the local directory, where $PID is the PID of the
    parent process.
...

You could also try upgrading to the latest release (currently 1.4.1), which may have fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants