Opened 15 years ago

Last modified 9 years ago

#250 new defect

IZ1641: Integer values can be stored for boolean variables

Reported by: olle Owned by:
Priority: lowest Milestone:
Component: sge Version: 6.0u4
Severity: Keywords: qmaster
Cc:

Description

[Imported from gridengine issuezilla http://gridengine.sunsource.net/issues/show_bug.cgi?id=1641]

        Issue #:      1641             Platform:     All      Reporter: olle (olle)
       Component:     gridengine          OS:        All
     Subcomponent:    qmaster          Version:      6.0u4       CC:    None defined
        Status:       REOPENED         Priority:     P5
      Resolution:                     Issue type:    DEFECT
                                   Target milestone: ---
      Assigned to:    andreas (andreas)
      QA Contact:     ernst
          URL:
       * Summary:     Integer values can be stored for boolean variables
   Status whiteboard:
      Attachments:

     Issue 1641 blocks:
   Votes for issue 1641:


   Opened: Fri May 27 03:25:00 -0700 2005 
------------------------


This is just a cosmetic error since it doesn't break any functionality. At least
not for me.

Define a boolean complex variable:
test t BOOL == YES NO FALSE 0

% qconf -aattr exechost complex_values test=0 <hostname>
% qconf -se <hostname>|grep complex_values
complex_values        test=0

It still matches the resource requirement '-l test=false'. But I would expect a
true/false value to be stored in the database.

   ------- Additional comments from sgrell Tue Dec 6 03:45:20 -0700 2005 -------
Changed subcomponent

Stephan

   ------- Additional comments from ernst Tue Dec 6 11:57:07 -0700 2005 -------
This is a feature not a bug. The described behaviour is allowed since
complex_values exist.

   ------- Additional comments from olle Tue Dec 6 13:56:52 -0700 2005 -------
I'm sorry, but I don't fully understand why this is a feature and not a bug.

I can understand that a boolean value is stored as an integer internally, but I
can't understand that it should be necessary or useful to have more than two
possible states for a boolean variable.

What is stored internally might be an implementation issue, but it is reasonable
requirement that 'qconf -se <hostname>' reports either the values true/false or
a numeric value for a given variable.

   ------- Additional comments from olle Wed Dec 7 00:38:53 -0700 2005 -------
Some additional examples for why this is a bug. Obviously some type checking is
implemented since the last command fails, but it is sort of an odd range of
values that is accepted:

% qconf -mattr exechost complex_values test=true pml
olle@portmoller.carmen.se modified "portmoller.carmen.se" in exechost list
% qconf -se pml|grep complex_values
complex_values        test=true

% qconf -mattr exechost complex_values test=false pml
olle@portmoller.carmen.se modified "portmoller.carmen.se" in exechost list
% qconf -se pml|grep complex_values
complex_values        test=false

% qconf -mattr exechost complex_values test=0 pml
olle@portmoller.carmen.se modified "portmoller.carmen.se" in exechost list
% qconf -se pml|grep complex_values
complex_values        test=0

% qconf -mattr exechost complex_values test=-32768 pml
olle@portmoller.carmen.se modified "portmoller.carmen.se" in exechost list
% qconf -se pml|grep complex_values
complex_values        test=-32768

% qconf -mattr exechost complex_values test=apa pml
wrong type in "test=apa" - boolean value expected

Change History (0)

Note: See TracTickets for help on using tickets.