salt: Red Hat 6 and CentOS 6 are no longer fully supported after version 2017.x.x

Description of Issue/Question

I have been using https://github.com/saltstack-formulas/mysql-formula for ages but after I upgraded to 2017.7.0 and later 2017.7.1 it’s no longer possible to manage users in MySQL for Red Hat 6(.9)

I changed the state to it’s minimum and it still fails exactly the same way (took example just to be sure I did not do anything wrong: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql_user.html) State test.sls:

frank:
  mysql_user.present:
    - host: localhost
    - password: bobcat
    - connection_host: '127.0.0.1'
    - connection_user: 'root'
    - connection_pass: '[[ REDACTED ]]'

Debug log

[DEBUG ] Reading configuration from /etc/salt/minion [DEBUG ] Including configuration from ‘/etc/salt/minion.d/_schedule.conf’ [DEBUG ] Reading configuration from /etc/salt/minion.d/_schedule.conf [DEBUG ] Configuration file path: /etc/salt/minion [WARNING ] Insecure logging configuration detected! Sensitive data may be logged. [DEBUG ] Reading configuration from /etc/salt/minion [DEBUG ] Including configuration from ‘/etc/salt/minion.d/_schedule.conf’ [DEBUG ] Reading configuration from /etc/salt/minion.d/_schedule.conf [DEBUG ] Connecting to master. Attempt 1 of 1 [DEBUG ] Initializing new AsyncAuth for (‘/etc/salt/pki/minion’, ‘aspod-johan-main01’, ‘tcp://salt:4506’) [DEBUG ] Generated random reconnect delay between ‘1000ms’ and ‘11000ms’ (7438) [DEBUG ] Setting zmq_reconnect_ivl to ‘7438ms’ [DEBUG ] Setting zmq_reconnect_ivl_max to ‘11000ms’ [DEBUG ] Initializing new AsyncZeroMQReqChannel for (‘/etc/salt/pki/minion’, ‘aspod-johan-main01’, ‘tcp://salt:4506’, ‘clear’) [DEBUG ] Decrypting the current master AES key [DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem [DEBUG ] SaltEvent PUB socket URI: /var/run/salt/minion/minion_event_b760395531_pub.ipc [DEBUG ] SaltEvent PULL socket URI: /var/run/salt/minion/minion_event_b760395531_pull.ipc [DEBUG ] Initializing new IPCClient for path: /var/run/salt/minion/minion_event_b760395531_pull.ipc [DEBUG ] Sending event: tag = salt/auth/creds; data = {‘_stamp’: ‘2017-08-16T14:20:17.232240’, ‘creds’: {‘publish_port’: 4505, ‘aes’: ‘[[ REDACTED ]]’, ‘master_uri’: ‘tcp://salt:4506’}, ‘key’: (‘/etc/salt/pki/minion’, ‘aspod-johan-main01’, ‘tcp://salt:4506’)} [DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem [DEBUG ] Determining pillar cache [DEBUG ] Initializing new AsyncZeroMQReqChannel for (‘/etc/salt/pki/minion’, ‘aspod-johan-main01’, ‘tcp://salt:4506’, ‘aes’) [DEBUG ] Initializing new AsyncAuth for (‘/etc/salt/pki/minion’, ‘aspod-johan-main01’, ‘tcp://salt:4506’) [DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem [DEBUG ] LazyLoaded jinja.render [DEBUG ] LazyLoaded yaml.render [DEBUG ] LazyLoaded state.sls [DEBUG ] LazyLoaded saltutil.is_running [DEBUG ] LazyLoaded grains.get [DEBUG ] Initializing new AsyncZeroMQReqChannel for (‘/etc/salt/pki/minion’, ‘aspod-johan-main01’, ‘tcp://salt:4506’, ‘aes’) [DEBUG ] Initializing new AsyncAuth for (‘/etc/salt/pki/minion’, ‘aspod-johan-main01’, ‘tcp://salt:4506’) [INFO ] Loading fresh modules for state activity [DEBUG ] LazyLoaded jinja.render [DEBUG ] LazyLoaded yaml.render [DEBUG ] In saltenv ‘base’, looking at rel_path ‘test.sls’ to resolve ‘salt://test.sls’ [DEBUG ] In saltenv ‘base’, ** considering ** path ‘/var/cache/salt/minion/files/base/test.sls’ to resolve ‘salt://test.sls’ [DEBUG ] Fetching file from saltenv ‘base’, ** attempting ** ‘salt://test.sls’ [DEBUG ] No dest file found [INFO ] Fetching file from saltenv ‘base’, ** done ** ‘test.sls’ [DEBUG ] compile template: /var/cache/salt/minion/files/base/test.sls [DEBUG ] Jinja search path: [‘/var/cache/salt/minion/files/base’] [PROFILE ] Time (in seconds) to render ‘/var/cache/salt/minion/files/base/test.sls’ using ‘jinja’ renderer: 0.00320887565613 [DEBUG ] Rendered data from file: /var/cache/salt/minion/files/base/test.sls: frank: mysql_user.present: - host: localhost - password: bobcat - connection_host: ‘127.0.0.1’ - connection_user: ‘root’ - connection_pass: ‘[[ REDACTED ]]’

[DEBUG ] LazyLoaded config.get [DEBUG ] Results of YAML rendering: OrderedDict([(‘frank’, OrderedDict([(‘mysql_user.present’, [OrderedDict([(‘host’, ‘localhost’)]), OrderedDict([(‘password’, ‘bobcat’)]), OrderedDict([(‘connection_host’, ‘127.0.0.1’)]), OrderedDict([(‘connection_user’, ‘root’)]), OrderedDict([(‘connection_pass’, ‘[[ REDACTED ]]’)])])]))]) [PROFILE ] Time (in seconds) to render ‘/var/cache/salt/minion/files/base/test.sls’ using ‘yaml’ renderer: 0.00501585006714 [DEBUG ] Failed to import module pagerduty_util: Traceback (most recent call last): File “/usr/lib/python2.7/site-packages/salt/loader.py”, line 1411, in load_module mod = imp.load_module(mod_namespace, fn, fpath, desc) File “/usr/lib/python2.7/site-packages/salt/modules/pagerduty_util.py”, line 24, in <module> import requests File “/usr/lib/python2.7/site-packages/requests/init.py”, line 58, in <module> from . import utils File “/usr/lib/python2.7/site-packages/requests/utils.py”, line 25, in <module> from . import certs ImportError: cannot import name certs [DEBUG ] Module DSC: Only available on Windows systems [DEBUG ] Module PSGet: Only available on Windows systems [DEBUG ] Could not LazyLoad mysql.user_create: ‘mysql’ virtual returned False: The mysql execution module cannot be loaded: neither MySQLdb nor PyMySQL is available. [DEBUG ] LazyLoaded acme.cert [DEBUG ] Could not LazyLoad apache.a2enconf: ‘apache.a2enconf’ is not available. [DEBUG ] Could not LazyLoad apache.a2enmod: ‘apache.a2enmod’ is not available. [DEBUG ] Could not LazyLoad apache.a2ensite: ‘apache.a2ensite’ is not available. [DEBUG ] Could not LazyLoad pkg.get_selections: ‘pkg.get_selections’ is not available. [DEBUG ] Could not LazyLoad augeas.execute: ‘augeas.execute’ is not available. [DEBUG ] LazyLoaded bigip.list_transaction [DEBUG ] LazyLoaded boto3_elasticache.cache_cluster_exists [DEBUG ] LazyLoaded boto3_route53.find_hosted_zone [DEBUG ] LazyLoaded boto_apigateway.describe_apis [DEBUG ] LazyLoaded boto_asg.exists [DEBUG ] LazyLoaded boto_cfn.exists [DEBUG ] LazyLoaded boto_cloudtrail.exists [DEBUG ] LazyLoaded boto_cloudwatch.get_alarm [DEBUG ] LazyLoaded boto_cloudwatch_event.exists [DEBUG ] LazyLoaded boto_cognitoidentity.describe_identity_pools [DEBUG ] LazyLoaded boto_datapipeline.create_pipeline [DEBUG ] LazyLoaded boto_dynamodb.exists [DEBUG ] LazyLoaded boto_ec2.get_key [DEBUG ] LazyLoaded boto_elasticache.exists [DEBUG ] LazyLoaded boto_elasticsearch_domain.exists [DEBUG ] LazyLoaded boto_elb.exists [DEBUG ] LazyLoaded boto_elbv2.target_group_exists [DEBUG ] LazyLoaded boto_iam.get_user [DEBUG ] LazyLoaded boto_iam.role_exists [DEBUG ] LazyLoaded boto_iot.policy_exists [DEBUG ] LazyLoaded boto_kinesis.exists [DEBUG ] LazyLoaded boto_kms.describe_key [DEBUG ] LazyLoaded boto_lambda.function_exists [DEBUG ] LazyLoaded boto_asg.exists [DEBUG ] LazyLoaded boto_rds.exists [DEBUG ] LazyLoaded boto_route53.get_record [DEBUG ] LazyLoaded boto_s3_bucket.exists [DEBUG ] LazyLoaded boto_secgroup.exists [DEBUG ] LazyLoaded boto_sns.exists [DEBUG ] LazyLoaded boto_sqs.exists [DEBUG ] LazyLoaded boto_vpc.exists [DEBUG ] LazyLoaded bower.list [DEBUG ] LazyLoaded chef.client [DEBUG ] LazyLoaded chocolatey.install [DEBUG ] LazyLoaded cisconso.set_data_value [DEBUG ] LazyLoaded cyg.list [DEBUG ] LazyLoaded ddns.update [DEBUG ] LazyLoaded chassis.cmd [DEBUG ] Could not LazyLoad docker.version: ‘docker.version’ is not available. [DEBUG ] Could not LazyLoad docker.version: ‘docker.version’ is not available. [DEBUG ] Could not LazyLoad docker.version: ‘docker.version’ is not available. [DEBUG ] Could not LazyLoad docker.version: ‘docker.version’ is not available. [DEBUG ] Could not LazyLoad docker.version: ‘docker.version’ is not available. [DEBUG ] LazyLoaded eselect.exec_action [DEBUG ] LazyLoaded esxi.cmd [DEBUG ] LazyLoaded git.version [DEBUG ] LazyLoaded github.list_users [DEBUG ] LazyLoaded glusterfs.list_volumes [DEBUG ] LazyLoaded elasticsearch.exists [DEBUG ] LazyLoaded grafana4.get_dashboard [DEBUG ] LazyLoaded grafana4.get_datasource [DEBUG ] Failed to import states grafana4_org: Traceback (most recent call last): File “/usr/lib/python2.7/site-packages/salt/loader.py”, line 1411, in load_module mod = imp.load_module(mod_namespace, fn, fpath, desc) File “/usr/lib/python2.7/site-packages/salt/states/grafana4_org.py”, line 48, in <module> from requests.exceptions import HTTPError File “/usr/lib/python2.7/site-packages/requests/init.py”, line 58, in <module> from . import utils File “/usr/lib/python2.7/site-packages/requests/utils.py”, line 25, in <module> from . import certs ImportError: cannot import name certs [DEBUG ] LazyLoaded grafana4.get_user [DEBUG ] Failed to import states grafana_dashboard: Traceback (most recent call last): File “/usr/lib/python2.7/site-packages/salt/loader.py”, line 1411, in load_module mod = imp.load_module(mod_namespace, fn, fpath, desc) File “/usr/lib/python2.7/site-packages/salt/states/grafana_dashboard.py”, line 45, in <module> import requests File “/usr/lib/python2.7/site-packages/requests/init.py”, line 58, in <module> from . import utils File “/usr/lib/python2.7/site-packages/requests/utils.py”, line 25, in <module> from . import certs ImportError: cannot import name certs [DEBUG ] Failed to import states grafana_datasource: Traceback (most recent call last): File “/usr/lib/python2.7/site-packages/salt/loader.py”, line 1411, in load_module mod = imp.load_module(mod_namespace, fn, fpath, desc) File “/usr/lib/python2.7/site-packages/salt/states/grafana_datasource.py”, line 29, in <module> import requests File “/usr/lib/python2.7/site-packages/requests/init.py”, line 58, in <module> from . import utils File “/usr/lib/python2.7/site-packages/requests/utils.py”, line 25, in <module> from . import certs ImportError: cannot import name certs [DEBUG ] LazyLoaded icinga2.generate_ticket [DEBUG ] LazyLoaded ifttt.trigger_event [DEBUG ] Could not LazyLoad influxdb08.db_exists: ‘influxdb08.db_exists’ is not available. [DEBUG ] Could not LazyLoad influxdb08.db_exists: ‘influxdb08.db_exists’ is not available. [DEBUG ] Could not LazyLoad influxdb.db_exists: ‘influxdb.db_exists’ is not available. [DEBUG ] Could not LazyLoad influxdb.db_exists: ‘influxdb.db_exists’ is not available. [DEBUG ] Could not LazyLoad influxdb.db_exists: ‘influxdb.db_exists’ is not available. [DEBUG ] Could not LazyLoad influxdb.db_exists: ‘influxdb.db_exists’ is not available. [DEBUG ] LazyLoaded infoblox.get_record [DEBUG ] LazyLoaded ipset.version [DEBUG ] LazyLoaded kapacitor.version [DEBUG ] LazyLoaded keystone.auth [DEBUG ] LazyLoaded kubernetes.ping [DEBUG ] LazyLoaded layman.add [DEBUG ] LazyLoaded lvs.get_rules [DEBUG ] LazyLoaded lvs.get_rules [DEBUG ] LazyLoaded makeconf.get_var [DEBUG ] LazyLoaded memcached.status [DEBUG ] LazyLoaded mongodb.user_exists [DEBUG ] LazyLoaded monit.summary [DEBUG ] LazyLoaded mysql.db_exists [DEBUG ] LazyLoaded mysql.grant_exists [DEBUG ] LazyLoaded mysql.query [DEBUG ] LazyLoaded nftables.version [DEBUG ] LazyLoaded npm.list [DEBUG ] LazyLoaded nxos.cmd [DEBUG ] LazyLoaded openvswitch.bridge_create [DEBUG ] LazyLoaded openvswitch.port_add [DEBUG ] LazyLoaded pagerduty_util.get_resource [DEBUG ] LazyLoaded pagerduty_util.get_resource [DEBUG ] LazyLoaded pagerduty_util.get_resource [DEBUG ] LazyLoaded pagerduty_util.get_resource [DEBUG ] LazyLoaded pecl.list [DEBUG ] LazyLoaded portage_config.get_missing_flags [DEBUG ] LazyLoaded postgres.cluster_exists [DEBUG ] LazyLoaded postgres.user_exists [DEBUG ] LazyLoaded postgres.create_extension [DEBUG ] LazyLoaded postgres.group_create [DEBUG ] LazyLoaded postgres.datadir_init [DEBUG ] LazyLoaded postgres.language_create [DEBUG ] LazyLoaded postgres.privileges_grant [DEBUG ] LazyLoaded postgres.schema_exists [DEBUG ] LazyLoaded postgres.tablespace_exists [DEBUG ] LazyLoaded postgres.user_exists [DEBUG ] Could not LazyLoad rbac.profile_list: ‘rbac.profile_list’ is not available. [DEBUG ] LazyLoaded rdp.enable [DEBUG ] Could not LazyLoad redis.set_key: ‘redis.set_key’ is not available. [DEBUG ] LazyLoaded reg.read_value [DEBUG ] Could not LazyLoad vmadm.create: ‘vmadm.create’ is not available. [DEBUG ] LazyLoaded snapper.diff [DEBUG ] LazyLoaded splunk.list_users [DEBUG ] LazyLoaded splunk_search.get [DEBUG ] LazyLoaded stormpath.create_account [DEBUG ] LazyLoaded telemetry.get_alert_config [DEBUG ] LazyLoaded tls.cert_info [DEBUG ] LazyLoaded tomcat.status [DEBUG ] LazyLoaded trafficserver.set_config [DEBUG ] LazyLoaded uptime.checks_list [DEBUG ] LazyLoaded victorops.create_event [DEBUG ] LazyLoaded virt.node_info [DEBUG ] LazyLoaded win_dacl.add_ace [DEBUG ] LazyLoaded win_dns_client.add_dns [DEBUG ] Could not LazyLoad firewall.get_config: ‘firewall.get_config’ is not available. [DEBUG ] LazyLoaded win_iis.create_site [DEBUG ] Could not LazyLoad lgpo.set: ‘lgpo.set’ is not available. [DEBUG ] LazyLoaded win_path.rehash [DEBUG ] LazyLoaded win_pki.get_stores [DEBUG ] LazyLoaded win_servermanager.install [DEBUG ] LazyLoaded win_smtp_server.get_server_setting [DEBUG ] LazyLoaded win_snmp.get_agent_settings [DEBUG ] LazyLoaded x509.get_pem_entry [DEBUG ] LazyLoaded xmpp.send_msg [DEBUG ] LazyLoaded zabbix.host_create [DEBUG ] LazyLoaded zabbix.hostgroup_create [DEBUG ] LazyLoaded zabbix.mediatype_create [DEBUG ] LazyLoaded zabbix.user_create [DEBUG ] LazyLoaded zabbix.usergroup_create [DEBUG ] LazyLoaded zenoss.add_device [WARNING ] salt.loaded.int.states.zenoss.virtual() is wrongly returning None. It should either return True, False or a new name. If you’re the developer of the module ‘zenoss’, please fix this. [DEBUG ] LazyLoaded zfs.create [DEBUG ] LazyLoaded zk_concurrency.lock [DEBUG ] LazyLoaded zonecfg.create [DEBUG ] LazyLoaded zpool.create [DEBUG ] Could not LazyLoad mysql_user.present: ‘mysql_user’ virtual returned False [INFO ] Running state [frank] at time 10:20:18.387925 [DEBUG ] LazyLoaded mysql_user.present [ERROR ] State ‘mysql_user.present’ was not found in SLS ‘test’ Reason: ‘mysql_user’ virtual returned False

[DEBUG ] File /var/cache/salt/minion/accumulator/140128415733008 does not exist, no need to cleanup. [DEBUG ] Initializing new AsyncZeroMQReqChannel for (‘/etc/salt/pki/minion’, ‘aspod-johan-main01’, ‘tcp://salt:4506’, ‘aes’) [DEBUG ] Initializing new AsyncAuth for (‘/etc/salt/pki/minion’, ‘aspod-johan-main01’, ‘tcp://salt:4506’) [DEBUG ] LazyLoaded highstate.output local: ID: frank Function: mysql_user.present Result: False Comment: State ‘mysql_user.present’ was not found in SLS ‘test’ Reason: ‘mysql_user’ virtual returned False Changes:

Summary for local

Succeeded: 0 Failed: 1

Total states run: 1 Total run time: 0.000 ms

Steps to Reproduce Issue

  1. Latest salt-master on Ubuntu 16.04
  2. Latest salt-minion on Red Hat 6
  3. Install MySQL (mysql Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1)
  4. Run the state above from the minion: salt-call state.sls test -l debug

Versions Report

Minion

Salt Version:
           Salt: 2017.7.1

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.8.1
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.13 (default, Jul 12 2017, 17:32:34)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 14.5.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5

System Versions:
           dist: redhat 6.9 Santiago
         locale: UTF-8
        machine: x86_64
        release: 2.6.32-696.6.3.el6.x86_64
         system: Linux
        version: Red Hat Enterprise Linux Server 6.9 Santiago

Master

Salt Version:
           Salt: 2017.7.1

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.6.0
      docker-py: 2.2.1
          gitdb: 0.6.4
      gitpython: 1.0.1
          ioflo: Not Installed
         Jinja2: 2.8
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: 1.0.3
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: 1.3.7
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.12 (default, Nov 19 2016, 06:48:10)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.2.0
           RAET: Not Installed
          smmap: 0.9.0
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist: Ubuntu 16.04 xenial
         locale: UTF-8
        machine: x86_64
        release: 4.4.0-1031-aws
         system: Linux
        version: Ubuntu 16.04 xenial

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 18 (15 by maintainers)

Most upvoted comments

Hi @Ch3LL

I do not wish to discredit your work to make SaltStack better, I understand that Python 2.6 are very old and are causing issues for maintainability of the software.

You are correct that you are bundling Python 2.7 and you are correct that salt core functionality works.

I do have one very strong concern that almost all modules, states and other components that requires external python libraries will fail after 2017 version since there are no official builds for most of them for Red Hat 6 and Python 2.7 since they all depends on Python 2.6

As you can see in this doc: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql_user.html

depends: MySQLdb Python module

This state are officially supported by SaltStack for all supported platforms but it will no longer work.

You can find a lot of other states requiring external Python libraries.

I just assume all states or other components that have a dependency to any Python library stopped working.

I really appreciate all the work this community does but I can’t stop feel that Red Hat 6 are no longer “fully” supported, it’s now degraded since standard components that used to work are no longer working and libraries that was available are no longer available since Red Hat or EPEL are not bundling Python libraries for 2.7, only for 2.6.

I don’t know what to do with this issue, there are no turning back but I would like to have someone confirming my concerns and findings.

Best regards Johan Ryberg