From aa52a73b6afb75c7320962d6e7eb73bbc4e4ddab Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Wed, 21 May 2025 11:34:16 -0500 Subject: [PATCH 1/5] Updated documentation metadata for 3.26.0 Ticket: ENT-12901 Changelog: None --- generator/_config.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/generator/_config.yml b/generator/_config.yml index fbbba3437..1093b24b5 100644 --- a/generator/_config.yml +++ b/generator/_config.yml @@ -4,7 +4,7 @@ safe: false plugins: ./_plugins/ # baseurl: /docs/master/ git-repository: github.com/cfengine/documentation -git-branch: "3.23" +git-branch: "3.26" #source: ./pages/ #destination: #layouts: ./_layouts/ @@ -17,24 +17,24 @@ CFE_OUTPUT: true #CFE_DIR - output folder if CFE_OUTPUT turned on CFE_DIR: _site #to create correct links in sitemap -CFE_manuals_version: "master" +CFE_manuals_version: "3.26" cfengine: - branch: "master" - core_branch: "master" + branch: "3.26" + core_branch: "3.26.0" latest_patch_release: 0 - latest_package_build: 1a + latest_package_build: 1 vagrant_package_build: 1 - masterfiles_branch: "master" + masterfiles_branch: "3.26.0" Template: parse: line_numbers: true vagrant: - version: "2.2.19" + version: "2.4.5" virtualbox: - version: "6.1.38" + version: "7.0.16" paginate: 500 @@ -46,5 +46,5 @@ asset_pipeline: bundle: true # Default = true compress: true # Default = true output_path: assets # Default = assets - display_path: docs/master/assets # Default = nil + display_path: docs/3.26/assets # Default = nil gzip: false # Default = false From f143bf878c5be5a2599dff9c35d370d931ccb894 Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Wed, 21 May 2025 13:47:10 -0500 Subject: [PATCH 2/5] Added documentation for useringroup() Ticket: ENT-12721 Changelog: None (cherry picked from commit 0f78988c454d26d283a54b11fe21f8e4581f1b02) --- reference/functions/useringroup.markdown | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 reference/functions/useringroup.markdown diff --git a/reference/functions/useringroup.markdown b/reference/functions/useringroup.markdown new file mode 100644 index 000000000..0bd02307c --- /dev/null +++ b/reference/functions/useringroup.markdown @@ -0,0 +1,26 @@ +--- +layout: default +title: useringroup +published: true +--- + +[%CFEngine_function_prototype(user)%] + +**Description:** Return whether a `user` is a member of a given `group` + +Looks up the group `"group_name"` in the group database located in /etc/group and checks whether `"user_name"` is one of its members. This function is not available on Windows. + +[%CFEngine_function_attributes(user_name, group_name)%] + +**Example:** + +[%CFEngine_include_snippet(useringroup.cf, #\+begin_src cfengine3, .*end_src)%] + +Output: + +[%CFEngine_include_snippet(useringroup.cf, #\+begin_src\s+example_output\s*, .*end_src)%** + + +**History:** + +- Added in CFEngine 3.26.0 From 9daf253a5f3b672f14741819823567b6be441822 Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Wed, 21 May 2025 19:38:43 -0300 Subject: [PATCH 3/5] Added known issue around cf-remote hanging when installing 3.26.0 hub package on Ubuntu Signed-off-by: Ole Herman Schumacher Elgesem (cherry picked from commit e20fc005bf3eae8cc40cd8315e7f64f8e4a3eed4) --- release-notes/known-issues.markdown | 31 ++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/release-notes/known-issues.markdown b/release-notes/known-issues.markdown index bc401b94f..85ba51b5c 100644 --- a/release-notes/known-issues.markdown +++ b/release-notes/known-issues.markdown @@ -5,9 +5,30 @@ sorting: 50 published: true --- -CFEngine defects are managed in our [bug tracker][bug tracker]. Please report -bugs or unexpected behavior there, following the documented guideline for new -bug reports. +CFEngine defects are managed in our [bug tracker][bug tracker]. +Please report bugs or unexpected behavior there, following the documented guideline for new bug reports. -* Issues [affecting {{site.CFE_manuals_version}}](https://northerntech.atlassian.net/issues/?jql=project+in+%28ENT%2C+CFE%29+AND+affectedVersion+%7E+%22{{site.CFE_manuals_version}}.*%22+AND+status+not+in+%28+%22Rejected%22%29) -* Issues [fixed in {{site.CFE_manuals_version}}](https://northerntech.atlassian.net/issues/?jql=project+in+%28ENT%2C+CFE%29+AND+fixVersion+%7E+%22{{site.CFE_manuals_version}}.*%22) +- Issues [affecting {{site.CFE_manuals_version}}](https://northerntech.atlassian.net/issues/?jql=project+in+%28ENT%2C+CFE%29+AND+affectedVersion+%7E+%22{{site.CFE_manuals_version}}.*%22+AND+status+not+in+%28+%22Rejected%22%29) +- Issues [fixed in {{site.CFE_manuals_version}}](https://northerntech.atlassian.net/issues/?jql=project+in+%28ENT%2C+CFE%29+AND+fixVersion+%7E+%22{{site.CFE_manuals_version}}.*%22) + +On this page (below) we will only mention a subset of known issues, which are very severe or noticeable, which we'd like to communicate with users. + +## 3.26.0 Hub package installation hangs with cf-remote on Ubuntu + +**Ticket:** [CFE-4528](https://northerntech.atlassian.net/browse/CFE-4528) + +The `dpkg -i` command seems to cause cf-remote to hang forever in this particular case. +Issue is specific to 3.26.0, hub, and Ubuntu. +Client packages work, other OSes work, and previous versions also work. +We will fix this issue before 3.27.0 LTS. + +**Workarounds:** + +- If you've already ran the command and see it hanging: + - Open another terminal and connect with SSH. + - Look at the installation log (`sudo less /var/log/CFEngineInstall.log`). + - You should see that installation completed successfully and there is a setup code. + - Interrupt (Ctrl-c) the hanging `cf-remote` command. + - Run bootstrap manually. + - Use the setup code from the install log to set up Mission Portal for the first time. +- Otherwise, just download and install CFEngine manually, without cf-remote, or use a different platform, like RHEL, for your hub. From d74c741a7ad0a157e4b83086fbce2f39a6721d64 Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Wed, 28 May 2025 17:32:20 -0300 Subject: [PATCH 4/5] Formatted recently introduced examples according to style guide Style guide: https://docs.cfengine.com/docs/3.24/examples-tutorials-writing-and-serving-policy-policy-style.html Signed-off-by: Ole Herman Schumacher Elgesem (cherry picked from commit ba1cc790afd28bd940f461359e6e336b0e0a1327) --- .../functions/getbundlemetatags.markdown | 11 ++++++++-- reference/functions/hostswithgroup.markdown | 20 +++++++++---------- reference/functions/useringroup.markdown | 3 +-- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/reference/functions/getbundlemetatags.markdown b/reference/functions/getbundlemetatags.markdown index d30d1b677..d509d1658 100644 --- a/reference/functions/getbundlemetatags.markdown +++ b/reference/functions/getbundlemetatags.markdown @@ -10,15 +10,22 @@ published: true [%CFEngine_function_attributes(bundlename, optional_tag)%] -The `optional_tag` can be used to look up a specific tag's value. If you have +The `optional_tag` can be used to look up a specific tag's value. +If you have: + ```cf3 bundle agent example { meta: "tags" - slist => { "mykey=myvalue1", "mykey=myvalue2", "yourkey=yourvalue1" }; + slist => { + "mykey=myvalue1", + "mykey=myvalue2", + "yourkey=yourvalue1", + }; } ``` + then `getbundlemetatags( "example", "mykey" )` will return a list with two entries, `{ "myvalue1", "myvalue2" }`. diff --git a/reference/functions/hostswithgroup.markdown b/reference/functions/hostswithgroup.markdown index 14f8e56d9..dbf9024f4 100644 --- a/reference/functions/hostswithgroup.markdown +++ b/reference/functions/hostswithgroup.markdown @@ -19,16 +19,16 @@ On CFEngine Enterprise, this hub function can be used to return a list of hostna ```cf3 bundle agent debian_hosts { -vars: - - am_policy_hub:: - "host_list" slist => hostswithgroup( "Linux", "name" ); - -files: - am_policy_hub:: - "/tmp/master_config.cfg" - edit_line => insert_lines("host=$(host_list)"), - create => "true"; + vars: + am_policy_hub:: + "host_list" + slist => hostswithgroup( "Linux", "name" ); + + files: + am_policy_hub:: + "/tmp/master_config.cfg" + edit_line => insert_lines("host=$(host_list)"), + create => "true"; } ``` diff --git a/reference/functions/useringroup.markdown b/reference/functions/useringroup.markdown index 0bd02307c..2b3f82c7e 100644 --- a/reference/functions/useringroup.markdown +++ b/reference/functions/useringroup.markdown @@ -18,8 +18,7 @@ Looks up the group `"group_name"` in the group database located in /etc/group an Output: -[%CFEngine_include_snippet(useringroup.cf, #\+begin_src\s+example_output\s*, .*end_src)%** - +[%CFEngine_include_snippet(useringroup.cf, #\+begin_src\s+example_output\s*, .*end_src)%] **History:** From fb3a06bc288bd56911c2ccce89bcc114da798032 Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Wed, 28 May 2025 18:46:36 -0300 Subject: [PATCH 5/5] Fixed docs build due to missing comments in example Signed-off-by: Ole Herman Schumacher Elgesem (cherry picked from commit a52f3078aec07b11ae4a3c987d2ab54d644986aa) --- reference/functions/isconnectable.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/functions/isconnectable.markdown b/reference/functions/isconnectable.markdown index 282c50e46..fe993a7d9 100644 --- a/reference/functions/isconnectable.markdown +++ b/reference/functions/isconnectable.markdown @@ -14,7 +14,7 @@ This function checks whether a `hostname`:`port` is connectable within `timeout` **Example:** -[%CFEngine_include_snippet(isconnectable.cf, #\+begin_src cfengine3, .*end_src)%] +[%CFEngine_include_example(isconnectable.cf)%] **History:**