From 04c873cbfbfcb408184da92290bfc8d926d46634 Mon Sep 17 00:00:00 2001 From: Karl Eichwalder Date: Mon, 24 Mar 2025 09:54:46 +0100 Subject: [PATCH 1/7] Documented uptodate action in Common Workflows * https://github.com/SUSE/spacewalk/issues/26678 * https://github.com/uyuni-project/uyuni-docs/issues/3773 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b67fd9ac459..82e74095100 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +- Documented uptodate action in Common Workflows Guide as + background information - Documented handling of pub directory of the web server in the context of proxy (bsc#1238827) - Added instructions for Server and Proxy installation on SUSE Linux From 63b333c5c677c0bd4ba45bc6561fba1404be6aff Mon Sep 17 00:00:00 2001 From: Karl Eichwalder Date: Mon, 24 Mar 2025 15:50:32 +0100 Subject: [PATCH 2/7] add draft info --- .../workflow-clients-update-rec-actions.adoc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc b/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc index 8c3c7428a5a..434ef551a96 100644 --- a/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc +++ b/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc @@ -75,6 +75,25 @@ A third step is optional but highly recommended to finalize the update process. . Click btn:[Create Schedule] to save the action. + +== Background Information on [literal]``uptodate`` State + +For {suse}-based systems, as a first step, the [systemitem]``uptodate`` state applies critical security patches to the update stack by executing the command: + +[source,shell] +---- +zypper --non-interactive patch --updatestack-only +---- + +Then, the states updates: + + The client, that is either Salt or the Salt Bundle. + The package manager, such as dnf, yum, apt, or zypper based on what is available on the client OS. + + + + + == Related Topics * For more information about recurring actions, see xref:administration:actions.adoc#recurring_actions[Recurring Actions]. From b276f15342f6843e79293bdb1392ab7e5c0b5727 Mon Sep 17 00:00:00 2001 From: Karl Eichwalder Date: Tue, 25 Mar 2025 16:41:48 +0100 Subject: [PATCH 3/7] uptodate basics --- .../workflow-clients-update-rec-actions.adoc | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc b/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc index 434ef551a96..a7e2313edaf 100644 --- a/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc +++ b/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc @@ -78,17 +78,31 @@ A third step is optional but highly recommended to finalize the update process. == Background Information on [literal]``uptodate`` State -For {suse}-based systems, as a first step, the [systemitem]``uptodate`` state applies critical security patches to the update stack by executing the command: + +. The [systemitem]``uptodate`` state applies critical patches to the update components. + ++ + +-- + +.. On {suse}-based systems, the state executes the command: + ++ [source,shell] ---- zypper --non-interactive patch --updatestack-only ---- -Then, the states updates: ++ + +And then, the state also updates {salt}. + +.. On all the other systems, not based on {suse}, the state only updates {salt}. + +-- - The client, that is either Salt or the Salt Bundle. - The package manager, such as dnf, yum, apt, or zypper based on what is available on the client OS. +. The state runs the package manager, such as dnf, yum, apt, or zypper based on what is available on the client OS to update the rest of the packages. From 72929ecef9306f9c658c1be1f10edb12ce25342e Mon Sep 17 00:00:00 2001 From: Karl Eichwalder Date: Wed, 26 Mar 2025 06:49:04 +0100 Subject: [PATCH 4/7] adoc --- .../pages/workflow-clients-update-rec-actions.adoc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc b/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc index a7e2313edaf..eac41a82048 100644 --- a/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc +++ b/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc @@ -102,9 +102,7 @@ And then, the state also updates {salt}. -- -. The state runs the package manager, such as dnf, yum, apt, or zypper based on what is available on the client OS to update the rest of the packages. - - +. The state runs the package manager, such as [command]``dnf``, [command]``yum``, [command]``apt``, or [command]``zypper`` based on what is available on the client OS to update the rest of the packages. From 0218193374db12ce6b8d47fa199107a8e20bbfdc Mon Sep 17 00:00:00 2001 From: Karl Eichwalder Date: Wed, 26 Mar 2025 07:08:06 +0100 Subject: [PATCH 5/7] start adding details --- .../pages/workflow-clients-update-rec-actions.adoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc b/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc index eac41a82048..93b67d7680b 100644 --- a/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc +++ b/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc @@ -104,6 +104,14 @@ And then, the state also updates {salt}. . The state runs the package manager, such as [command]``dnf``, [command]``yum``, [command]``apt``, or [command]``zypper`` based on what is available on the client OS to update the rest of the packages. ++ + +.. Listing all of the remaining packages that can be upgraded. + +.. Upgrading the packages to their latest available version by using the client's package manager. + The version depends on the synchronized repositories in {productname}. + + == Related Topics From 9edb277552f48040088d7fbaee56bc64ea6306fb Mon Sep 17 00:00:00 2001 From: Karl Eichwalder Date: Wed, 26 Mar 2025 07:30:49 +0100 Subject: [PATCH 6/7] cont. --- .../pages/workflow-clients-update-rec-actions.adoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc b/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc index 93b67d7680b..531d1ef6e8f 100644 --- a/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc +++ b/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc @@ -106,12 +106,20 @@ And then, the state also updates {salt}. + +-- + .. Listing all of the remaining packages that can be upgraded. .. Upgrading the packages to their latest available version by using the client's package manager. The version depends on the synchronized repositories in {productname}. + This is different depending on the operating system of the client: +... For Debian-based clients, such as Debian or Ubuntu, the action executes [command]``apt dist-upgrade -q -y $PACKAGES``. +... For RPM-based clients that are not SUSE, such as Red Hat Enterprise Linux or SUSE Liberty Linux, the action executes [command]``yum --quiet -y update $PACKAGES`` or [command]``dnf --quiet -y upgrade $PACKAGES`` (depending on the package manager the client is using). +... For non-transactional SUSE clients, such as SUSE Linux Enterprise 15, the action executes [command]``zypper --non-interactive --auto-agree-with-licenses update $PACKAGES``. +... For transactional SUSE clients, the action executes the same in a transactional shell. +-- == Related Topics From aa282c1848471141b0396c63630fa35e37ae7093 Mon Sep 17 00:00:00 2001 From: Karl Eichwalder Date: Wed, 26 Mar 2025 10:56:06 +0100 Subject: [PATCH 7/7] cont. --- .../workflow-clients-update-rec-actions.adoc | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc b/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc index 531d1ef6e8f..92c244133c3 100644 --- a/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc +++ b/modules/common-workflows/pages/workflow-clients-update-rec-actions.adoc @@ -76,6 +76,7 @@ A third step is optional but highly recommended to finalize the update process. +[[cw-update-background]] == Background Information on [literal]``uptodate`` State @@ -121,6 +122,32 @@ And then, the state also updates {salt}. -- ++ + +// . version 4.3" if SUMULIMA detects that reboot is necessary, for 4.3.x, it will automatically reboot that client. + ++ + +// 5.0 and later + +. Reboot strategy: reboot and rebootifneeded action exist. + Users have the option to select and enable a reboot action. + +The following text is related to rebootifneeded. + +Reboot detection is, again, specific to the client OS. I'm not sure if this is documented somewhere, but IMHO we should. I think this should have its own documentation page, but I'll leave it up to you. + +For Debian/Ubuntu, we could just link to [3]. + +For non-transactional SUSE clients, we check if any of the patches require reboot by using zypper -x list-patches, and reboot if so. + +For transactional SUSE clients, we check if there's a pending transaction, and reboot if so. + +For the Red Hat-based clients, we use dnf -q needs-restarting -r or needs-restarting -r. + +Customers can see the reboot_info.py module for more information [4]. + + == Related Topics