Project

General

Profile

Actions

Bug #4851

closed

The command used to have a list of promises from ncf will lead to "Buffer exceeded 8192 bytes in exec" if ncf contains more than 125 files

Added by Nicolas PERRON almost 10 years ago. Updated almost 2 years ago.

Status:
Released
Priority:
1
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

The command used into CFEngine (execresult of a find which return a list of files) have a list of promises from ncf will lead to "Buffer exceeded 8192 bytes in exec" if ncf contains more than 125 files.

As a first workaround is to split this command in two:

"ncf_inputs" slist => splistring(exec("/usr/bin/find /var/rudder/ncf -name '*.cf' -not -name 'promises.cf'","noshell"),"\n",10000);

will become:

"ncf_common_inputs" slist => splistring(exec("/usr/bin/find /var/rudder/ncf/common -name '*.cf' -not -name 'promises.cf'","noshell"),"\n",10000);
"ncf_local_inputs" slist => splistring(exec("/usr/bin/find /var/rudder/ncf/local -name '*.cf' -not -name 'promises.cf'","noshell"),"\n",10000);
Actions #1

Updated by Nicolas PERRON almost 10 years ago

  • Status changed from New to Pending technical review
  • Assignee set to Jonathan CLARKE
  • % Done changed from 0 to 100
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/367

I've applied the workaround to make the PR: https://github.com/Normation/rudder-techniques/pull/367
I bet that it will happen again with motivated users but it will permit to check near 300 files.

Jon, could you review it please ?

Actions #2

Updated by Nicolas CHARLES almost 10 years ago

  • Status changed from Pending technical review to In progress
  • Assignee changed from Jonathan CLARKE to Nicolas PERRON

Nicolas,

Could you aplpy the modification to the initial promises as well ?
Thank you !

Actions #3

Updated by Nicolas PERRON almost 10 years ago

  • Status changed from In progress to Discussion
  • Assignee changed from Nicolas PERRON to Nicolas CHARLES

Nicolas CHARLES wrote:

Nicolas,

Could you aplpy the modification to the initial promises as well ?
Thank you !

Why would you like to add it in initial promises ? there is no need of ncf into them and no reference to ncf exist in promises.cf.

Actions #4

Updated by Nicolas CHARLES almost 10 years ago

Indeed, my bad.
Merging !

Actions #5

Updated by Nicolas PERRON almost 10 years ago

  • Status changed from Discussion to Pending release

Applied in changeset policy-templates:commit:f24cf2d4ae34896d4de7579c8ab340cb0af0d7d5.

Actions #6

Updated by Nicolas CHARLES almost 10 years ago

Applied in changeset policy-templates:commit:739e7dbc23f7d9d66b3247e945afd9d1f4f8f161.

Actions #7

Updated by Nicolas PERRON about 9 years ago

Applied in changeset rudder:rudder-techniques|commit:f24cf2d4ae34896d4de7579c8ab340cb0af0d7d5.

Actions #8

Updated by Nicolas CHARLES about 9 years ago

Applied in changeset rudder:rudder-techniques|commit:739e7dbc23f7d9d66b3247e945afd9d1f4f8f161.

Actions #9

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from Pending release to Released
Actions #10

Updated by Alexis Mousset almost 2 years ago

  • Target version changed from 0.x to ncf-0.x
  • Priority set to 0
Actions #11

Updated by Alexis Mousset almost 2 years ago

  • Project changed from 41 to Rudder
  • Category set to Generic methods
Actions

Also available in: Atom PDF