Hello together.

At the moment it's possible to reboot a system using the web interface or the XMLRPC API. It doesn't matter if there are other actions scheduled for a system at the same time (or a few minutes before and after), you can schedule a system reboot every time.

After the system picked up the system reboot action it runs a "shutdown -r 3" (or something similar), the reboot will start (hopefully) after 3 minutes. The action in the event schedule is "completed" after scheduling the system reboot on the registered system.

(Maybe "completed" is "succeeded" in the web interface? I'm not sure and don't have a Spacewalk installation with me.)

There are several problems with this implementation and I hope we can find some solutions together.

1.
task:
Schedule a package deployment at 22:00 and a system reboot at 22:01.

problem:
After starting the package deployment the system reboot starts, the action is probably not completed when the system goes down, the package deployment action failed.

solution?:
It should not be possible to schedule a system reboot if there are running actions on a system.

or: If there is a scheduled system reboot and there is a running action on the system after the system picked up the system reboot action the system reboot should not start.

Maybe we should introduce two parameters for a system reboot action: "force system reboot" (this will reboot a system even if there is a running action) and "delay system reboot n times for m minutes" (this will delay the reboot for m minutes if there is a running action on the system, but only n times, after n times the system reboot action is "failed"). If you not force a system reboot it will not happen if there are running actions on the system.

2.
task:
Schedule a system reboot at 22:00 and a package deployment at 22:01.

problem:
After starting the system reboot the systems picks up the next action, the package deployment action, and starts installing packages. Because there is a running system reboot the package deployment action will fail a few minutes later, the package deployment action failed.

solution?:
It should not be possible to schedule new actions after scheduling a system reboot action (system is locked and gets unlocked after the succeeded system reboot?). If there are already scheduled actions they 1) should be cancelled or 2) they should be delayed.

3.
task:
Schedule a system reboot at 22:00.

problem:
The system picks up the action and starts the system reboot, the action in the event schedule is now "completed". But the system reboot will fail a few minutes later, because I will detach the power.

solution?:
I'm not sure about that. There has to be some logic on a registered system. I think it's necessary that Spacewalk can determine the correct status of a system reboot.

An other example: At the moment it's possible to cancel the system reboot on the system (shutdown -c). The action in the event schedule is "completed" but the system reboot will never happen.

Bye, Christian.

--
Christian Berendt
Linux / Unix Consultant & Developer
Mail: bere...@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to