summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2015-02-24 14:55:57 +0000
committerTiago Gomes <tiago.gomes@codethink.co.uk>2015-02-27 17:28:38 +0000
commite5a646f600d9da11804791e5e5cd565feea92eca (patch)
tree4ac5a07d703379bc49bd0dad3af7bbd418233fe9
parente2e87985b06fd0a05ada1f99e9a8b4a5612ed621 (diff)
downloaddefinitions-e5a646f600d9da11804791e5e5cd565feea92eca.tar.gz
pxeboot: avoid setting stdout=None when running rsync
If stdout=None, rsync hangs and the following error occurs error: uncaptured python exception, closing channel <morphlib.extensions._OutputDispatcher connected at 0x7f9bd5acf8> (<type 'exceptions.ValueError'>:unsupported format character 'k' (0x6b) at index 29 [/usr/lib/python2.7/asyncore.py|readwrite|108] [/usr/lib/python2.7/asyncore.py|handle_read_event|449] [/usr/lib/python2.7/asynchat.py|handle_read|165] [/usr/lib/python2.7/site-packages/morphlib/extensions.py|found_terminator|196] [/usr/lib/python2.7/site-packages/morphlib/plugins/deploy_plugin.py|_report_extension_stdout|615] [/usr/lib/python2.7/site-packages/morphlib/app.py|status|345])
-rwxr-xr-xpxeboot.write3
1 files changed, 2 insertions, 1 deletions
diff --git a/pxeboot.write b/pxeboot.write
index ef88228d..38fa4846 100755
--- a/pxeboot.write
+++ b/pxeboot.write
@@ -368,7 +368,8 @@ class PXEBoot(morphlib.writeexts.WriteExtension):
nfsroot = urlparse.urlunsplit((url.scheme, url.netloc, tempdir,
url.query, url.fragment))
cliapp.runcmd(['rsync', '-asXSPH', '--delete', rootfs, nfsroot],
- stdin=None, stdout=None, stderr=None)
+ stdin=None, stdout=open(os.devnull, 'w'),
+ stderr=None)
yield os.path.join(os.path.basename(tempdir),
os.path.basename(rootfs))