aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/config/states/nova_nfs_utime
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/config/states/nova_nfs_utime')
-rwxr-xr-xmcp/config/states/nova_nfs_utime14
1 files changed, 14 insertions, 0 deletions
diff --git a/mcp/config/states/nova_nfs_utime b/mcp/config/states/nova_nfs_utime
new file mode 100755
index 000000000..b8c046866
--- /dev/null
+++ b/mcp/config/states/nova_nfs_utime
@@ -0,0 +1,14 @@
+#!/bin/bash -e
+##############################################################################
+# Copyright (c) 2019 Mirantis Inc., Enea AB and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+salt -I 'nova:compute' pkg.install python-nova
+# https://bugs.launchpad.net/nova/+bug/1809123
+salt -I 'nova:compute' file.replace /usr/lib/python2.7/dist-packages/nova/privsep/path.py \
+ pattern="^\s{4}os\.utime\(path, None\)" \
+ repl="\n with open(path, 'a'):\n os.utime(path, None)"