SHA256
1
0
forked from pool/salt
salt/enable-passing-a-unix_socket-for-mysql-returners-bsc.patch
Jochen Breuer f635624f70 Accepting request 609093 from systemsmanagement:saltstack:testing
- No more AWS EC2 rate limitations in salt-cloud (bsc#1088888)
- MySQL returner now also allows to use Unix sockets (bsc#1091371)
- Added:
  * fix-for-ec2-rate-limit-failures.patch
  * enable-passing-a-unix_socket-for-mysql-returners-bsc.patch
                                                                                    
- Do not override jid on returners, only sending back to master (bsc#1092373)
- Fixes for salt-ssh:
    - Option --extra-filerefs doesn't add all files to the state
      archive
    - Pillar completely overwritten (not merged) when doing
      module.run + state.apply with pillar in kwargs
- Remove minion/thin/version if exists to force thin regeneration (bsc#1092161)
- Added:
  * extra-filerefs-include-files-even-if-no-refs-in-stat.patch
  * do-not-override-jid-on-returners-only-sending-back-t.patch
  * option-to-merge-current-pillar-with-opts-pillar-duri.patch

OBS-URL: https://build.opensuse.org/request/show/609093
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=123
2018-05-16 09:48:03 +00:00

75 lines
2.8 KiB
Diff

From cdfb19b6c2801a7d5a883492a0ccc57c803dcd7f Mon Sep 17 00:00:00 2001
From: Maximilian Meister <mmeister@suse.de>
Date: Thu, 3 May 2018 15:52:23 +0200
Subject: [PATCH] enable passing a unix_socket for mysql returners
(bsc#1091371)
quick fix for:
https://bugzilla.suse.com/show_bug.cgi?id=1091371
the upstream patch will go through some bigger refactoring of
the mysql drivers to be cleaner
this patch should only be temporary and can be dropped again once
the refactor is done upstream
Signed-off-by: Maximilian Meister <mmeister@suse.de>
---
salt/returners/mysql.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/salt/returners/mysql.py b/salt/returners/mysql.py
index 85892cb06c..a286731d5c 100644
--- a/salt/returners/mysql.py
+++ b/salt/returners/mysql.py
@@ -18,6 +18,7 @@ config. These are the defaults:
mysql.pass: 'salt'
mysql.db: 'salt'
mysql.port: 3306
+ mysql.unix_socket: '/tmp/mysql.sock'
SSL is optional. The defaults are set to None. If you do not want to use SSL,
either exclude these options or set them to None.
@@ -43,6 +44,7 @@ optional. The following ssl options are simply for illustration purposes:
alternative.mysql.ssl_ca: '/etc/pki/mysql/certs/localhost.pem'
alternative.mysql.ssl_cert: '/etc/pki/mysql/certs/localhost.crt'
alternative.mysql.ssl_key: '/etc/pki/mysql/certs/localhost.key'
+ alternative.mysql.unix_socket: '/tmp/mysql.sock'
Should you wish the returner data to be cleaned out every so often, set
`keep_jobs` to the number of hours for the jobs to live in the tables.
@@ -198,7 +200,8 @@ def _get_options(ret=None):
'port': 3306,
'ssl_ca': None,
'ssl_cert': None,
- 'ssl_key': None}
+ 'ssl_key': None,
+ 'unix_socket': '/tmp/mysql.sock'}
attrs = {'host': 'host',
'user': 'user',
@@ -207,7 +210,8 @@ def _get_options(ret=None):
'port': 'port',
'ssl_ca': 'ssl_ca',
'ssl_cert': 'ssl_cert',
- 'ssl_key': 'ssl_key'}
+ 'ssl_key': 'ssl_key',
+ 'unix_socket': 'unix_socket'}
_options = salt.returners.get_returner_options(__virtualname__,
ret,
@@ -261,7 +265,8 @@ def _get_serv(ret=None, commit=False):
passwd=_options.get('pass'),
db=_options.get('db'),
port=_options.get('port'),
- ssl=ssl_options)
+ ssl=ssl_options,
+ unix_socket=_options.get('unix_socket'))
try:
__context__['mysql_returner_conn'] = conn
--
2.13.6