salt icon indicating copy to clipboard operation
salt copied to clipboard

File > Manage seems to be broken.

Open cdnporkchop opened this issue 13 years ago • 3 comments

Running an Ubuntu Master and Windows2008R2 Minion, and during the execution of the file - managed, the error "NameError: global name '_binary_replace' is not defined" is returned.

(http://pastebin.com/REDLpwAR)

--- Example .sls entry
# Configure the jmx-console-users.properties
/jboss-eap-5.1/jboss-as/server/default/conf/props/jmx-console-users.properties:
  file:
    - managed
    - template: jinja
    - name: 'c:/jboss-eap-5.1/jboss-as/server/default/conf/props/jmx-console-users.properties'
    - source: 'salt://win/repo/jboss-as/jmx-console-users.properties.jinja2'
    - require:
      - cmd: 'extract-jboss-as'
---Error Message
    State: - file
    Name:      c:/jboss-eap-5.1/jboss-as/server/default/conf/props/jmx-console-users.properties
    Function:  managed
        Result:    False
        Comment:   An exception occurred in this state: Traceback (most recent call last):
  File "c:\salt\python27\lib\site-packages\salt\state.py", line 1237, in call
    *cdata['args'], **cdata['kwargs'])
  File "c:\salt\python27\lib\site-packages\salt\states\file.py", line 868, in managed
    contents)
  File "c:\salt\python27\lib\site-packages\salt\modules\file.py", line 1600, in manage_file
    bdiff = _binary_replace(name, sfn)
NameError: global name '_binary_replace' is not defined

cdnporkchop avatar Jul 11 '13 21:07 cdnporkchop

Thanks for the report. @UtahDave can you look into this?

basepi avatar Jul 11 '13 21:07 basepi

I wrote the code that's causing the traceback, I'll give it a quick look.

terminalmage avatar Jul 11 '13 22:07 terminalmage

Fixed in https://github.com/saltstack/salt/pull/6120.

terminalmage avatar Jul 11 '13 22:07 terminalmage