diff options
author | Ben Brown <ben.brown@codethink.co.uk> | 2014-01-07 16:05:05 +0000 |
---|---|---|
committer | Ben Brown <ben.brown@codethink.co.uk> | 2014-01-07 16:48:27 +0000 |
commit | af8e8eaf106d1ba04db2786d548f494d1bc68ef2 (patch) | |
tree | 22dbbfcab5b153282432e0d1b9e6987acb7a832b | |
parent | 87adff1b40ab0e3ce512185fa3fd4ecc641e0b32 (diff) | |
download | morph-benbrown/nfsboot-fix.tar.gz |
Change how the nfboot write extension interacts with a nfs serverbenbrown/nfsboot-fix
-rwxr-xr-x | morphlib/exts/nfsboot.write | 11 |
1 files 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) |