Re: spam in output/previous enterprise 3.18
"'Nick Anderson' via help-cfengine" <[email protected]>
| Newsgroups | gmane.comp.sysutils.cfengine.general |
|---|---|
| Message-ID | <[email protected]> |
Stefan Skoglund <[email protected]> writes: > fre 2021-08-13 klockan 17:55 -0500 skrev 'Nick Anderson' via > help-cfengine: What's the promise? ---- > "/var/www/www.fakirenstenstorp.st/stefan/css_course_christinatruong/." > depends_on => { "NS_www_fakirenstenstorp_truong"}, copy_from => > default:perms_cp( > "/home/stefan/Skrivbord/skaraborgfakir.github.io/christinatruong/."), > file_select => default:by_name( @(truong)), depth_search => > default:recurse( "3"), meta => { "fakirenstenstorp", "httpd", > "www.fakirenstenstorp.st"}; --- > <https://github.com/skaraborgfakir/skaraborgfakir.github.io> is the > git repo ie "/home/stefan/Skrivbord/skaraborgfakir.github.io/" is the > clone. Hi Stefan, By verbose run output I mean the output of `cf-agent --verbose'. What is the value of `truong'? Really, I want to be able to run a standalone example that allows me to replicate the issue so that I can better see what is happening. Actually, I don't think I need verbose or the value of `truong'. I was able to get the error message using this policy: ,---- | bundle agent __main__ | { | vars: | "troung" slist => { ".*" }; | | files: | | "/tmp/css_course_christinatruong/." | #depends_on => { "NS_www_fakirenstenstorp_truong"}, | copy_from => default:perms_cp( "/tmp/skaraborgfakir.github.io/christinatruong/."), | file_select => default:by_name( @(truong)), | depth_search => default:recurse( "3"), | meta => { "fakirenstenstorp", "httpd", "www.fakirenstenstorp.st"}; | | } `---- ,---- | info: Created parent directory for '/tmp/css_course_christinatruong/.' | info: Created directory '/tmp/css_course_christinatruong/./ch1' | info: Object '/tmp/css_course_christinatruong/./ch1' had permissions 0700, changed it to 0775 | info: Created directory '/tmp/css_course_christinatruong/./ch1/01_02' | info: Object '/tmp/css_course_christinatruong/./ch1/01_02' had permissions 0700, changed it to 0775 | info: Created directory '/tmp/css_course_christinatruong/./ch1/01_04' | info: Object '/tmp/css_course_christinatruong/./ch1/01_04' had permissions 0700, changed it to 0775 | info: Created directory '/tmp/css_course_christinatruong/./ch1/01_04/bilder' | info: Object '/tmp/css_course_christinatruong/./ch1/01_04/bilder' had permissions 0700, changed it to 0775 | error: Maximum recursion level reached at '/tmp/skaraborgfakir.github.io/christinatruong/./ch1/01_04/bilder' | error: Errors encountered when actuating files promise '/tmp/css_course_christinatruong/.' `---- So, the policy specified recursion up to 3 levels. Bilder looks to be the third level, but perhaps something is counting the basedir as level 1, making bilder the 4th level deep. I don't see any specific mention in the [depth searches (aka 'recursion') during searches] notes from the files promise type docs. The [`depth' attribute in `depth_search' bodies] does not mention anything specifically either, though it does indicate an allowed input range starting at zero. So perhaps the Error message is being emitted because of an off by one error. Indeed, altering the depth to 4 results in the error vanishing. ,---- | bundle agent __main__ | { | vars: | "troung" slist => { ".*" }; | | files: | | "/tmp/css_course_christinatruong/." | #depends_on => { "NS_www_fakirenstenstorp_truong"}, | copy_from => default:perms_cp( "/tmp/skaraborgfakir.github.io/christinatruong/."), | file_select => default:by_name( @(truong)), | depth_search => default:recurse( "4"), | meta => { "fakirenstenstorp", "httpd", "www.fakirenstenstorp.st"}; | | } `---- ,---- | info: Created parent directory for '/tmp/css_course_christinatruong/.' | info: Created directory '/tmp/css_course_christinatruong/./ch1' | info: Object '/tmp/css_course_christinatruong/./ch1' had permissions 0700, changed it to 0775 | info: Created directory '/tmp/css_course_christinatruong/./ch1/01_02' | info: Object '/tmp/css_course_christinatruong/./ch1/01_02' had permissions 0700, changed it to 0775 | info: Created directory '/tmp/css_course_christinatruong/./ch1/01_04' | info: Object '/tmp/css_course_christinatruong/./ch1/01_04' had permissions 0700, changed it to 0775 | info: Created directory '/tmp/css_course_christinatruong/./ch1/01_04/bilder' | info: Object '/tmp/css_course_christinatruong/./ch1/01_04/bilder' had permissions 0700, changed it to 0775 `---- I am unsure why switching from `default:perms_cp' to `default:no_backup_dcp' resulted in suppressing the error for you. When I tried that I still get the error and in both cases, there is no content under the bilder directory though the directory itself was created. ,---- | bundle agent __main__ | { | vars: | "troung" slist => { ".*" }; | | files: | | "/tmp/css_course_christinatruong/." | #depends_on => { "NS_www_fakirenstenstorp_truong"}, | #copy_from => default:perms_cp( "/tmp/skaraborgfakir.github.io/christinatruong/."), | copy_from => default:no_backup_cp( "/tmp/skaraborgfakir.github.io/christinatruong/."), | file_select => default:by_name( @(truong)), | depth_search => default:recurse( "3"), | meta => { "fakirenstenstorp", "httpd", "www.fakirenstenstorp.st"}; | | } `---- ,---- | info: Created parent directory for '/tmp/css_course_christinatruong/.' | info: Created directory '/tmp/css_course_christinatruong/./ch1' | info: Created directory '/tmp/css_course_christinatruong/./ch1/01_02' | info: Created directory '/tmp/css_course_christinatruong/./ch1/01_04' | info: Created directory '/tmp/css_course_christinatruong/./ch1/01_04/bilder' | error: Maximum recursion level reached at '/tmp/skaraborgfakir.github.io/christinatruong/./ch1/01_04/bilder' | error: Errors encountered when actuating files promise '/tmp/css_course_christinatruong/.' `---- Still, I am unsure why it errors. I don't see an /error/.Seems like perhaps this should instead be a /verbose/ log. [depth searches (aka 'recursion') during searches] <https://docs.cfengine.com/docs/3.18/reference-promise-types-files.html#depth-searches-aka-recursion-during-searches> [`depth' attribute in `depth_search' bodies] <https://docs.cfengine.com/docs/3.18/reference-promise-types-files.html#depth-searches-aka-recursion-during-searches> -- You received this message because you are subscribed to the Google Groups "help-cfengine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/87v945nnrr.fsf%40northern.tech. -- Nick Anderson | Doer of Things | (+1) 785-550-1767 | https://northern.tech -- You received this message because you are subscribed to the Google Groups "help-cfengine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/87v945nnrr.fsf%40northern.tech.