Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't trigger repos salt states for a server on a transactional system #1740

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

srbarrios
Copy link
Member

@srbarrios srbarrios commented Oct 21, 2024

What does this PR change?

This is just an attempt to fix the issue explained here:

https://github.com/SUSE/spacewalk/issues/25575#issuecomment-2426285245


suma-bv-50-server:~ # snapper list
 # | Type   | Pre # | Date                             | User | Used Space | Cleanup | Description           | Userdata
---+--------+-------+----------------------------------+------+------------+---------+-----------------------+--------------
0  | single |       |                                  | root |            |         | current               |
1  | single |       | Sat 28 Sep 2024 05:41:43 AM CEST | root | 768.00 KiB | number  | first root filesystem | important=yes
2  | single |       | Wed 16 Oct 2024 03:29:26 AM CEST | root | 496.00 KiB | number  | Snapshot Update of #1 |
3  | single |       | Wed 16 Oct 2024 03:29:31 AM CEST | root | 436.00 KiB | number  | Snapshot Update of #2 |
4  | single |       | Wed 16 Oct 2024 03:29:42 AM CEST | root | 600.00 KiB | number  | Snapshot Update of #3 |
5- | single |       | Wed 16 Oct 2024 03:29:51 AM CEST | root | 208.00 KiB |         | Snapshot Update of #4 |
6  | single |       | Wed 16 Oct 2024 03:31:57 AM CEST | root | 144.00 KiB | number  | Snapshot Update of #5 |
7+ | single |       | Wed 16 Oct 2024 03:32:13 AM CEST | root | 176.00 KiB |         | Snapshot Update of #6 |

- at snapshot 5 means currently running snapshot. + at snapshot 7 means what will be active on new boot.


I would like the help of Ion Squad to fix it properly.
Handling a reboot on salt states can be quite delicate, and from what I could see, we don't really need the salt states generating snapshots 6 and 7

@srbarrios
Copy link
Member Author

srbarrios commented Oct 21, 2024

suma-bv-50-server:/var/log # cat transactional-update.log 
2024-10-16 01:29 Checking for newer version.
2024-10-16 01:29 transactional-update 4.1.9 started
2024-10-16 01:29 Options: run sh -c for key in $(ls /etc/gpg_keys); do rpm --import /etc/gpg_keys/$key; done
2024-10-16 01:29 Separate /var detected.
2024-10-16 01:29:26 tukit 4.1.9 started
2024-10-16 01:29:26 Options: -c1 open 
2024-10-16 01:29:26 Using snapshot 1 as base for new snapshot 2.
2024-10-16 01:29:26 /var/lib/overlay/1/etc
2024-10-16 01:29:26 No previous snapshot to sync with - skipping
Relabeled /var/lib from system_u:object_r:var_t:s0 to system_u:object_r:var_lib_t:s0
ID: 2
2024-10-16 01:29:27 Transaction completed.
2024-10-16 01:29 2024-10-16 01:29:26 tukit 4.1.9 started
2024-10-16 01:29:26 Options: -c1 open 
2024-10-16 01:29:26 Using snapshot 1 as base for new snapshot 2.
2024-10-16 01:29:26 /var/lib/overlay/1/etc
2024-10-16 01:29:26 No previous snapshot to sync with - skipping
Relabeled /var/lib from system_u:object_r:var_t:s0 to system_u:object_r:var_lib_t:s0
ID: 2
2024-10-16 01:29:27 Transaction completed.
2024-10-16 01:29:27 tukit 4.1.9 started
2024-10-16 01:29:27 Options: call 2 sh -c for key in $(ls /etc/gpg_keys); do rpm --import /etc/gpg_keys/$key; done 
Relabeled /var/lib/ca-certificates from system_u:object_r:var_lib_t:s0 to system_u:object_r:cert_t:s0
Relabeled /var/lib/alternatives from system_u:object_r:var_lib_t:s0 to system_u:object_r:rpm_var_lib_t:s0
Relabeled /var/log from system_u:object_r:var_t:s0 to system_u:object_r:var_log_t:s0
2024-10-16 01:29:28 Executing `sh -c for key in $(ls /etc/gpg_keys); do rpm --import /etc/gpg_keys/$key; done`:
2024-10-16 01:29:28 Application returned with exit status 0.
2024-10-16 01:29:29 Transaction completed.
2024-10-16 01:29:29 tukit 4.1.9 started
2024-10-16 01:29:29 Options: close 2 
2024-10-16 01:29:30 New default snapshot is #2 (/.snapshots/2/snapshot).
2024-10-16 01:29:30 Transaction completed.
2024-10-16 01:29 
2024-10-16 01:29 Please reboot your machine to activate the changes and avoid data loss.
2024-10-16 01:29 New default snapshot is #2 (/.snapshots/2/snapshot).
2024-10-16 01:29 transactional-update finished
2024-10-16 01:29 Checking for newer version.
2024-10-16 01:29 transactional-update 4.1.9 started
2024-10-16 01:29 Options: --continue --non-interactive pkg install wget timezone expect aaa_base-extras ca-certificates
2024-10-16 01:29 Separate /var detected.
2024-10-16 01:29:31 tukit 4.1.9 started
2024-10-16 01:29:31 Options: -c2 open 
2024-10-16 01:29:31 Using snapshot 2 as base for new snapshot 3.
2024-10-16 01:29:31 /var/lib/overlay/2/etc
ID: 3
2024-10-16 01:29:32 Transaction completed.
2024-10-16 01:29 2024-10-16 01:29:31 tukit 4.1.9 started
2024-10-16 01:29:31 Options: -c2 open 
2024-10-16 01:29:31 Using snapshot 2 as base for new snapshot 3.
2024-10-16 01:29:31 /var/lib/overlay/2/etc
ID: 3
2024-10-16 01:29:32 Transaction completed.
2024-10-16 01:29 Calling zypper install
2024-10-16 01:29:34 tukit 4.1.9 started
2024-10-16 01:29:34 Options: callext 3 zypper -R {} install -y --auto-agree-with-product-licenses wget timezone expect aaa_base-extras ca-certificates 
2024-10-16 01:29:35 Executing `zypper -R /tmp/transactional-update-90HlyR install -y --auto-agree-with-product-licenses wget timezone expect aaa_base-extras ca-certificates`:
Loading repository data...
Reading installed packages...
'ca-certificates' is already installed.
No update candidate for 'ca-certificates-2+git20240416.98ae794-150300.4.3.3.noarch'. The highest available version is already installed.
'timezone' is already installed.
No update candidate for 'timezone-2024a-150000.75.28.1.x86_64'. The highest available version is already installed.
'wget' is already installed.
No update candidate for 'wget-1.20.3-150000.3.20.1.x86_64'. The highest available version is already installed.
Resolving package dependencies...

