Skip to content

Instantly share code, notes, and snippets.

[root@master ~]# salt-cloud --list-providers
[WARNING ] Missing dependency: 'azure'. The azure driver requires 'azure' to be installed.
[WARNING ] The cloud driver, 'azure', configured under the 'system' cloud provider alias, could not be loaded. Please check your provider configuration files and ensure all required dependencies are installed for the 'azure' driver.
In rare cases, this could indicate the 'azure.get_configured_provider()' function could not be found.
Removing 'azure' from the available providers list
Error: There was an error listing providers: There are no cloud providers configured.
[root@master ~]#
@PeterS242
PeterS242 / gist:41f00de7f2a328478849ef2cb54330c4
Created April 27, 2018 15:07
salt 2018.3.0 problem outputting docs?
[root@master ~]# salt -d > /tmp/d
[ERROR ] An un-handled exception was caught by salt's global exception handler:
TypeError: string indices must be integers
Traceback (most recent call last):
File "/usr/bin/salt", line 10, in <module>
salt_main()
File "/usr/lib/python2.7/site-packages/salt/scripts.py", line 485, in salt_main
client.run()
File "/usr/lib/python2.7/site-packages/salt/cli/salt.py", line 188, in run
self._output_ret(ret, out, retcode=retcode)
@PeterS242
PeterS242 / gist:bf9bd2af214fe3ed391d510c29f3756a
Last active January 31, 2019 19:17
New error from Salt 2018.3.0
Apr 03 14:33:26 linux salt-minion[15141]: [TRACE ] ==== evaluating schedule now None =====
Apr 03 14:33:26 linux salt-minion[15141]: [ERROR ] Exception 'Schedule' object has no attribute 'loop_interval' occurred in scheduled job
@PeterS242
PeterS242 / gist:8ffd26dc4bee6bb9445dd551115d995c
Created April 3, 2018 19:19
Debug log from "systemctl start salt-minion.service"
2018-04-03 14:17:09,077 [salt.utils.verify:536 ][WARNING ][14870] Insecure logging configuration detected! Sensitive data may be logged.
2018-04-03 14:17:09,078 [salt.cli.daemons :298 ][INFO ][14870] Setting up the Salt Minion "linux"
2018-04-03 14:17:09,133 [salt.utils.decorators.jinja:30 ][DEBUG ][14870] Marking 'base64_encode' as a jinja filter
2018-04-03 14:17:09,134 [salt.utils.decorators.jinja:30 ][DEBUG ][14870] Marking 'base64_decode' as a jinja filter
2018-04-03 14:17:09,134 [salt.utils.decorators.jinja:30 ][DEBUG ][14870] Marking 'md5' as a jinja filter
2018-04-03 14:17:09,134 [salt.utils.decorators.jinja:30 ][DEBUG ][14870] Marking 'sha256' as a jinja filter
2018-04-03 14:17:09,134 [salt.utils.decorators.jinja:30 ][DEBUG ][14870] Marking 'sha512' as a jinja filter
2018-04-03 14:17:09,135 [salt.utils.decorators.jinja:30 ][DEBUG ][14870] Marking 'hmac' as a jinja filter
2018-04-03 14:17:09,135 [salt.utils.decorators.jinja:30 ][DEBUG ][14870] Marking 'random_hash' as a jinja fi
@PeterS242
PeterS242 / gist:ce326ac7068e3edaecf3f1371dbc1b97
Created April 3, 2018 18:42
Error from salt-minion startup
Apr 03 13:38:36 linux salt-minion[13677]: File "/usr/lib/python2.7/site-packages/salt/grains/core.py", line 1770, in os_data
Apr 03 13:38:36 linux salt-minion[13677]: osarch = __salt__['cmd.run']('rpm --eval %{_host_cpu}').strip()
Apr 03 13:38:36 linux salt-minion[13677]: File "/usr/lib/python2.7/site-packages/salt/modules/cmdmod.py", line 735, in _run_quiet
Apr 03 13:38:36 linux salt-minion[13677]: pillar_override=pillar_override)['stdout']
Apr 03 13:38:36 linux salt-minion[13677]: File "/usr/lib/python2.7/site-packages/salt/modules/cmdmod.py", line 560, in _run
Apr 03 13:38:36 linux salt-minion[13677]: raise CommandExecutionError(msg)
Apr 03 13:38:36 linux salt-minion[13677]: CommandExecutionError: Unable to run command 'REDACTED' with the context '{u'timeout': None, u'with_communicate': True, u'shell': False, u'bg': False, u'stderr': -2, u'env': {'LANG': 'en_US.UTF-8', 'LC_NUMERIC': 'C', 'NOTIFY_SOCKET': '/run/systemd/notify', 'LC_MESSAGES': 'C', 'LC_IDENTIFICATION': 'C', 'LC_MONETARY': 'C', 'LC_NAME': 'C'
[root@swlx17 salt]# rpm -qf /usr/lib/python2.6/site-packages/salt/utils/thin.py
salt-2015.8.8-2.el6.noarch
[root@swlx17 salt]# cp /usr/lib/python2.6/site-packages/salt/utils/thin.py /usr/lib/python2.6/site-packages/salt/utils/thin.py.OLD
[root@swlx17 salt]# cp /usr/lib/python2.6/site-packages/salt/utils/thin.py /usr/lib/python2.6/site-packages/salt/utils/thin.py.NEW
[root@swlx17 salt]# sed -i 's#HAS_XML = True#HAS_XML = False#' $(python2.6 -c "import salt; print salt.__path__[0];")/utils/thin.py.NEW
[root@swlx17 salt]# diff -u /usr/lib/python2.6/site-packages/salt/utils/thin.py.OLD /usr/lib/python2.6/site-packages/salt/utils/thin.py.NEW
--- /usr/lib/python2.6/site-packages/salt/utils/thin.py.OLD 2016-04-25 10:21:03.435420347 -0500
+++ /usr/lib/python2.6/site-packages/salt/utils/thin.py.NEW 2016-04-25 10:21:18.981426624 -0500
@@ -52,7 +52,7 @@
import logging
from salt.exceptions import CommandExecutionError
log = logging.getLogger(__name__)
__outputter__ = {
'deploy': 'highstate'
}
SERVICES = [
@PeterS242
PeterS242 / test1
Created April 20, 2012 21:12
Slic3r perimeter timing test.
[root@peters-f16 Slic3r]# ./slic3r.pl --perimeters 1 --layer-height 0.2 --infill-every-layers 2 herringbone-gear-large.stl
Done. Process took 31 minutes and 1.674 seconds
[root@peters-f16 Slic3r]# ./slic3r.pl --perimeters 2 --layer-height 0.2 --infill-every-layers 2 herringbone-gear-large.stl
Done. Process took 5 minutes and 17.932 seconds
[root@peters-f16 Slic3r]# ./slic3r.pl --perimeters 3 --layer-height 0.2 --infill-every-layers 2 herringbone-gear-large.stl
Done. Process took 1 minutes and 12.334 seconds
@PeterS242
PeterS242 / 40mmcube.svg
Created April 20, 2012 16:25
40mmcube.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.