salt: Unicode exception in saltmaster maintenance thread in 2019.2 RC1

Description of Issue/Question

On the current RC I get the follow in the saltmaster log:

2019-01-21 08:13:03,063 [salt.utils.process:772 ][ERROR   ][9447] An un-handled exception from the multiprocessing process 'Maintenance-4' was caught:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/salt/utils/process.py", line 765, in _run
    return self._original_run()
  File "/usr/lib/python2.7/dist-packages/salt/master.py", line 234, in run
    salt.daemons.masterapi.clean_old_jobs(self.opts)
  File "/usr/lib/python2.7/dist-packages/salt/daemons/masterapi.py", line 169, in clean_old_jobs
    rend=False,
  File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 883, in __init__
    role='master'
  File "/usr/lib/python2.7/dist-packages/salt/config/__init__.py", line 2434, in minion_config
    minion_id=minion_id)
  File "/usr/lib/python2.7/dist-packages/salt/config/__init__.py", line 3772, in apply_minion_config
    cache_minion_id=cache_minion_id)
  File "/usr/lib/python2.7/dist-packages/salt/config/__init__.py", line 3669, in get_id
    is_ipv4 = salt.utils.network.is_ipv4(newid)
  File "/usr/lib/python2.7/dist-packages/salt/utils/network.py", line 260, in is_ipv4
    return ipaddress.ip_address(ip).version == 4
  File "/usr/lib/python2.7/dist-packages/salt/ext/ipaddress.py", line 115, in ip_address
    return IPv6Address(address)
  File "/usr/lib/python2.7/dist-packages/salt/_compat.py", line 175, in __init__
    elif self._is_packed_binary(address):
  File "/usr/lib/python2.7/dist-packages/salt/_compat.py", line 194, in _is_packed_binary
    packed = bool(int(str(bytearray(data)).encode('hex'), 16))
TypeError: unicode argument without an encoding

This is a fresh saltmaster install with no other minions than the saltmaster itself added yet.

Setup

(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)

Steps to Reproduce Issue

I think you only need to watch saltmaster logs after having run highstate.

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

Salt Version:
           Salt: 2019.2.0rc1
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.5.3
      docker-py: Not Installed
          gitdb: 2.0.0
      gitpython: 2.1.1
          ioflo: Not Installed
         Jinja2: 2.9.4
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.13 (default, Sep 26 2018, 18:42:22)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 16.0.2
           RAET: Not Installed
          smmap: 2.0.1
        timelib: Not Installed
        Tornado: 4.4.3
            ZMQ: 4.2.1
 
System Versions:
           dist: debian 9.6 
         locale: UTF-8
        machine: x86_64
        release: 4.9.0-8-amd64
         system: Linux
        version: debian 9.6 

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (19 by maintainers)

Most upvoted comments

OK… I did find this:

>>> bool(int(str(bytearray(u'saltmaster')).encode('hex'), 16))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unicode argument without an encoding

I’ll keep digging. Thanks for the help you’ve provided so far.