The following 4 NEW packages are going to be installed:
  aaa_base-extras expect sqlite3-tcl tcl

4 new packages to install.

Package download size:     2.7 MiB

Package install size change:
              |       7.9 MiB  required by packages that will be installed
     7.9 MiB  |  -      0 B    released by packages that will be removed

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): y

Checking for file conflicts: [...done]
Warning: 4 packages had to be excluded from file conflicts check because they are not yet downloaded.

    Note: Checking for file conflicts requires not installed packages to be downloaded in advance in
    order to access their file lists. See option '--download-in-advance / --dry-run --download-only'
    in the zypper manual page for details.

Retrieving: sqlite3-tcl-3.44.0-150000.3.23.1.x86_64 (micro_update_repo) (1/4),  87.9 KiB    
Retrieving: sqlite3-tcl-3.44.0-150000.3.23.1.x86_64.rpm [.done]
(1/4) Installing: sqlite3-tcl-3.44.0-150000.3.23.1.x86_64 [..done]
Retrieving: aaa_base-extras-84.87+git20180409.04c9dae-150300.10.3.1.x86_64 (os_pool_repo) (2/4),  45.2 KiB    
Retrieving: aaa_base-extras-84.87+git20180409.04c9dae-150300.10.3.1.x86_64.rpm [.done]
(2/4) Installing: aaa_base-extras-84.87+git20180409.04c9dae-150300.10.3.1.x86_64 [..
Updating /etc/sysconfig/backup ...
Running in chroot, ignoring command 'daemon-reload'
Created symlink /etc/systemd/system/timers.target.wants/backup-rpmdb.timer -> /usr/lib/systemd/system/backup-rpmdb.timer.
Created symlink /etc/systemd/system/timers.target.wants/backup-sysconfig.timer -> /usr/lib/systemd/system/backup-sysconfig.timer.
Created symlink /etc/systemd/system/timers.target.wants/check-battery.timer -> /usr/lib/systemd/system/check-battery.timer.
done]
Retrieving: tcl-8.6.12-150300.14.9.1.x86_64 (micro_pool_repo) (3/4),   2.3 MiB    
Retrieving: tcl-8.6.12-150300.14.9.1.x86_64.rpm [.done]
(3/4) Installing: tcl-8.6.12-150300.14.9.1.x86_64 [.....done]
Retrieving: expect-5.45.4-3.3.1.x86_64 (os_pool_repo) (4/4), 272.0 KiB    
Retrieving: expect-5.45.4-3.3.1.x86_64.rpm [.done]
(4/4) Installing: expect-5.45.4-3.3.1.x86_64 [..done]
2024-10-16 01:29:38 Application returned with exit status 0.
2024-10-16 01:29:38 Transaction completed.
2024-10-16 01:29 Trying to rebuild kdump initrd
2024-10-16 01:29:39 tukit 4.1.9 started
2024-10-16 01:29:39 Options: close 3 
2024-10-16 01:29:40 New default snapshot is #3 (/.snapshots/3/snapshot).
2024-10-16 01:29:40 Transaction completed.
2024-10-16 01:29 
2024-10-16 01:29 Please reboot your machine to activate the changes and avoid data loss.
2024-10-16 01:29 New default snapshot is #3 (/.snapshots/3/snapshot).
2024-10-16 01:29 transactional-update finished
2024-10-16 01:29 Checking for newer version.
2024-10-16 01:29 transactional-update 4.1.9 started
2024-10-16 01:29 Options: --continue --non-interactive pkg install mgrctl mgradm netavark aardvark-dns ca-certificates-suse
2024-10-16 01:29 Separate /var detected.
2024-10-16 01:29:41 tukit 4.1.9 started
2024-10-16 01:29:41 Options: -c3 open 
2024-10-16 01:29:42 Using snapshot 3 as base for new snapshot 4.
2024-10-16 01:29:42 /var/lib/overlay/3/etc
ID: 4
2024-10-16 01:29:42 Transaction completed.
2024-10-16 01:29 2024-10-16 01:29:41 tukit 4.1.9 started
2024-10-16 01:29:41 Options: -c3 open 
2024-10-16 01:29:42 Using snapshot 3 as base for new snapshot 4.
2024-10-16 01:29:42 /var/lib/overlay/3/etc
ID: 4
2024-10-16 01:29:42 Transaction completed.
2024-10-16 01:29 Calling zypper install
2024-10-16 01:29:45 tukit 4.1.9 started
2024-10-16 01:29:45 Options: callext 4 zypper -R {} install -y --auto-agree-with-product-licenses mgrctl mgradm netavark aardvark-dns ca-certificates-suse 
2024-10-16 01:29:45 Executing `zypper -R /tmp/transactional-update-x1guTh install -y --auto-agree-with-product-licenses mgrctl mgradm netavark aardvark-dns ca-certificates-suse`:
Loading repository data...
Reading installed packages...
'aardvark-dns' is already installed.
No update candidate for 'aardvark-dns-1.11.0-150500.3.6.1.x86_64'. The highest available version is already installed.
'netavark' is already installed.
No update candidate for 'netavark-1.11.0-150500.3.6.1.x86_64'. The highest available version is already installed.
Resolving package dependencies...

The following 3 NEW packages are going to be installed:
  ca-certificates-suse mgradm mgrctl

The following package has no support information from its vendor:
  ca-certificates-suse

3 new packages to install.

Package download size:     5.9 MiB

Package install size change:
              |      18.4 MiB  required by packages that will be installed
    18.4 MiB  |  -      0 B    released by packages that will be removed

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): y

Checking for file conflicts: [...done]
Warning: 3 packages had to be excluded from file conflicts check because they are not yet downloaded.

    Note: Checking for file conflicts requires not installed packages to be downloaded in advance in
    order to access their file lists. See option '--download-in-advance / --dry-run --download-only'
    in the zypper manual page for details.

Retrieving: mgradm-0.1.23-150500.3.6.1.x86_64 (35946_repo) (1/3),   3.0 MiB    
Retrieving: mgradm-0.1.23-150500.3.6.1.x86_64.rpm [..done (84.4 MiB/s)]
(1/3) Installing: mgradm-0.1.23-150500.3.6.1.x86_64 [....done]
Retrieving: mgrctl-0.1.23-150500.3.6.1.x86_64 (35946_repo) (2/3),   2.8 MiB    
Retrieving: mgrctl-0.1.23-150500.3.6.1.x86_64.rpm [.done]
(2/3) Installing: mgrctl-0.1.23-150500.3.6.1.x86_64 [....done]
Retrieving: ca-certificates-suse-1.0-150500.8.1.noarch (ca_suse) (3/3),  11.4 KiB    
Retrieving: ca-certificates-suse-1.0-150500.8.1.noarch.rpm [.done]
(3/3) Installing: ca-certificates-suse-1.0-150500.8.1.noarch [..done]
2024-10-16 01:29:48 Application returned with exit status 0.
2024-10-16 01:29:48 Transaction completed.
2024-10-16 01:29 Trying to rebuild kdump initrd
2024-10-16 01:29:49 tukit 4.1.9 started
2024-10-16 01:29:49 Options: close 4 
2024-10-16 01:29:50 New default snapshot is #4 (/.snapshots/4/snapshot).
2024-10-16 01:29:50 Transaction completed.
2024-10-16 01:29 
2024-10-16 01:29 Please reboot your machine to activate the changes and avoid data loss.
2024-10-16 01:29 New default snapshot is #4 (/.snapshots/4/snapshot).
2024-10-16 01:29 transactional-update finished
2024-10-16 01:29 Checking for newer version.
2024-10-16 01:29 transactional-update 4.1.9 started
2024-10-16 01:29 Options: --continue --non-interactive pkg install qemu-guest-agent venv-salt-minion avahi
2024-10-16 01:29 Separate /var detected.
2024-10-16 01:29:51 tukit 4.1.9 started
2024-10-16 01:29:51 Options: -c4 open 
2024-10-16 01:29:51 Using snapshot 4 as base for new snapshot 5.
2024-10-16 01:29:51 /var/lib/overlay/4/etc
ID: 5
2024-10-16 01:29:52 Transaction completed.
2024-10-16 01:29 2024-10-16 01:29:51 tukit 4.1.9 started
2024-10-16 01:29:51 Options: -c4 open 
2024-10-16 01:29:51 Using snapshot 4 as base for new snapshot 5.
2024-10-16 01:29:51 /var/lib/overlay/4/etc
ID: 5
2024-10-16 01:29:52 Transaction completed.
2024-10-16 01:29 Calling zypper install
2024-10-16 01:29:55 tukit 4.1.9 started
2024-10-16 01:29:55 Options: callext 5 zypper -R {} install -y --auto-agree-with-product-licenses qemu-guest-agent venv-salt-minion avahi 
2024-10-16 01:29:55 Executing `zypper -R /tmp/transactional-update-YyAcRz install -y --auto-agree-with-product-licenses qemu-guest-agent venv-salt-minion avahi`:
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 7 NEW packages are going to be installed:
  avahi libavahi-common3 libavahi-core7 libdaemon0 nss-mdns qemu-guest-agent venv-salt-minion

7 new packages to install.

Package download size:    32.4 MiB

Package install size change:
              |     151.9 MiB  required by packages that will be installed
   151.9 MiB  |  -      0 B    released by packages that will be removed

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): y

Checking for file conflicts: [...done]
Warning: 7 packages had to be excluded from file conflicts check because they are not yet downloaded.

    Note: Checking for file conflicts requires not installed packages to be downloaded in advance in
    order to access their file lists. See option '--download-in-advance / --dry-run --download-only'
    in the zypper manual page for details.

Retrieving: libdaemon0-0.14-1.23.x86_64 (micro_pool_repo) (1/7),  29.4 KiB    
Retrieving: libdaemon0-0.14-1.23.x86_64.rpm [.done]
(1/7) Installing: libdaemon0-0.14-1.23.x86_64 [..done]
Retrieving: libavahi-common3-0.8-150400.7.16.1.x86_64 (micro_update_repo) (2/7),  43.8 KiB    
Retrieving: libavahi-common3-0.8-150400.7.16.1.x86_64.rpm [.done]
(2/7) Installing: libavahi-common3-0.8-150400.7.16.1.x86_64 [..done]
Retrieving: qemu-guest-agent-7.1.0-150500.49.21.1.x86_64 (micro_update_repo) (3/7), 537.4 KiB    
Retrieving: qemu-guest-agent-7.1.0-150500.49.21.1.x86_64.rpm [.done]
(3/7) Installing: qemu-guest-agent-7.1.0-150500.49.21.1.x86_64 [..
Running in chroot, ignoring command 'daemon-reload'
Running in chroot, ignoring command 'start'
done]
Retrieving: libavahi-core7-0.8-150400.7.16.1.x86_64 (micro_update_repo) (4/7), 102.9 KiB    
Retrieving: libavahi-core7-0.8-150400.7.16.1.x86_64.rpm [.done]
(4/7) Installing: libavahi-core7-0.8-150400.7.16.1.x86_64 [..done]
Retrieving: venv-salt-minion-3006.0-150430.37.4.devel43.x86_64 (tools_pool_repo) (5/7),  31.6 MiB    
Retrieving: venv-salt-minion-3006.0-150430.37.4.devel43.x86_64.rpm [...done (21.4 MiB/s)]
(5/7) Installing: venv-salt-minion-3006.0-150430.37.4.devel43.x86_64 [.................................................................................
Running in chroot, ignoring command 'daemon-reload'
Running in chroot, ignoring command 'daemon-reload'
Running in chroot, ignoring command 'daemon-reload'
done]
Retrieving: nss-mdns-0.14.1-150400.8.6.x86_64 (micro_pool_repo) (6/7),  39.7 KiB    
Retrieving: nss-mdns-0.14.1-150400.8.6.x86_64.rpm [.done]
(6/7) Installing: nss-mdns-0.14.1-150400.8.6.x86_64 [..done]
Retrieving: avahi-0.8-150400.7.16.1.x86_64 (micro_update_repo) (7/7), 137.5 KiB    
Retrieving: avahi-0.8-150400.7.16.1.x86_64.rpm [.done]
(7/7) Installing: avahi-0.8-150400.7.16.1.x86_64 [..
/usr/sbin/useradd -r -c User for Avahi -d /run/avahi-daemon -U avahi -s /usr/sbin/nologin
Updating /etc/sysconfig/avahi ...
Running in chroot, ignoring command 'daemon-reload'
Created symlink /etc/systemd/system/dbus-org.freedesktop.Avahi.service -> /usr/lib/systemd/system/avahi-daemon.service.
Created symlink /etc/systemd/system/multi-user.target.wants/avahi-daemon.service -> /usr/lib/systemd/system/avahi-daemon.service.
Created symlink /etc/systemd/system/sockets.target.wants/avahi-daemon.socket -> /usr/lib/systemd/system/avahi-daemon.socket.
done]
Running post-transaction scripts [...done]
2024-10-16 01:30:14 Application returned with exit status 0.
2024-10-16 01:30:14 Transaction completed.
2024-10-16 01:30 Trying to rebuild kdump initrd
2024-10-16 01:30:15 tukit 4.1.9 started
2024-10-16 01:30:15 Options: close 5 
2024-10-16 01:30:16 New default snapshot is #5 (/.snapshots/5/snapshot).
2024-10-16 01:30:16 Transaction completed.
2024-10-16 01:30 
2024-10-16 01:30 Please reboot your machine to activate the changes and avoid data loss.
2024-10-16 01:30 New default snapshot is #5 (/.snapshots/5/snapshot).
2024-10-16 01:30 transactional-update finished
2024-10-16 01:31 Checking for newer version.
2024-10-16 01:31 transactional-update 4.1.9 started
2024-10-16 01:31 Options: -c run zypper --non-interactive --gpg-auto-import-keys refresh --force
2024-10-16 01:31 Separate /var detected.
2024-10-16 01:31:57 tukit 4.1.9 started
2024-10-16 01:31:57 Options: -c5 open 
2024-10-16 01:31:57 Using snapshot 5 as base for new snapshot 6.
2024-10-16 01:31:57 /var/lib/overlay/5/etc
2024-10-16 01:31:57 Syncing /etc of previous snapshot 4 as base into new snapshot "/.snapshots/6/snapshot"
2024-10-16 01:31:57 SELinux is enabled.
ID: 6
2024-10-16 01:31:58 Transaction completed.
2024-10-16 01:31 2024-10-16 01:31:57 tukit 4.1.9 started
2024-10-16 01:31:57 Options: -c5 open 
2024-10-16 01:31:57 Using snapshot 5 as base for new snapshot 6.
2024-10-16 01:31:57 /var/lib/overlay/5/etc
2024-10-16 01:31:57 Syncing /etc of previous snapshot 4 as base into new snapshot "/.snapshots/6/snapshot"
2024-10-16 01:31:57 SELinux is enabled.
ID: 6
2024-10-16 01:31:58 Transaction completed.
2024-10-16 01:31:58 tukit 4.1.9 started
2024-10-16 01:31:58 Options: call 6 zypper --non-interactive --gpg-auto-import-keys refresh --force 
2024-10-16 01:31:59 Executing `zypper --non-interactive --gpg-auto-import-keys refresh --force`:
Forcing raw metadata refresh
Retrieving repository 'tools_pool_repo' metadata [.......done]
Forcing building of repository cache
Building repository 'tools_pool_repo' cache [....done]
Forcing raw metadata refresh
Retrieving repository 'tools_update_repo' metadata [........done]
Forcing building of repository cache
Building repository 'tools_update_repo' cache [....done]
All repositories have been refreshed.
2024-10-16 01:32:01 Application returned with exit status 0.
2024-10-16 01:32:01 Transaction completed.
2024-10-16 01:32:01 tukit 4.1.9 started
2024-10-16 01:32:01 Options: close 6 
Relabeled /var/lib/YaST2 from unconfined_u:object_r:var_lib_t:s0 to unconfined_u:object_r:rpm_var_lib_t:s0
Relabeled /var/lib/YaST2/cookies from unconfined_u:object_r:var_lib_t:s0 to unconfined_u:object_r:rpm_var_lib_t:s0
2024-10-16 01:32:02 New default snapshot is #6 (/.snapshots/6/snapshot).
2024-10-16 01:32:02 Transaction completed.
2024-10-16 01:32 
2024-10-16 01:32 Please reboot your machine to activate the changes and avoid data loss.
2024-10-16 01:32 New default snapshot is #6 (/.snapshots/6/snapshot).
2024-10-16 01:32 transactional-update finished
2024-10-16 03:32 Checking for newer version.
2024-10-16 03:32 transactional-update 4.1.9 started
2024-10-16 03:32 Options: -n -c package up zypper libzypp venv-salt-minion
2024-10-16 03:32 Separate /var detected.
2024-10-16 03:32:05 tukit 4.1.9 started
2024-10-16 03:32:05 Options: -c6 open 
2024-10-16 03:32:05 Using snapshot 6 as base for new snapshot 7.
2024-10-16 03:32:05 /var/lib/overlay/6/etc
ID: 7
2024-10-16 03:32:05 Transaction completed.
2024-10-16 03:32 2024-10-16 03:32:05 tukit 4.1.9 started
2024-10-16 03:32:05 Options: -c6 open 
2024-10-16 03:32:05 Using snapshot 6 as base for new snapshot 7.
2024-10-16 03:32:05 /var/lib/overlay/6/etc
ID: 7
2024-10-16 03:32:05 Transaction completed.
2024-10-16 03:32 Calling zypper up
2024-10-16 03:32 zypper: nothing to update
2024-10-16 03:32 Removing snapshot #7...
Removing snapshot #7...
2024-10-16 03:32:07 tukit 4.1.9 started
2024-10-16 03:32:07 Options: abort 7 
2024-10-16 03:32:08 Discarding snapshot 7.
2024-10-16 03:32:08 Transaction completed.
2024-10-16 03:32 transactional-update finished
2024-10-16 03:32 Checking for newer version.
2024-10-16 03:32 transactional-update 4.1.9 started
2024-10-16 03:32 Options: -c run zypper --non-interactive --gpg-auto-import-keys refresh --force
2024-10-16 03:32 Separate /var detected.
2024-10-16 03:32:13 tukit 4.1.9 started
2024-10-16 03:32:13 Options: -c6 open 
2024-10-16 03:32:13 Using snapshot 6 as base for new snapshot 7.
2024-10-16 03:32:13 /var/lib/overlay/6/etc
ID: 7
2024-10-16 03:32:14 Transaction completed.
2024-10-16 03:32 2024-10-16 03:32:13 tukit 4.1.9 started
2024-10-16 03:32:13 Options: -c6 open 
2024-10-16 03:32:13 Using snapshot 6 as base for new snapshot 7.
2024-10-16 03:32:13 /var/lib/overlay/6/etc
ID: 7
2024-10-16 03:32:14 Transaction completed.
2024-10-16 03:32:14 tukit 4.1.9 started
2024-10-16 03:32:14 Options: call 7 zypper --non-interactive --gpg-auto-import-keys refresh --force 
2024-10-16 03:32:15 Executing `zypper --non-interactive --gpg-auto-import-keys refresh --force`:
Forcing raw metadata refresh
Retrieving repository 'tools_pool_repo' metadata [.......done]
Forcing building of repository cache
Building repository 'tools_pool_repo' cache [....done]
Forcing raw metadata refresh
Retrieving repository 'tools_update_repo' metadata [........done]
Forcing building of repository cache
Building repository 'tools_update_repo' cache [....done]
All repositories have been refreshed.
2024-10-16 03:32:17 Application returned with exit status 0.
2024-10-16 03:32:17 Transaction completed.
2024-10-16 03:32:17 tukit 4.1.9 started
2024-10-16 03:32:17 Options: close 7 
2024-10-16 03:32:18 New default snapshot is #7 (/.snapshots/7/snapshot).
2024-10-16 03:32:18 Transaction completed.
2024-10-16 03:32 
2024-10-16 03:32 Please reboot your machine to activate the changes and avoid data loss.
2024-10-16 03:32 New default snapshot is #7 (/.snapshots/7/snapshot).
2024-10-16 03:32 transactional-update finished
2024-10-16 03:32 Checking for newer version.
2024-10-16 03:32 transactional-update 4.1.9 started
2024-10-16 03:32 Options: -n -c package up zypper libzypp venv-salt-minion
2024-10-16 03:32 Separate /var detected.
2024-10-16 03:32:19 tukit 4.1.9 started
2024-10-16 03:32:19 Options: -c7 open 
2024-10-16 03:32:19 Using snapshot 7 as base for new snapshot 8.
2024-10-16 03:32:19 /var/lib/overlay/7/etc
ID: 8
2024-10-16 03:32:20 Transaction completed.
2024-10-16 03:32 2024-10-16 03:32:19 tukit 4.1.9 started
2024-10-16 03:32:19 Options: -c7 open 
2024-10-16 03:32:19 Using snapshot 7 as base for new snapshot 8.
2024-10-16 03:32:19 /var/lib/overlay/7/etc
ID: 8
2024-10-16 03:32:20 Transaction completed.
2024-10-16 03:32 Calling zypper up
2024-10-16 03:32 zypper: nothing to update
2024-10-16 03:32 Removing snapshot #8...
Removing snapshot #8...
2024-10-16 03:32:21 tukit 4.1.9 started
2024-10-16 03:32:21 Options: abort 8 
2024-10-16 03:32:22 Discarding snapshot 8.
2024-10-16 03:32:22 Transaction completed.
2024-10-16 03:32 transactional-update finished
2024-10-16 23:00 Checking for newer version.
2024-10-16 23:00 transactional-update 4.1.9 started
2024-10-16 23:00 Options: cleanup
2024-10-16 23:00 Separate /var detected.
2024-10-16 23:00 Adding cleanup algorithm to snapshot #1
2024-10-16 23:00 Adding "important=yes" to snapshot #1
2024-10-16 23:00 Mark unused snapshot #6 for deletion
2024-10-16 23:00 Mark unused snapshot #4 for deletion
2024-10-16 23:00 Mark unused snapshot #3 for deletion
2024-10-16 23:00 Mark unused snapshot #2 for deletion
2024-10-16 23:00 Deleting unused overlay /var/lib/overlay/8
2024-10-16 23:00 Deleting unused overlay /var/lib/overlay/transactional-update.newsnapshot
2024-10-16 23:00 transactional-update finished
2024-10-17 01:28 Checking for newer version.
2024-10-17 01:28 transactional-update 4.1.9 started
2024-10-17 01:28 Options: cleanup up reboot
2024-10-17 01:28 Separate /var detected.
2024-10-17 01:28:40 tukit 4.1.9 started
2024-10-17 01:28:40 Options: -c5 open 
2024-10-17 01:28:40 Using snapshot 5 as base for new snapshot 8.
2024-10-17 01:28:40 /var/lib/overlay/5/etc
2024-10-17 01:28:40 Syncing /etc of previous snapshot 4 as base into new snapshot "/.snapshots/8/snapshot"
2024-10-17 01:28:40 SELinux is enabled.
ID: 8
2024-10-17 01:28:41 Transaction completed.
2024-10-17 01:28 2024-10-17 01:28:40 tukit 4.1.9 started
2024-10-17 01:28:40 Options: -c5 open 
2024-10-17 01:28:40 Using snapshot 5 as base for new snapshot 8.
2024-10-17 01:28:40 /var/lib/overlay/5/etc
2024-10-17 01:28:40 Syncing /etc of previous snapshot 4 as base into new snapshot "/.snapshots/8/snapshot"
2024-10-17 01:28:40 SELinux is enabled.
ID: 8
2024-10-17 01:28:41 Transaction completed.
2024-10-17 01:28 Calling zypper up
2024-10-17 01:28 zypper: nothing to update
2024-10-17 01:28 Removing snapshot #8...
Removing snapshot #8...
2024-10-17 01:28:43 tukit 4.1.9 started
2024-10-17 01:28:43 Options: abort 8 
2024-10-17 01:28:43 Discarding snapshot 8.
2024-10-17 01:28:44 Transaction completed.
2024-10-17 01:28 transactional-update finished
2024-10-17 23:00 Checking for newer version.
2024-10-17 23:00 transactional-update 4.1.9 started
2024-10-17 23:00 Options: cleanup
2024-10-17 23:00 Separate /var detected.
2024-10-17 23:00 Deleting unused overlay /var/lib/overlay/8
2024-10-17 23:00 transactional-update finished
2024-10-18 01:29 Checking for newer version.
2024-10-18 01:29 transactional-update 4.1.9 started
2024-10-18 01:29 Options: cleanup up reboot
2024-10-18 01:29 Separate /var detected.
2024-10-18 01:29:15 tukit 4.1.9 started
2024-10-18 01:29:15 Options: -c5 open 
2024-10-18 01:29:15 Using snapshot 5 as base for new snapshot 8.
2024-10-18 01:29:15 /var/lib/overlay/5/etc
2024-10-18 01:29:15 Syncing /etc of previous snapshot 4 as base into new snapshot "/.snapshots/8/snapshot"
2024-10-18 01:29:15 SELinux is enabled.
ID: 8
2024-10-18 01:29:16 Transaction completed.
2024-10-18 01:29 2024-10-18 01:29:15 tukit 4.1.9 started
2024-10-18 01:29:15 Options: -c5 open 
2024-10-18 01:29:15 Using snapshot 5 as base for new snapshot 8.
2024-10-18 01:29:15 /var/lib/overlay/5/etc
2024-10-18 01:29:15 Syncing /etc of previous snapshot 4 as base into new snapshot "/.snapshots/8/snapshot"
2024-10-18 01:29:15 SELinux is enabled.
ID: 8
2024-10-18 01:29:16 Transaction completed.
2024-10-18 01:29 Calling zypper up
2024-10-18 01:29 zypper: nothing to update
2024-10-18 01:29 Removing snapshot #8...
Removing snapshot #8...
2024-10-18 01:29:18 tukit 4.1.9 started
2024-10-18 01:29:18 Options: abort 8 
2024-10-18 01:29:18 Discarding snapshot 8.
2024-10-18 01:29:19 Transaction completed.
2024-10-18 01:29 transactional-update finished
2024-10-18 23:00 Checking for newer version.
2024-10-18 23:00 transactional-update 4.1.9 started
2024-10-18 23:00 Options: cleanup
2024-10-18 23:00 Separate /var detected.
2024-10-18 23:00 Deleting unused overlay /var/lib/overlay/8
2024-10-18 23:00 transactional-update finished
2024-10-19 01:16 Checking for newer version.
2024-10-19 01:16 transactional-update 4.1.9 started
2024-10-19 01:16 Options: cleanup up reboot
2024-10-19 01:16 Separate /var detected.
2024-10-19 01:16:15 tukit 4.1.9 started
2024-10-19 01:16:15 Options: -c5 open 
2024-10-19 01:16:15 Using snapshot 5 as base for new snapshot 8.
2024-10-19 01:16:15 /var/lib/overlay/5/etc
2024-10-19 01:16:15 Syncing /etc of previous snapshot 4 as base into new snapshot "/.snapshots/8/snapshot"
2024-10-19 01:16:15 SELinux is enabled.
ID: 8
2024-10-19 01:16:16 Transaction completed.
2024-10-19 01:16 2024-10-19 01:16:15 tukit 4.1.9 started
2024-10-19 01:16:15 Options: -c5 open 
2024-10-19 01:16:15 Using snapshot 5 as base for new snapshot 8.
2024-10-19 01:16:15 /var/lib/overlay/5/etc
2024-10-19 01:16:15 Syncing /etc of previous snapshot 4 as base into new snapshot "/.snapshots/8/snapshot"
2024-10-19 01:16:15 SELinux is enabled.
ID: 8
2024-10-19 01:16:16 Transaction completed.
2024-10-19 01:16 Calling zypper up
2024-10-19 01:16 zypper: nothing to update
2024-10-19 01:16 Removing snapshot #8...
Removing snapshot #8...
2024-10-19 01:16:17 tukit 4.1.9 started
2024-10-19 01:16:17 Options: abort 8 
2024-10-19 01:16:18 Discarding snapshot 8.
2024-10-19 01:16:18 Transaction completed.
2024-10-19 01:16 transactional-update finished
2024-10-19 23:00 Checking for newer version.
2024-10-19 23:00 transactional-update 4.1.9 started
2024-10-19 23:00 Options: cleanup
2024-10-19 23:00 Separate /var detected.
2024-10-19 23:00 Deleting unused overlay /var/lib/overlay/8
2024-10-19 23:00 transactional-update finished
2024-10-20 01:01 Checking for newer version.
2024-10-20 01:01 transactional-update 4.1.9 started
2024-10-20 01:01 Options: cleanup up reboot
2024-10-20 01:01 Separate /var detected.
2024-10-20 01:01:14 tukit 4.1.9 started
2024-10-20 01:01:14 Options: -c5 open 
2024-10-20 01:01:15 Using snapshot 5 as base for new snapshot 8.
2024-10-20 01:01:15 /var/lib/overlay/5/etc
2024-10-20 01:01:15 Syncing /etc of previous snapshot 4 as base into new snapshot "/.snapshots/8/snapshot"
2024-10-20 01:01:15 SELinux is enabled.
ID: 8
2024-10-20 01:01:15 Transaction completed.
2024-10-20 01:01 2024-10-20 01:01:14 tukit 4.1.9 started
2024-10-20 01:01:14 Options: -c5 open 
2024-10-20 01:01:15 Using snapshot 5 as base for new snapshot 8.
2024-10-20 01:01:15 /var/lib/overlay/5/etc
2024-10-20 01:01:15 Syncing /etc of previous snapshot 4 as base into new snapshot "/.snapshots/8/snapshot"
2024-10-20 01:01:15 SELinux is enabled.
ID: 8
2024-10-20 01:01:15 Transaction completed.
2024-10-20 01:01 Calling zypper up
2024-10-20 01:01 zypper: nothing to update
2024-10-20 01:01 Removing snapshot #8...
Removing snapshot #8...
2024-10-20 01:01:17 tukit 4.1.9 started
2024-10-20 01:01:17 Options: abort 8 
2024-10-20 01:01:18 Discarding snapshot 8.
2024-10-20 01:01:18 Transaction completed.
2024-10-20 01:01 transactional-update finished
2024-10-20 23:00 Checking for newer version.
2024-10-20 23:00 transactional-update 4.1.9 started
2024-10-20 23:00 Options: cleanup
2024-10-20 23:00 Separate /var detected.
2024-10-20 23:00 Deleting unused overlay /var/lib/overlay/8
2024-10-20 23:00 transactional-update finished
2024-10-21 00:47 Checking for newer version.
2024-10-21 00:47 transactional-update 4.1.9 started
2024-10-21 00:47 Options: cleanup up reboot
2024-10-21 00:47 Separate /var detected.
2024-10-21 00:47:39 tukit 4.1.9 started
2024-10-21 00:47:39 Options: -c5 open 
2024-10-21 00:47:39 Using snapshot 5 as base for new snapshot 8.
2024-10-21 00:47:39 /var/lib/overlay/5/etc
2024-10-21 00:47:39 Syncing /etc of previous snapshot 4 as base into new snapshot "/.snapshots/8/snapshot"
2024-10-21 00:47:39 SELinux is enabled.
ID: 8
2024-10-21 00:47:40 Transaction completed.
2024-10-21 00:47 2024-10-21 00:47:39 tukit 4.1.9 started
2024-10-21 00:47:39 Options: -c5 open 
2024-10-21 00:47:39 Using snapshot 5 as base for new snapshot 8.
2024-10-21 00:47:39 /var/lib/overlay/5/etc
2024-10-21 00:47:39 Syncing /etc of previous snapshot 4 as base into new snapshot "/.snapshots/8/snapshot"
2024-10-21 00:47:39 SELinux is enabled.
ID: 8
2024-10-21 00:47:40 Transaction completed.
2024-10-21 00:47 Calling zypper up
2024-10-21 00:47 zypper: nothing to update
2024-10-21 00:47 Removing snapshot #8...
Removing snapshot #8...
2024-10-21 00:47:41 tukit 4.1.9 started
2024-10-21 00:47:41 Options: abort 8 
2024-10-21 00:47:42 Discarding snapshot 8.
2024-10-21 00:47:42 Transaction completed.
2024-10-21 00:47 transactional-update finished
2024-10-21 10:58 Checking for newer version.
2024-10-21 10:58 transactional-update 4.1.9 started
2024-10-21 10:58 Options: pkg update mgradm
2024-10-21 10:58 Separate /var detected.
2024-10-21 10:58 WARNING: You are creating a snapshot from a different base (5) than the
2024-10-21 10:58          current default snapshot (7).
2024-10-21 10:58          If you want to continue a previous snapshot use the --continue
2024-10-21 10:58          option, otherwise the previous changes will be discarded.
2024-10-21 10:58:36 tukit 4.1.9 started
2024-10-21 10:58:36 Options: -c5 open 
2024-10-21 10:58:36 Using snapshot 5 as base for new snapshot 8.
2024-10-21 10:58:36 /var/lib/overlay/5/etc
2024-10-21 10:58:36 Syncing /etc of previous snapshot 4 as base into new snapshot "/.snapshots/8/snapshot"
2024-10-21 10:58:36 SELinux is enabled.
ID: 8
2024-10-21 10:58:37 Transaction completed.
2024-10-21 10:58 2024-10-21 10:58:36 tukit 4.1.9 started
2024-10-21 10:58:36 Options: -c5 open 
2024-10-21 10:58:36 Using snapshot 5 as base for new snapshot 8.
2024-10-21 10:58:36 /var/lib/overlay/5/etc
2024-10-21 10:58:36 Syncing /etc of previous snapshot 4 as base into new snapshot "/.snapshots/8/snapshot"
2024-10-21 10:58:36 SELinux is enabled.
ID: 8
2024-10-21 10:58:37 Transaction completed.
2024-10-21 10:58 Calling zypper up
2024-10-21 10:58 zypper: nothing to update
2024-10-21 10:58 Removing snapshot #8...
Removing snapshot #8...
2024-10-21 10:58:39 tukit 4.1.9 started
2024-10-21 10:58:39 Options: abort 8 
2024-10-21 10:58:40 Discarding snapshot 8.
2024-10-21 10:58:40 Transaction completed.
2024-10-21 10:58 transactional-update finished

