Skip to content

JournalConsumer permissions and scope? #7341

@vsoch

Description

@vsoch

The JournalConsumer seems to require a URI where the running user is the instance owner. E.g., when I try to instantiate using the system instance, I am denied:

# system instance on corona
handle = flux.Flux("local:///var/run/local")

# This works ok
consumer = flux.job.JournalConsumer(handle)
consumer.start()

# This is denied
consumer.poll()
PermissionError: [Errno 1] Request requires owner credentials

That is failing here:

errmsg = "Request requires owner credentials";

And I'm wondering if it might be possible to have it work, but filter to events that are owned by me? I was trying to tweak the rpc to set some kind of filter or constraint for that (just throwing salami at the wall, no luck so far)

class JournalConsumer(flux.job.JournalConsumer):
    @property
    def request_payload(self):
        return {"full": False, "userid": os.getuid(), "constraints": {"userid": os.getuid()}}

consumer = JournalConsumer(handle)
consumer.start()
consumer.poll()

Is this impossible? if I am submitting jobs on the head node, is there a reason I can't receive my job events? The use case is Genesis and being able to run a local service that can do that. When I do flux start I can only see one node (the head node) and can't submit to the system instance. I can do flux start and submit to the system instance:

flux start
FLUX_URI=local:///var/run/flux/local flux submit hostname

And indeed my job is there, but then I think events for that job (given running the consumer under flux start) would not seen because they aren't under my current instance.

Any help would be appreciated - let me know what I might try! The goals are to:

  1. Be able to submit jobs to the system instance
  2. Be able to receive events for them to respond to

This all works under an allocation, but the request is for the above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions