Skip to content

Conversation

@Yancey0623
Copy link
Collaborator

Fixed #51

@Yancey0623 Yancey0623 requested a review from typhoonzero May 22, 2017 06:27
#DATACENTERS = {
# ...
# "dc1":{
# "type": "hostpath",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe fstype is better?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

# "user": "admin",
# "mount_path": "/pfs/datacenter1/home/%s/", # mount_path % username
# "cephfs_path": "/%s" # cephfs_path % username
# "admin_key": "/certs/admin.secret"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should contain type in this example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

type => fstype
Done.

))
if dc == name:
if cfg["type"] == "cephfs":
volumes.append(CephFSVolume(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check if monitors_addr user secret exists. Return an error code when parameters not found.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These parameters are in settings.py, I think we can check the configurations at the start-up phase of the cloud server. And maybe implement this feature in another PR is suitable.

@@ -0,0 +1,4 @@
from cephfs_volume import CephFSVolume
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems package volume is too small to exist. We can have:

def get_volume_config(**kwargs):
    __check_parameters(kwargs)
    tmpl = __get_template(kwargs["type"])
    return json.loads(__render(tmpl, kwargs))

Copy link
Collaborator Author

@Yancey0623 Yancey0623 May 22, 2017

Choose a reason for hiding this comment

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

Good point!I have use templates instead of package volume.Thanks a lot!
Done.

}

def __render(tmpl, **kwargs):
tmpl.replace("$NAME", "sfsdf")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This line is not needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Copy link
Collaborator

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

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

LGTM

@Yancey0623 Yancey0623 merged commit 484aa27 into PaddlePaddle:develop May 22, 2017
@Yancey0623 Yancey0623 deleted the hostpath_volume branch May 22, 2017 11:42
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.

2 participants