Skip to content

Exception when using cp.push #35984

Closed
Closed

Description

@giany

I try to copy a file from minion to master using:

salt -l debug 'minion' cp.push /etc/issue

And I get the following error:

The minion function caused an exception: Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 1332, in _thread_return
        return_data = executor.execute()
      File "/usr/lib/python2.7/dist-packages/salt/executors/direct_call.py", line 28, in execute
        return self.func(*self.args, **self.kwargs)
      File "/usr/lib/python2.7/dist-packages/salt/modules/cp.py", line 799, in push
        load_path_list = os.path.split(load_path_split_drive)
      File "/usr/lib/python2.7/posixpath.py", line 92, in split
        i = p.rfind('/') + 1
    AttributeError: 'tuple' object has no attribute 'rfind'

Problem seems to be with the latest release 2016.3.3 , if I revert to 2016.3.2 it works properly.

Version used on minion:

dpkg -l | grep salt

ii  salt-common                    2016.3.3+ds-1             all          shared libraries that salt requires for all packages
ii  salt-minion                    2016.3.3+ds-1             all          client package for salt, the distributed remote execution system

Activity

  1. Ch3LL commented on Sep 1, 2016

    @Ch3LL
    Contributor

    @giany i am able to replicate this. git bisect shows 81c4d13 as the first bad commit. We will need to get this fixed up thanks

  2. added
    bug
    P2
    Core
    severity-high
    on Sep 1, 2016
  3. added this to the Approved milestone on Sep 1, 2016
  4. added
    severity-critical
    on Sep 2, 2016
  5. modified the milestones: C 4, Approved on Sep 2, 2016
  6. scavara commented on Sep 4, 2016

    @scavara

    Not sure is the following useful for you, or not but I have the same problem on the bit older version installed from Debian Jessie backports:

    # dpkg -l | grep salt-master && salt-call --versions-report | grep -i salt
    ii  salt-master                        2016.3.0+ds-1~bpo8+1         <snip>
    Salt Version:
               Salt: 2016.3.0
    
     # salt 'minion' cp.push /etc/hosts
    minion:
        The minion function caused an exception: Traceback (most recent call last):
          File "/opt/salt/lib/python2.7/site-packages/salt/minion.py", line 1332, in _thread_return
            return_data = executor.execute()
          File "/opt/salt/lib/python2.7/site-packages/salt/executors/direct_call.py", line 28, in execute
            return self.func(*self.args, **self.kwargs)
          File "/opt/salt/lib/python2.7/site-packages/salt/modules/cp.py", line 799, in push
            load_path_list = os.path.split(load_path_split_drive)
          File "/opt/salt/lib/python2.7/posixpath.py", line 83, in split
            i = p.rfind('/') + 1
        AttributeError: 'tuple' object has no attribute 'rfind'
    
  7. cachedout commented on Sep 8, 2016

    @cachedout
    Contributor

    Fixed here: #36136

  8. added
    fixed-pls-verify
    on Sep 8, 2016
  9. vchav73 commented on Sep 20, 2016

    @vchav73

    Can anyone comment on when the fix will be in the yum repo? #36287 mentions that the fix will be in the 2016.3.4 release. Just wondering if it'll be days, weeks, months? We're effected by this and may downgrade to 2016.3.2 if it's going to be a while.

    Thanks.

  10. Ch3LL commented on Sep 21, 2016

    @Ch3LL
    Contributor

    @vchav73 october is the current goal to get 2016.3.4 out by October, although I am not certain of the exact date. In the meantime you can downgrade to 2016.3.2 or possibly push the fix as a custom module by putting it in /srv/salt/_modules/ and then running salt '*' saltutil.refresh_modules

  11. vchav73 commented on Sep 22, 2016

    @vchav73

    Thanks for the info. One more question: Do all the minions as well as the master need to be downgraded or just the master?

  12. Ch3LL commented on Sep 22, 2016

    @Ch3LL
    Contributor

    I believe this is a minion side module and it looks like the fix is related to how the file path on the minion you want to copy up to the master is handled so minions need to updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

CoreP2ZRELEASED - 2016.3.4bugfixed-pls-verifyseverity-criticalseverity-high

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions