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

nfs sharing problem when node is added after restart or re-added after removed. #519

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion starcluster/clustersetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def on_add_node(self, node, nodes, master, user, user_shell, volumes):
self._volumes = volumes
self._setup_hostnames(nodes=[node])
self._setup_etc_hosts(nodes)
self._setup_nfs(nodes=[node], start_server=False)
self._create_user(node)
self._setup_nfs(nodes=[node], start_server=False)
self._setup_scratch(nodes=[node])
self._setup_passwordless_ssh(nodes=[node])
4 changes: 3 additions & 1 deletion starcluster/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ def export_fs_to_nodes(self, nodes, export_paths):
self.stop_exporting_fs_to_nodes(nodes, paths=export_paths)
log.info("Configuring NFS exports path(s):\n%s" %
' '.join(export_paths))
nfs_export_settings = "(async,no_root_squash,no_subtree_check,rw)"
#nfs_export_settings = "(async,no_root_squash,no_subtree_check,rw)"

Choose a reason for hiding this comment

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

Why are you commenting this out?

Copy link
Author

Choose a reason for hiding this comment

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

It's my commit mistake.
I've actually used
nfs_export_settings = "(sync,rw)" #no_root_squash,no_subtree_check
this setting. Anyway not related with #518.

This line should not be commented out.

etc_exports = self.ssh.remote_file('/etc/exports', 'r')
contents = etc_exports.read()
etc_exports.close()
Expand Down Expand Up @@ -702,6 +702,7 @@ def stop_exporting_fs_to_nodes(self, nodes, paths=None):
def start_nfs_server(self):
log.info("Starting NFS server on %s" % self.alias)
self.ssh.execute('/etc/init.d/portmap start', ignore_exit_status=True)
#self.ssh.execute('service rpcbind start', ignore_exit_status=True)
self.ssh.execute('mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs/',
ignore_exit_status=True)
EXPORTSD = '/etc/exports.d'
Expand All @@ -728,6 +729,7 @@ def mount_nfs_shares(self, server_node, remote_paths):
remote_paths - list of remote paths to mount from server_node
"""
self.ssh.execute('/etc/init.d/portmap start')
#self.ssh.execute('service rpcbind start')
# TODO: move this fix for xterm somewhere else
self.ssh.execute('mount -t devpts none /dev/pts',
ignore_exit_status=True)
Expand Down