Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid job path with hostPath mode #304

Merged
merged 1 commit into from
Aug 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions paddlecloud/paddlejob/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@ def post(self, request, format=None):
# jobPackage validation: startwith /pfs
# NOTE: job packages are uploaded to /pfs/[dc]/home/[user]/jobs/[jobname]
job_name = obj.get("name", "paddle-cluster-job")
if settings.STORAGE_MODE == "CEPHFS":
package_in_pod = os.path.join("/pfs/%s/home/%s"%(dc, username), "jobs", job_name)
elif settings.STORAGE_MODE == "HDFS":
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we remove current method to deal with HDFS, shall we put a design doc and re-design ways to be compatible to it?

In another PR will be OK~

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, there is already a issue: #155, I'll make a PR tomorrow or the day after tomorrow.

package_in_pod = obj.get("jobPackage")
package_in_pod = os.path.join("/pfs/%s/home/%s"%(dc, username), "jobs", job_name)

logging.info("current package: %s", package_in_pod)
# package must be ready before submit a job
Expand Down