The GetOptions calls for many xCAT commands use global variables. In some cases (ex. PCM) multiple commands might be called from the same process. If the global vars aren't reset then they may be carried over to the next call to the command.
This was the situation that came up when we had a plugin that used runxcmd() to make two calls to makehosts, the first had a "-d" flag which was saved in $::DELNODE. When the makehosts command was called a second time it still had the $::DELNODE set.
We should refrain from using global variables for GetOptions (and in general). However, for those cases where this is already implemented we could use a new subroutine to clear the globals before calling GetOptions.
Created a new subroutine: xCAT::Utils->clroptionvars() in Utils.pm
xCAT 2.9 - revision 16015
Don't want to chance damaging 2.8.2 - shouldn't be an issue waiting until 2.9
Fixes should only be for Linux. No improvements for AIX.