3.5 KiB
- Explain the difference between a singleton and non-singleton type:
- Explain the difference between the different verbosity levels
- Logs (config run dumps per verbosity level)
—
Explain the difference between a singleton and non-singleton type:
A single type can only be used once per host.
(I don't see yet why this is important.)
Reference
If a type is flagged as a singleton, it may be used only once per host. This is useful for types which can be used only once on a system. Singleton types do not take an object name as argument. (https://www.cdi.st/manual/latest/cdist-type.html?highlight=singleton)
Explain the difference between the different verbosity levels
Verbosity levels are used to change the amount of information that is output on stdout about the configuration run. I can be used for debugging, monitoring and scripting.
Logs (config run dumps per verbosity level)
No -v
1lnu:/mnt/cephfs/infra/code.ungleich.ch/ungleich-learning-circle-balazs/balazs/dot-cdist$ cdist config -c . localhost
No output
-v (INFO)
1lnu:/mnt/cephfs/infra/code.ungleich.ch/ungleich-learning-circle-balazs/balazs/dot-cdist$ cdist config -c . -v localhost INFO: localhost: Starting configuration run INFO: localhost: Finished successful run in 7.95 seconds
-vv (VERBOSE)
1lnu:/mnt/cephfs/infra/code.ungleich.ch/ungleich-learning-circle-balazs/balazs/dot-cdist$ cdist config -c . -vv localhost VERBOSE: cdist: version 6.5.4-32-g250161e4 INFO: localhost: Starting configuration run VERBOSE: localhost: Running global explorers VERBOSE: localhost: Running initial manifest tmp/tmpec8j3nyk/421aa90e079fa326b6494f812ad13e79/data/conf/manifest/init VERBOSE: localhost: Preparing object __my_computer
…
VERBOSE: localhost: Running object __package/zsh VERBOSE: localhost: Running object __package/sipcalc VERBOSE: localhost: Running object __package/emacs VERBOSE: localhost: Running object __package/tzdata VERBOSE: localhost: Running object __package/nmap VERBOSE: localhost: Preparing object __link/etc/localtime VERBOSE: localhost: Running manifest and explorers for __link/etc/localtime VERBOSE: localhost: Running type explorers for <CdistType __link> VERBOSE: localhost: Running object __link/etc/localtime VERBOSE: localhost: Running object __my_computer/ VERBOSE: localhost: Running object __timezone/Europe/Zurich INFO: localhost: Finished successful run in 7.58 seconds VERBOSE: config: Total processing time for 1 host(s): 7.591623544692993
Lesson 05-07
Comment out __my_nginx from the initial manifest, keep the __my_nginx_site
- Explain the error that you get (in your cdist.org file)
The manifest __my_nginx wasn't run (or marked as completed) which haven't fulfilled the requirements for __my_nginx_site
LOG
ERROR: localhost: The requirements of the following objects could not be resolved: __file/etc/nginx/conf.d/chee.se.conf requires: __package/nginx __file/etc/nginx/conf.d/chee.se.conf autorequires:
__file/etc/nginx/conf.d/woo.com.conf requires: __package/nginx __file/etc/nginx/conf.d/woo.com.conf autorequires:
__my_nginx_site/woo.com requires:
__my_nginx_site/woo.com autorequires: __file/etc/nginx/conf.d/woo.com.conf __my_nginx_site/chee.se requires:
__my_nginx_site/chee.se autorequires: __file/etc/nginx/conf.d/chee.se.conf VERBOSE: config: Total processing time for 1 host(s): 8.042433500289917 ERROR: cdist: Failed to configure the following hosts: localhost