GithubHelp home page GithubHelp logo

Comments (3)

garlick avatar garlick commented on August 11, 2024 1

When we updated fluke to flux-accounting 0.20, the update script tried to run but failed with the above when running as the flux user. Probably because it is running from flux cron in the broker's current working directory which is /:

[root@fluke1:flux]# ps -fu flux|grep broker
flux        2067       1  0 10:32 ?        00:00:55 broker --config-path=/etc/fl
[root@fluke1:flux]# ls -l /proc/2067/cwd
lrwxrwxrwx 1 flux flux 0 Oct  5 12:44 /proc/2067/cwd -> /

@grondo captured the cron error:

ate-fshare; /bin/flux account-priority-update"": "flux-accounting database out of date; please update DB with 'flux account-update-db' before running commands"
te-fshare; /bin/flux account-priority-update"": "ERROR:root:unable to open database file"
ate-fshare; /bin/flux account-priority-update"": "flux-accounting database out of date; updating DB with 'flux account-update-db' before sending infomation to plugin"
te-fshare; /bin/flux account-priority-update"": "Traceback (most recent call last):"
te-fshare; /bin/flux account-priority-update"": "  File "/usr/libexec/flux/cmd/flux-account-priority-update.py", line 139, in <module>"
te-fshare; /bin/flux account-priority-update"": "    main()"
te-fshare; /bin/flux account-priority-update"": "  File "/usr/libexec/flux/cmd/flux-account-priority-update.py", line 135, in main"
te-fshare; /bin/flux account-priority-update"": "    bulk_update(path)"
te-fshare; /bin/flux account-priority-update"": "  File "/usr/libexec/flux/cmd/flux-account-priority-update.py", line 68, in bulk_update"
te-fshare; /bin/flux account-priority-update"": "    conn = est_sqlite_conn(path)"
te-fshare; /bin/flux account-priority-update"": "  File "/usr/libexec/flux/cmd/flux-account-priority-update.py", line 59, in est_sqlite_conn"
te-fshare; /bin/flux account-priority-update"": "    subprocess.run(["flux", "account-update-db", "-p", path], check=True)"
te-fshare; /bin/flux account-priority-update"": "  File "/usr/lib64/python3.6/subprocess.py", line 438, in run"
te-fshare; /bin/flux account-priority-update"": "    output=stdout, stderr=stderr)"
te-fshare; /bin/flux account-priority-update"": "subprocess.CalledProcessError: Command '['flux', 'account-update-db', '-p', '/var/lib/flux/FluxAccounting.db']' returned non-zero exit status 1."
t-priority-update"": Failed: Exit 1

He was able to get jobs running again by running the update script manually. But anyway it sounds like this needs a fix more urgently.

from flux-accounting.

cmoussa1 avatar cmoussa1 commented on August 11, 2024 1

I'm about to post a PR that hopefully fixes this issue using the Python module you referenced in an above comment. The module enables the creation of the temporary database inside /tmp/ that's used to upgrade the old DB.

from flux-accounting.

garlick avatar garlick commented on August 11, 2024

A suggestion would be to create a unique temporary directory in /tmp for this.

This class may be helpful. Since the database contains user data, the directory and its contents should be removed afterwards on all exit paths.

from flux-accounting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.