Problem description
Channel repo sync schedule can't be changed while Taskomatic is (automatically) running a "repo-sync" task for the specific channel at the moment.
Attempting to change the sync schedule will result in error and the previously configured schedule to be deleted/lost.
I would not expect the schedule change to fail and especially result in the previously set schedule to be deleted/lost.
Version of Uyuni Server and Proxy (if used)
Reproduced on two separate Uyuni Servers on versions 2022.05 and 2022.06 (updated from 2022.05). I do not know if this affects older versions.
Information for package Uyuni-Server-release:
---------------------------------------------
Repository : Uyuni Server Stable
Name : Uyuni-Server-release
Version : 2022.06-183.9.uyuni2
Arch : x86_64
Vendor : obs://build.opensuse.org/systemsmanagement:Uyuni
Support Level : Level 3
Installed Size : 1.4 KiB
Installed : Yes (automatically)
Status : up-to-date
Source package : Uyuni-Server-release-2022.06-183.9.uyuni2.src
Summary : Uyuni Server
Description :
Uyuni lets you efficiently manage physical, virtual,
and cloud-based Linux systems. It provides automated and cost-effective
configuration and software management, asset management, and system
provisioning.
Details about the issue
I discovered this issue about a week before opening this issue. I was trying to mass-update channel sync schedules via spacecmd and some channels repeatedly resulted in error. It later came apparent that the channels in question were being automatically synchronized at the moment by Taskomatic due to the daily schedule setting.
These channels are both added via spacewalk-common-channels or manually via Web UI or spacecmd and function fine otherwise.
2022-06-29: I have so far only observed this issue on DEB repositories (Debian & Ubuntu), but this could be because the RPM repositories in my environment(s) are automatically synchronized earlier in the morning when I haven't done any tests.
This affects RPM and DEB based channels.
How to reproduce
- Set up an Uyuni Server version 2022.06 with some channels added via
spacewalk-common-channels etc.
These channels contain packages and patches/errata from previous automatic synchronizations.
- Set a daily sync schedule for a channel and wait for Taskomatic to initiate "repo-sync" at the specified time (I've used Daily at 11:00 schedule for this test)
- Web UI: Software -> Channels -> [CHANNEL] -> Repositories -> Sync -> Select a Schedule: "Daily at 11:00"
- CLI:
spacecmd 'softwarechannel_setsyncschedule CHANNEL-LABEL 0 0 11 ? * *'
- Inspect the Taskomatic Runtime Status to see when the repo-sync task has been initiated by Taskomatic at about 11:00.
- Web UI: Admin -> Task Engine Status -> Runtime Status -> Filter by name: "repo-sync"
- CLI:
taskotop -e (taskotop is provided by the spacewalk-utils-extras package)
- Attempt to change the existing sync schedule for the channel currently being synchronized (I've usually tried changing the schedule when the task has been running for 1 or more minutes).
- It will always result in error "Schedule of Repo Sync failed. Check logs for more information." (via Web UI) or "Taskomatic is not available." (via spacecmd)
- Existing sync schedule (
0 0 11 ? * *) is deleted at this point and appears unset/disabled when inspecting via Web UI or spacecmd.
Logs and error messages
#Automatically scheduled sync is currently being run for the channel by Taskomatic. It is 11:09~ at this time.
$ spacecmd softwarechannel_listsyncschedule | grep 'ubuntu-1804-amd64-multiverse-security-uyuni'
INFO: Connected to http://localhost/rpc/api as admin
123 ubuntu-1804-amd64-multiverse-security-uyuni 0 0 11 ? * *
#Attempting to change the sync schedule from 11:00 to 20:00.
$ spacecmd 'softwarechannel_setsyncschedule ubuntu-1804-amd64-multiverse-security-uyuni 0 0 20 ? * *'
INFO: Connected to http://localhost/rpc/api as admin
ERROR: redstone.xmlrpc.XmlRpcFault: Taskomatic is not available.
#Previous schedule change failed and the existing schedule (`0 0 11 ? * *`) was deleted without the new schedule being set.
$ spacecmd softwarechannel_listsyncschedule | grep 'ubuntu-1804-amd64-multiverse-security-uyuni'
INFO: Connected to http://localhost/rpc/api as admin
123 ubuntu-1804-amd64-multiverse-security-uyuni
/var/log/rhn/rhn_taskomatic_daemon.log:
2022-06-29 11:09:06,311 [Thread-18] WARN com.redhat.rhn.taskomatic.TaskoQuartzHelper - Job repo-sync-1-123 failed to schedule.
/var/log/messages:
2022-06-29T11:09:06.328960+03:00 uyuni-server server[6462]: [Fatal Error] :-1:-1: Premature end of file.
2022-06-29T11:09:06.329935+03:00 uyuni-server server[6462]: 29-Jun-2022 11:01:52.629 WARNING [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-2] redstone.xmlrpc.XmlRpcDispatcher.writeError redstone.xmlrpc.XmlRpcFault: Taskomatic is not available.
Task Engine Runtime Status at the time:
| Task Id |
Task Name |
Start Time |
End Time |
Elapsed Time |
Status |
Data |
| 85789 |
repo-sync |
11:00 |
|
549 seconds |
running |
Ubuntu 18.04 LTS AMD64 Multiverse Security for Uyuni |
The task ended successfully later and there were no new packages or patches/errata to be imported.
Problem description
Channel repo sync schedule can't be changed while Taskomatic is (automatically) running a "repo-sync" task for the specific channel at the moment.
Attempting to change the sync schedule will result in error and the previously configured schedule to be deleted/lost.
I would not expect the schedule change to fail and especially result in the previously set schedule to be deleted/lost.
Version of Uyuni Server and Proxy (if used)
Reproduced on two separate Uyuni Servers on versions 2022.05 and 2022.06 (updated from 2022.05). I do not know if this affects older versions.
Details about the issue
I discovered this issue about a week before opening this issue. I was trying to mass-update channel sync schedules via spacecmd and some channels repeatedly resulted in error. It later came apparent that the channels in question were being automatically synchronized at the moment by Taskomatic due to the daily schedule setting.
These channels are both added via
spacewalk-common-channelsor manually via Web UI or spacecmd and function fine otherwise.2022-06-29: I have so far only observed this issue on DEB repositories (Debian & Ubuntu), but this could be because the RPM repositories in my environment(s) are automatically synchronized earlier in the morning when I haven't done any tests.This affects RPM and DEB based channels.
How to reproduce
spacewalk-common-channelsetc.These channels contain packages and patches/errata from previous automatic synchronizations.
spacecmd 'softwarechannel_setsyncschedule CHANNEL-LABEL 0 0 11 ? * *'taskotop -e(taskotop is provided by thespacewalk-utils-extraspackage)0 0 11 ? * *) is deleted at this point and appears unset/disabled when inspecting via Web UI or spacecmd.Logs and error messages
/var/log/rhn/rhn_taskomatic_daemon.log:
/var/log/messages:
Task Engine Runtime Status at the time:
The task ended successfully later and there were no new packages or patches/errata to be imported.