GithubHelp home page GithubHelp logo

Comments (6)

grondo avatar grondo commented on September 15, 2024 1

I can't think of a way this could be done in flux-core alone, either, since the job-manager can't know why the job was rejected by a plugin , and we don't want to accidentally allow jobs rejected for other reasons.

I'm going to move this issue to flux-accounting. The mf_priority plugin can add a check to allow the current uid even if it doesn't have a current entry in the association. Or, perhaps a default bank can always be added for the instance owner. I'll allow @cmoussa1 to decide on the correct approach here.

from flux-accounting.

cmoussa1 avatar cmoussa1 commented on September 15, 2024 1

Oh, duh. I just realized if I have the UID I can just look up the corresponding username:

pwd.getpwuid(int(userid))

from flux-accounting.

cmoussa1 avatar cmoussa1 commented on September 15, 2024

Sounds good, I'm happy to take a look at this. To keep the logic the same in regards to other associations in the flux-accounting DB, perhaps we can just automatically add a default flux user and flux bank upon DB creation?

from flux-accounting.

grondo avatar grondo commented on September 15, 2024

Sounds like a good idea to me! You should be able to check the security.owner broker attribute, or just use getuid(2) to get the userid of the instance owner (it need not always be user flux).

from flux-accounting.

cmoussa1 avatar cmoussa1 commented on September 15, 2024

Cool, thanks! I think I'm able to get the userid no problem by just checking the security.broker attribute. Is there a way to fetch the name of the instance owner, then, if it is not always flux?

from flux-accounting.

grondo avatar grondo commented on September 15, 2024

Hm, you may have to use getpwuid_r(3), but let me see if somewhere else in flux already has this information.

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.