b8c046866ff19f9cfbc392ef60ebcd942764cb0d
[fuel.git] / mcp / config / states / nova_nfs_utime
1 #!/bin/bash -e
2 ##############################################################################
3 # Copyright (c) 2019 Mirantis Inc., Enea AB and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 salt -I 'nova:compute' pkg.install python-nova
11 # https://bugs.launchpad.net/nova/+bug/1809123
12 salt -I 'nova:compute' file.replace /usr/lib/python2.7/dist-packages/nova/privsep/path.py \
13   pattern="^\s{4}os\.utime\(path, None\)" \
14   repl="\n    with open(path, 'a'):\n        os.utime(path, None)"