From af8e8eaf106d1ba04db2786d548f494d1bc68ef2 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Tue, 7 Jan 2014 16:05:05 +0000 Subject: Change how the nfboot write extension interacts with a nfs server --- morphlib/exts/nfsboot.write | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/morphlib/exts/nfsboot.write b/morphlib/exts/nfsboot.write index 34a72972..9c049cc5 100755 --- a/morphlib/exts/nfsboot.write +++ b/morphlib/exts/nfsboot.write @@ -206,8 +206,7 @@ mv "$temp" "$target" ['sh', '-c', exports_append_sh, '--', exports_path], feed_stdin=exports_string) cliapp.ssh_runcmd( - 'root@%s' % location, ['systemctl', 'restart', - 'nfs-server.service']) + 'root@%s' % location, ['exportfs', '-a']) def test_good_server(self, server): # Can be ssh'ed into @@ -222,13 +221,13 @@ mv "$temp" "$target" cliapp.ssh_runcmd( 'root@%s' % server, ['test', '-e', '/etc/exports']) except cliapp.AppException: - raise cliapp.AppException('server %s is not an nfs server' - % server) + raise cliapp.AppException('Server %s is not exporting any file ' + 'systems' % server) + try: cliapp.ssh_runcmd( - 'root@%s' % server, ['systemctl', 'is-enabled', + 'root@%s' % server, ['systemctl', 'is-active', 'nfs-server.service']) - except cliapp.AppException: raise cliapp.AppException('server %s does not control its ' 'nfs server by systemd' % server) -- cgit v1.2.1