Menu

#3495 clear globals used in GetOptions calls

2.9
closed
5
2014-01-09
2013-04-12
Norm Nott
No

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.

Discussion

  • Norm Nott

    Norm Nott - 2013-04-18
     
  • Norm Nott

    Norm Nott - 2013-04-18

    Created a new subroutine: xCAT::Utils->clroptionvars() in Utils.pm

    xCAT 2.9 - revision 16015

     
  • Norm Nott

    Norm Nott - 2013-06-25
    • Milestones: 2.8.2 --> 2.9
     
  • Norm Nott

    Norm Nott - 2013-06-25

    Don't want to chance damaging 2.8.2 - shouldn't be an issue waiting until 2.9

     
  • Lissa Valletta

    Lissa Valletta - 2013-07-16
    • labels: --> Linux-specific
     
  • Lissa Valletta

    Lissa Valletta - 2013-07-16

    Fixes should only be for Linux. No improvements for AIX.

     
  • Norm Nott

    Norm Nott - 2014-01-09
    • status: open --> closed
     
MongoDB Logo MongoDB