saltstack/salt

chattr in file.managed applied at the wrong time

Open

#55.489 aberto em 2 de dez. de 2019

Ver no GitHub
 (9 comments) (0 reactions) (0 assignees)Python (5.508 forks)batch import
buggood first issueseverity-medium

Métricas do repositório

Stars
 (13.710 stars)
Métricas de merge de PR
 (Mesclagem média 72d 6h) (221 fundiu PRs em 30d)

Description

Description of Issue

when using file.managed, an immutable file causes an error. When using attrs: "" - that removes immutable, but only AFTER the content change (that fails, immutable is never removed)

Setup

echo "aa" > /somefile chattr +i /somefile

Steps to Reproduce Issue

state: some file: file.managed: - name: /somefile - attr: "" - content: "xx"

salt runs with: Failed to commit change: [Errno 1] Operation not permitted if the file content is ok, immutable flag gets properly removed

Versions Report

Salt Version: Salt: 2018.3.4

Dependency Versions: cffi: 1.6.0 cherrypy: unknown dateutil: Not Installed docker-py: Not Installed gitdb: 0.6.4 gitpython: 1.0.1 ioflo: Not Installed Jinja2: 2.7.2 libgit2: 0.26.3 libnacl: Not Installed M2Crypto: 0.28.2 Mako: Not Installed msgpack-pure: Not Installed msgpack-python: 0.5.6 mysql-python: 1.2.5 pycparser: 2.14 pycrypto: 2.6.1 pycryptodome: Not Installed pygit2: 0.26.4 Python: 2.7.5 (default, Oct 30 2018, 23:45:53) python-gnupg: Not Installed PyYAML: 3.11 PyZMQ: 15.3.0 RAET: Not Installed smmap: 0.9.0 timelib: Not Installed Tornado: 4.2.1 ZMQ: 4.1.4

System Versions: dist: centos 7.6.1810 Core locale: UTF-8 machine: x86_64 release: 4.15.0-54-generic system: Linux version: CentOS Linux 7.6.1810 Core

Guia do colaborador