Skip to content

jobEnvironment dropping content after = in value #33

Open

Description

@cancan101

I am running this script:

   with drmaa.Session() as s:
       jt = s.createJobTemplate()
       jt.remoteCommand = "python"
       jt.args = ['env.py']
       jt.jobEnvironment = {'ALEX':'alex=2'}
       jt.joinFiles=True
       jobid = s.runJob(jt)
       s.deleteJobTemplate(jt)

with this script env.py:

import os
print os.environ

When I look at my environment, I see:

'ALEX': 'alex', 

Activity

  1. cancan101 commented on Jul 22, 2015

    @cancan101
    Author

    For reference, this works fine: $ qsub -v ALEX=alex=2 -b y -j y python env.py.

  2. dan-blanchard commented on Jul 23, 2015

    @dan-blanchard
    Contributor

    That's very strange. From looking at where we handle setting DictAttribute values, I don't see anything that jumps out as wrong.

    Could you try changing {'ALEX': 'alex=2'} to {'ALEX': '"alex=2"'} (with extra inner double-quotes around the value)? I'm wondering if the DRMAA C implementation you're using is doing something stupid on its end.

  3. cancan101 commented on Jul 23, 2015

    @cancan101
    Author

    I believe I was able to get this bug reproduced using your travis setup:
    c8a9c5e
    results: https://travis-ci.org/cancan101/drmaa-python/jobs/72308774

  4. cancan101 commented on Jul 23, 2015

    @cancan101
    Author

    Wrapping with " still leads to the same truncation after the =: '"alex

  5. nicoulaj commented on Jun 16, 2017

    @nicoulaj

    FYI, this bug is in the C implementation of DRMAA, see http://gridengine.org/pipermail/users/2016-April/009042.html

  6. jakirkham commented on Mar 12, 2018

    @jakirkham
    Contributor

    It's worth noting that users may be able to hack around this by using nativeSpecification. In any event, this is an issue with the particular DRMAA implementation itself and not drmaa-python. As such, this probably should be closed. Possibly could add a note in the docs about this issue and the (proposed) workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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