From 2e62cb8a6406309cbeb5f8d2aa00fb30e72e1cfc Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Mon, 9 Jul 2018 20:13:47 +0000 Subject: docs: note in rtd about avoiding /tmp when writing files LP: #1727876 --- cloudinit/config/cc_bootcmd.py | 8 +++++++- cloudinit/config/cc_runcmd.py | 5 +++++ cloudinit/config/cc_write_files.py | 5 +++++ 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'cloudinit') diff --git a/cloudinit/config/cc_bootcmd.py b/cloudinit/config/cc_bootcmd.py index db64f0a6..6813f534 100644 --- a/cloudinit/config/cc_bootcmd.py +++ b/cloudinit/config/cc_bootcmd.py @@ -42,7 +42,13 @@ schema = { .. note:: bootcmd should only be used for things that could not be done later - in the boot process."""), + in the boot process. + + .. note:: + + when writing files, do not use /tmp dir as it races with + systemd-tmpfiles-clean LP: #1707222. Use /run/somedir instead. + """), 'distros': distros, 'examples': [dedent("""\ bootcmd: diff --git a/cloudinit/config/cc_runcmd.py b/cloudinit/config/cc_runcmd.py index b6f6c807..1f75d6c5 100644 --- a/cloudinit/config/cc_runcmd.py +++ b/cloudinit/config/cc_runcmd.py @@ -42,6 +42,11 @@ schema = { all commands must be proper yaml, so you have to quote any characters yaml would eat (':' can be problematic) + + .. note:: + + when writing files, do not use /tmp dir as it races with + systemd-tmpfiles-clean LP: #1707222. Use /run/somedir instead. """), 'distros': distros, 'examples': [dedent("""\ diff --git a/cloudinit/config/cc_write_files.py b/cloudinit/config/cc_write_files.py index 1b7e7e30..31d1db61 100644 --- a/cloudinit/config/cc_write_files.py +++ b/cloudinit/config/cc_write_files.py @@ -18,6 +18,11 @@ binary gzip data can be specified and will be decoded before being written. follows yaml formatting standards. to specify binary data, use the yaml option ``!!binary`` +.. note:: + Do not write files under /tmp during boot because of a race with + systemd-tmpfiles-clean that can cause temp files to get cleaned during + the early boot process. Use /run/somedir instead to avoid race LP:1707222. + **Internal name:** ``cc_write_files`` **Module frequency:** per instance -- cgit v1.2.3