Operating System - HP-UX
1829012 Members
2369 Online
109986 Solutions
New Discussion

Why eliminate unused modules in a package?

 
SOLVED
Go to solution
Ken Englander
Regular Advisor

Why eliminate unused modules in a package?

We have a LOT of clusters that will be migrating from 11.17.01 to 11.19 and to modular packages. I "like" the idea of cleaning up the packages so they only reference modules actually being used. However, I am wondering are there good reasons to eliminate the unused modules? The cmmigratepkg command generates ALL the modules available so cleanup or creation from scratch is the only way to eliminate unused modules.

I would guess that startup and shutdown of a package would be a bit quicker but other than that I am not sure what other good reasons might justify cleaning up the packages. Also, to me it would be a best practice to eliminate the unused modules.

Any input would be appreciated?
3 REPLIES 3
Stephen Doud
Honored Contributor
Solution

Re: Why eliminate unused modules in a package?

Legacy package control scripts run all script functions whether or not parameters were defined in the top part of the scripts.

My bet is you did not delete function calls in legacy package scripts if the related parameter was not identified.

With modular packages, module "sg/all" includes all standard modules (equivalent of a complete package control script). So, though all standard modules may be identified, package start/stop time should be nearly equivalent to a legacy control script.

Compare the number of modules identified in the package configuration file to those listed in /etc/cmcluster/modules/sg/all. If there are no more, then I wouldn't burn the time cleaning out unused modules.
Matti_Kurkela
Honored Contributor

Re: Why eliminate unused modules in a package?

It would also minimize the amount of code run at package startup/shutdown, which would make troubleshooting easier in case there is a problem. Less code = less places where things can go wrong.

MK
MK
Ken Englander
Regular Advisor

Re: Why eliminate unused modules in a package?

Hi Stephen

You are correct that no function calls were removed from the control files. The only changes made were to add a call to our script in the customer_defined_run_cmds and the customer_defined_halt_cmds functions. No one has ever suggested making other changes to the control files other than in the parameters section.

It sounds like there is little point in cleaning up the configuration file.

Hi Matti

Your point is well taken and it is probably the one reason with any basis to do the cleanup. However, in my case there is more likelihood of causing a problem by making a mistake when doing the cleanup.

Thank you both for your input!