<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=KernelUpdate</id>
	<title>KernelUpdate - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=KernelUpdate"/>
	<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=KernelUpdate&amp;action=history"/>
	<updated>2026-05-16T10:05:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://t2bwiki.iihe.ac.be/index.php?title=KernelUpdate&amp;diff=161&amp;oldid=prev</id>
		<title>Maintenance script: Created page with &quot; === The great steps of kernel update in brief === Kernel critical update is normally necessary only on UIs and WNs, since these are the only machines where users can get dir...&quot;</title>
		<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=KernelUpdate&amp;diff=161&amp;oldid=prev"/>
		<updated>2015-08-26T12:28:44Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; === The great steps of kernel update in brief === Kernel critical update is normally necessary only on UIs and WNs, since these are the only machines where users can get dir...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
=== The great steps of kernel update in brief ===&lt;br /&gt;
Kernel critical update is normally necessary only on UIs and WNs, since these are the only machines where users can get direct access and/or execute programs.&lt;br /&gt;
&lt;br /&gt;
The first step is to upload the kernel update RPM to BEgrid repository and to update the corresponding Quattor template. This step is fully described [http://mon.iihe.ac.be/trac/t2b/wiki/GridAdminSurvivalGuide#AddinganewkernelupdatetoBEgridrepo here].&lt;br /&gt;
&lt;br /&gt;
The next step is to modify the nlist OS_KERNEL_VERSION_DEFAULT in Quattor, in the template os/kernel_version_arch. This nlist associates to each OS a default kernel version.&lt;br /&gt;
&lt;br /&gt;
The last step is to reboot all the WNs and UIs.&lt;br /&gt;
&lt;br /&gt;
=== A script to automate the reboot of all the workernodes ===&lt;br /&gt;
Manual reboot of all the workernodes without putting the site in downtime is a long and dull task ! As you cannot reboot a workernode on which jobs are running, you must first put if offline, then wait until it is drained (it can take a few days in case of long jobs) before you can reboot it, and then wait again until it is up to put it back online, provided that the machine has the good kernel version. Applying this procedure to tens of workernodes requires a good organization and a lot of patience, and it also involves a lot of repetitive tasks. That&amp;#039;s why we decided to write a script to automate the reboot process of all the workernodes.&lt;br /&gt;
&lt;br /&gt;
To write the script, we started from the following idea : during the reboot process, each node will pass through different states :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
initial state (offline or online) --&amp;gt; offline and draining --&amp;gt; offline and drained --&amp;gt; rebooting --&amp;gt; rebooted --&amp;gt; back to initial state (offline or online)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a machine fails during the transition between two states, then it will fall in a special state &amp;quot;error&amp;quot;. Each of these states will be materialized by a file, and during the process, the machine names will migrate through the different files as the corresponding machines will evolve from one state to the next one. The human operator, whose job was to check periodically the actual state of each machine and to take action accordingly, will be replaced by a cron job.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to use the reboot_wns script ===&lt;br /&gt;
The reboot_wns script is written in Perl. You can get some help by typing :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
perldoc reboot_wns.pl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
The general parameters of the script are to be changed in the reboot.conf file. Here is an example :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Name of the reboot script&lt;br /&gt;
reboot_script_name=reboot.pl&lt;br /&gt;
# Define the periodicity in minutes for executing the reboot script&lt;br /&gt;
reboot_script_period=2&lt;br /&gt;
# Define the maximum number of WNs that can be offline simultaneously&lt;br /&gt;
max_offline_wns=5&lt;br /&gt;
# Define the name of the CE&lt;br /&gt;
ce_name=gridce&lt;br /&gt;
# Define the wanted kernel version&lt;br /&gt;
good_kernel_version=2.6.9-89.29.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must also create a list of the workernodes you want to reboot :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@ccq stephane]# cat all_wns&lt;br /&gt;
node11-1.wn.iihe.ac.be&lt;br /&gt;
node12-7.wn.iihe.ac.be&lt;br /&gt;
node12-8.wn.iihe.ac.be&lt;br /&gt;
node14-1.wn.iihe.ac.be&lt;br /&gt;
node14-10.wn.iihe.ac.be&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Initialisation ====&lt;br /&gt;
&lt;br /&gt;
==== Start ====&lt;br /&gt;
==== Stop ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Known problems ====&lt;br /&gt;
*Nodes for which there was a problem during the process are put in the error list, and they are accounted as offline nodes by the reboot cron job. This might create the following situation. Imagine you set the maximum number of offline nodes to 5, and that you have 10 nodes that are found to be down during initialisation. As the maximum number of offline nodes is exceeded the reboot cron script will never put any nodes offline, and it will run forever doing nothing. To avoid this, just put in comment in your initial list the nodes that are down. That way, they won&amp;#039;t be consider.&lt;br /&gt;
*It may happen that a node fails to come back to life after a reboot. Such a node will stay forever in the list of rebooting nodes and will never move to the rebooted status. And so, the reboot process will never end, and it will never suggest you to do a --stop.&lt;br /&gt;
&lt;br /&gt;
=== Code in CVS ===&lt;br /&gt;
*The scripts are available in the cern CVS repository. A link to the what/how of cms CVS repo is found [https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookSoftware here]&lt;br /&gt;
*The code can be found [http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/T2B_IIHE/ here]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TracNotice|{{PAGENAME}}}}&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>