@nodeg
Copy link
Member

nodeg commented Oct 22, 2024

I remember that there could be issues when you reboot a system during a Salt state. Maybe we can do the reboot at the very end of Salt?

@srbarrios
Copy link
Member Author

srbarrios commented Oct 22, 2024

I remember that there could be issues when you reboot a system during a Salt state. Maybe we can do the reboot at the very end of Salt?

I'm worry about the behavior on salt states after the action mentioned here:

        transactional-update -c run zypper --non-interactive --gpg-auto-import-keys refresh --force

As this will not take into account after a reboot, so next actions on salt states will not have this applied.

(That's on snapshot 6, on the case we are trying to fix)

@srbarrios srbarrios changed the title Reboot after zypper ref Don't trigger repos salt states for a server on a transactional system Oct 22, 2024
@srbarrios
Copy link
Member Author

I changed the draft, so we don't run unnecessary salt states on the server if we are on a transactional system

@srbarrios srbarrios requested review from a team and removed request for ycedres, meaksh, m-czernek and vzhestkov October 22, 2024 08:58
@srbarrios srbarrios self-assigned this Oct 22, 2024
@srbarrios srbarrios marked this pull request as ready for review October 22, 2024 08:59
@srbarrios
Copy link
Member Author

It seems to work without any issue:

Apply complete! Resources: 1 added, 0 changed, 1 destroyed.
obarrios@suma-05:~> ssh [email protected]
([email protected]) Password: 
Last login: Tue Oct 22 12:14:28 2024 from 10.145.208.68
oscar-srv:~ # snapper list
Failed to set locale. Fix your system.
 # | Type   | Pre # | Date                     | User | Used Space | Cleanup | Description           | Userdata
---+--------+-------+--------------------------+------+------------+---------+-----------------------+---------
0  | single |       |                          | root |            |         | current               |         
1  | single |       | Mon Oct 21 17:03:56 2024 | root | 560.00 KiB |         | first root filesystem |         
2  | single |       | Tue Oct 22 11:56:43 2024 | root | 404.00 KiB |         | Snapshot Update of #1 |         
3  | single |       | Tue Oct 22 11:56:47 2024 | root | 416.00 KiB |         | Snapshot Update of #2 |         
4  | single |       | Tue Oct 22 11:56:57 2024 | root | 592.00 KiB |         | Snapshot Update of #3 |         
5* | single |       | Tue Oct 22 11:57:07 2024 | root | 177.62 MiB |         | Snapshot Update of #4 |         
oscar-srv:~ # zypper lr
Repository priorities are without effect. All enabled repositories share the same priority.

# | Alias             | Name              | Enabled | GPG Check | Refresh
--+-------------------+-------------------+---------+-----------+--------
1 | 35946_repo        | 35946_repo        | No      | ----      | ----
2 | 35957_repo        | 35957_repo        | No      | ----      | ----
3 | ca_suse           | ca_suse           | No      | ----      | ----
4 | micro_pool_repo   | micro_pool_repo   | No      | ----      | ----
5 | micro_update_repo | micro_update_repo | No      | ----      | ----
6 | os_pool_repo      | os_pool_repo      | No      | ----      | ----
7 | tools_pool_repo   | tools_pool_repo   | Yes     | (r ) Yes  | Yes
8 | tools_update_repo | tools_update_repo | Yes     | (r ) Yes  | Yes
oscar-srv:~ # mgradm --version
mgradm version 0.1.23 (HEAD 20a1aa6)

@srbarrios srbarrios merged commit 1efab3d into master Oct 22, 2024
2 checks passed
@srbarrios srbarrios deleted the reboot-after-zypper-ref branch October 22, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants