Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syslog_return failing on Centos7 #48548

Closed
soostdijck opened this issue Jul 12, 2018 · 3 comments
Closed

syslog_return failing on Centos7 #48548

soostdijck opened this issue Jul 12, 2018 · 3 comments
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@soostdijck
Copy link

Description of Issue/Question

I'm trying to set up a the syslog returner but I'm getting the following error:

minion log

2018-07-12 14:15:13,372 [salt.minion      :1729][ERROR   ][4039] The return failed for job 20180712141512530947: openlog() argument 1 must be string, not unicode
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/salt/minion.py", line 1720, in _thread_return
    minion_instance.returners[returner_str](ret)
  File "/usr/lib/python2.7/site-packages/salt/returners/syslog_return.py", line 202, in returner
    syslog.openlog(_options.get('tag', 'salt-minion'), logoption)
TypeError: openlog() argument 1 must be string, not unicode

master log

2018-07-12 14:20:04,023 [salt.master      :2201][CRITICAL][5015] The specified returner used for the external job cache "syslog" does not have a save_load function!

Setup

master config

fileserver_backend:
  - roots

# file_roots are updated by cron every min via /etc/cron.d/salt-update
# NOTE vagrant has it's own master config that is copied when vagrant
# provisions the machines
pillar_roots:
  base:
    - /vagrant/salt/salt # this contains the vagrant specific top.sls pushed by vagrant
    - /export/salt/state # this is the shared folder for ncc-top
    - /export/formula-core
    - /export/formula-access
    - /export/formula-services

file_roots:
  base:
    - /export/salt/state
    - /export/salt-file-store

pillar_merge_lists: True

# specify a default returner for all minions (must be in master config)
ext_job_cache: syslog

minion config

master: 192.168.50.10

log_level: warning

state_output: changes
state_tabular: True

syslog:
  level: 'LOG_INFO'
  facility: 'LOG_DAEMON'
  tag: 'salt-minion'
  options:
    - LOG_PID

Steps to Reproduce Issue

The issue seems to only occur when I run the command below on the master. On the minion the error does not happen.

salt 'minion1*' test.ping --return syslog

Versions Report

Salt Version:
           Salt: 2018.3.2

Dependency Versions:
           cffi: 1.6.0
       cherrypy: Not Installed
       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: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.1
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 0.26.4
         Python: 2.7.5 (default, Apr 11 2018, 07:36:10)
   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.5.1804 Core
         locale: ANSI_X3.4-1968
        machine: x86_64
        release: 3.10.0-862.2.3.el7.x86_64
         system: Linux
        version: CentOS Linux 7.5.1804 Core
@Ch3LL
Copy link
Contributor

Ch3LL commented Jul 13, 2018

looks like i'm able to replicate this. Working on a fix right now

@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 labels Jul 13, 2018
@Ch3LL Ch3LL added this to the Blocked milestone Jul 13, 2018
@soostdijck
Copy link
Author

Great, can this be added for 2018.3.3 please?

@Ch3LL
Copy link
Contributor

Ch3LL commented Jul 17, 2018

yep it will already be included in that release :)

@Ch3LL Ch3LL closed this as completed Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

2 participants