Skip to content

Conversation

@lithorus
Copy link
Collaborator

@lithorus lithorus commented Sep 17, 2024

Link the Issue(s) this Pull Request is related to.
Fixes #420

Summarize your change.
Removes hardcoded environment variables specific for SPI
If the variables are still needed, they can be exposed for the job again by adding them to the [UseHostEnvVar] section of rqd.conf

@lithorus lithorus changed the title Remove hardcoded MAIL and HOME rqd environment variables [rqd] Remove hardcoded MAIL and HOME rqd environment variables Sep 19, 2024
Comment on lines -101 to -104
if platform.system() in ("Linux", "Darwin"):
self.frameEnv["MAIL"] = "/usr/mail/%s" % self.runFrame.user_name
self.frameEnv["HOME"] = "/net/homedirs/%s" % self.runFrame.user_name
elif platform.system() == "Windows":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These variables are spi specific and safe to be removed. As these env vars are required at SPI, I think this PR should provide a alternative to how to set these variables from now on. I guess the following logic can be used, and it should be documented on this PR.

 for key, value in self.runFrame.environment.items():
            if key == 'PATH':
                self.frameEnv[key] += os.pathsep + value
            else:
                self.frameEnv[key] = value

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rqd.conf already have a way of passing host enviroment variables onto the job (under [UseHostEnvVar])

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have added how to re-enable them again in the PR description

@DiegoTavares DiegoTavares merged commit 2809037 into AcademySoftwareFoundation:master Oct 1, 2024
@lithorus lithorus deleted the remove-hardcoded-home branch December 16, 2024 22:34
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

Successfully merging this pull request may close these issues.

RQD hardcoded HOME location

2 participants