Wednesday 25 June 2014

warning: /etc/rc.d/rc.sysinit saved as /etc/rc.d/rc.sysinit.rpmsave,warning: /etc/sysctl.conf created as /etc/sysctl.conf.rpmnew - EXPLAINED!

In case that you doing update/upgrade of some rpm packages, during this operation you may get warnings that new config files is generated or that used configuration has been moved to another name!

For instance, if you are updating rpm packages initscripts,  you will have this warning messages!


server#yum update initscripts
.
.
  Updating       : initscripts                                               1/1
warning: /etc/rc.d/rc.sysinit saved as /etc/rc.d/rc.sysinit.rpmsave
warning: /etc/sysctl.conf created as /etc/sysctl.conf.rpmnew

.
.

What does this means? As you all know, every service has configuration. Depending on how "big" update is, there might be smaller or bigger changes in configuration as well(different approach, different settings,etc.) or they just want clean configuration! If this is the case then new configuration is stored in *.rpmnew file or currently used configuration is moved in *.rpmsave file and new configuration is stored in configuration file! Will .rpmsave or .rpmnew file be created depends of service that is being updated.

.rpmsave file is created if service that is using that configuration need reboot to be applied!
.rpmnew file is created if service that is using that configuration need just need restart of service!

In my example, /etc/rc.d/rc.sysinit file is moved to /etc/rc.d/rc.sysinit.rpmsave because this changes can be only applied during server reboot.
 /etc/sysctl.conf file is moved to /etc/sysctl.conf.rpmnew because this changes can be only applied by issuing sysctl command and will be affected immediately!

Now, comes tricky part! If you reboot your servers, your new rc.sysinit configuration will be applied and this may result that some of your service do not start because they are now not in that config file. Of course, usually there are no service start in rc.sysinit file but you never know especially if you inherit server from another admin. So, if these new config files are created that you should look for difference between them.

Simple solutions are best so after config files are moved to .rpmsave, see difference between them, and just move .rpmsave to original file!

server#mv /etc/rc.d/rc.sysinit.rpmsave /etc/rc.d/rc.sysinit

and you will use same configuration that you use after reboot!

When you know all this, it can save you a lot's of troubleshooting time!

.rpmnew do not make any trouble because because service is still using original config file!





No comments: