test=true and diff output

286 views
Skip to first unread message

cxw

unread,
Apr 8, 2019, 9:24:41 AM4/8/19
to Salt-users
Hi,

When salt applied a state which changed the contents of a text file it used to display a diff when using test=true. Now it just states that a state changed:

[root@salt salt]# salt ws1\* state.apply hosts test=true
ws1.xxx.xx.xx:
----------
          ID: /etc/hosts
    Function: file.managed
      Result: None
     Comment: The file /etc/hosts is set to be changed
     Started: 10:17:42.497992
    Duration: 101.644 ms
     Changes:   

Summary for ws1.xxx.xx.xx
------------
Succeeded: 1 (unchanged=1)
Failed:    0
------------
Total states run:     1
Total run time: 101.644 ms
[root@salt salt]# 


However, if it is run without test=true the state is applied and a diff displayed.

This makes it rather difficult to test state changes. I've had difficulty crafting a search term to determine if this is a known change, something do that can be configured, or a bug. I've played around with --state-output and --state-verbose, but these make no difference. I think this was working prior to upgrading to salt 2019.2.0 (Fluorine). It appears to be a minion problem, as the diff is displayed on the one xenial minion I have left running and old version of salt:

salt-common/xenial,xenial,now 2015.8.8+ds-1 all [installed,automatic]
salt-minion/xenial,xenial,now 2015.8.8+ds-1 all [installed]

The vast majority of the other minions are based on scientificl linux 6 or 7, using repo.saltstac.com/yum....

The salt master is also on 2019.2.0 (Fluorine).

Any ideas/pointers appreciated!

Chris

Max Arnold

unread,
Apr 8, 2019, 10:02:38 AM4/8/19
to salt-...@googlegroups.com
This will be fixed in 2019.2.1: https://github.com/saltstack/salt/issues/51932

4 апр. 2019 г., в 16:29, cxw <zzx...@gmail.com> написал(а):

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/a8ff3f35-5659-4b9d-be8b-577d322bb465%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages