cdist -j doens't seem to default to cpu cores, and fails with sufficiently large number #325

Open
opened 2021-12-21 13:29:36 +00:00 by allan_wind · 1 comment

https://www.cdi.st/manual/6.9.4/man1/cdist.html says:

-j [JOBS], --jobs [JOBS]
Operate in parallel in specified maximum number of jobs. Global explorers, object prepare and object run are supported. Without argument CPU count is used by default.

however, when you run it without a -j it defaults to sequential mode:

$ cdist config -vvv vent|egrep 'mode|seconds' | uniq
DEBUG: vent: Iteration in sequential mode
INFO: vent: Finished successful run in 5.47 seconds

which appears similar to -j1:

$ cdist config -j1 -vvv vent|egrep 'mode|seconds'| uniq
DEBUG: [862030]: vent: Iteration in parallel mode in 1 jobs
INFO: [862030]: vent: Finished successful run in 5.14 seconds

With sufficient large -j in my case around ~12 or ~13 the global explorers fail in no particular pattern:

$ cdist config -j12 -vvv vent|egrep 'mode|seconds'| uniq
Error processing global explorer 'hostname'
===========================================
name: hostname
path: /tmp/user/1000/tmpn1t453bf/39070aff4100488e27d58a587b526fc4/data/conf/explorer/hostname
$ cdist config -j12 -vvv vent|egrep 'mode|seconds'| uniq
ERROR: [863719]: vent: /usr/share/doc/cdist/examples/remote/sudo/exec vent /bin/sh -c ' export __target_host=vent;  export __target_hostname=vent.lifeintegrity.com;  export __target_fqdn=vent.lifeintegrity.com;  export __explorer=/var/lib/cdist/conf/explorer;  export __target_host_tags=desktop;  export __cdist_log_level=10;  export __cdist_log_level_name=DEBUG;  export PATH=/bin:/usr/bin:/sbin:/usr/sbin;/bin/sh -e /var/lib/cdist/conf/explorer/os_version': ['/usr/share/doc/cdist/examples/remote/sudo/exec', 'vent', "/bin/sh -c ' export __target_host=vent;  export __target_hostname=vent.lifeintegrity.com;  export __target_fqdn=vent.lifeintegrity.com;  export __explorer=/var/lib/cdist/conf/explorer;  export __target_host_tags=desktop;  export __cdist_log_level=10;  export __cdist_log_level_name=DEBUG;  export PATH=/bin:/usr/bin:/sbin:/usr/sbin;/bin/sh -e /var/lib/cdist/conf/explorer/os_version'"]

Error processing global explorer 'os_version'
=============================================
name: os_version
path: /tmp/user/1000/tmp63bkjf1n/39070aff4100488e27d58a587b526fc4/data/conf/explorer/os_version
https://www.cdi.st/manual/6.9.4/man1/cdist.html says: > -j [JOBS], --jobs [JOBS] > Operate in parallel in specified maximum number of jobs. Global explorers, object prepare and object run are supported. Without argument CPU count is used by default. however, when you run it without a -j it defaults to sequential mode: ``` $ cdist config -vvv vent|egrep 'mode|seconds' | uniq DEBUG: vent: Iteration in sequential mode INFO: vent: Finished successful run in 5.47 seconds ``` which appears similar to -j1: ``` $ cdist config -j1 -vvv vent|egrep 'mode|seconds'| uniq DEBUG: [862030]: vent: Iteration in parallel mode in 1 jobs INFO: [862030]: vent: Finished successful run in 5.14 seconds ``` With sufficient large -j in my case around ~12 or ~13 the global explorers fail in no particular pattern: ``` $ cdist config -j12 -vvv vent|egrep 'mode|seconds'| uniq Error processing global explorer 'hostname' =========================================== name: hostname path: /tmp/user/1000/tmpn1t453bf/39070aff4100488e27d58a587b526fc4/data/conf/explorer/hostname ``` ``` $ cdist config -j12 -vvv vent|egrep 'mode|seconds'| uniq ERROR: [863719]: vent: /usr/share/doc/cdist/examples/remote/sudo/exec vent /bin/sh -c ' export __target_host=vent; export __target_hostname=vent.lifeintegrity.com; export __target_fqdn=vent.lifeintegrity.com; export __explorer=/var/lib/cdist/conf/explorer; export __target_host_tags=desktop; export __cdist_log_level=10; export __cdist_log_level_name=DEBUG; export PATH=/bin:/usr/bin:/sbin:/usr/sbin;/bin/sh -e /var/lib/cdist/conf/explorer/os_version': ['/usr/share/doc/cdist/examples/remote/sudo/exec', 'vent', "/bin/sh -c ' export __target_host=vent; export __target_hostname=vent.lifeintegrity.com; export __target_fqdn=vent.lifeintegrity.com; export __explorer=/var/lib/cdist/conf/explorer; export __target_host_tags=desktop; export __cdist_log_level=10; export __cdist_log_level_name=DEBUG; export PATH=/bin:/usr/bin:/sbin:/usr/sbin;/bin/sh -e /var/lib/cdist/conf/explorer/os_version'"] Error processing global explorer 'os_version' ============================================= name: os_version path: /tmp/user/1000/tmp63bkjf1n/39070aff4100488e27d58a587b526fc4/data/conf/explorer/os_version ```
Author

The errors appears to be due to "sshd[630]: error: beginning MaxStartups throttling". They go away if I bump up MaxStartups 16:30:100. It would good if the error message could indicate that it's an ssh issue and not something with a particular explorer.

The errors appears to be due to "sshd[630]: error: beginning MaxStartups throttling". They go away if I bump up MaxStartups 16:30:100. It would good if the error message could indicate that it's an ssh issue and not something with a particular explorer.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#325
No description provided.