[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Potential documentation bug for RESERVED_DISK?



Hi again,

we just ran into another (smaller) confusion which is of a similar nature as the RESERVED_DISK thing:

  https://htcondor.readthedocs.io/en/latest/admin-manual/configuration-macros.html#JOB_DEFAULT_REQUEST_DISK

This one is correctly documented as using as KB but my first look was into the source code causing the confusion...

In condor_utils/submit_utils.cpp:

        if (disk) {
                // if input is an integer followed by K,M,G or T, scale it MB and 
                // insert it into the jobAd, otherwise assume it is an expression
                // and insert it as text into the jobAd.
                int64_t req_disk_kb = 0;
                if (parse_int64_bytes(disk, req_disk_kb, 1024)) {
                        AssignJobVal(ATTR_REQUEST_DISK, req_disk_kb);
                } else if (YourStringNoCase("undefined") == disk) {
                } else {
                        AssignJobExpr(ATTR_REQUEST_DISK, disk);
                }
        }

The comment suggested that the default would be MB instead while the var name suggests KB.

After looking into parse_int64_bytes() it turned out it is actually KB and looking into the documentation then confirmed it.

Nonetheless, you might want to fix the comment as to not confuse any future devs trying to understand this code.

Best
  Kruno

----- Original Message -----
> From: "Krunoslav Sever" <krunoslav.sever@xxxxxxx>
> To: "HTCondor-Users Mail List" <htcondor-users@xxxxxxxxxxx>
> Sent: Tuesday, 13 July, 2021 09:03:26
> Subject: Re: [HTCondor-users] Potential documentation bug for RESERVED_DISK?

> Forgot the documentation links...
> 
> This is the latest one, explicitly saying KB
> 
> https://htcondor.readthedocs.io/en/latest/admin-manual/configuration-macros.html#RESERVED_DISK
> 
> This is an older one, with no mention of units, suggesting that it might be the
> same as DISK?
> 
> https://htcondor.readthedocs.io/en/v8_9_3/admin-manual/configuration-macros.html#index-50
> 
> ----- Original Message -----
>> From: "Krunoslav Sever" <krunoslav.sever@xxxxxxx>
>> To: "HTCondor-Users Mail List" <htcondor-users@xxxxxxxxxxx>
>> Sent: Tuesday, 13 July, 2021 08:54:05
>> Subject: [HTCondor-users] Potential documentation bug for RESERVED_DISK?
> 
>> Hi all,
>> 
>> the documentation for RESERVED_DISK says that the unit KB is assumed (same as
>> Disk).
>> 
>> It looks like it is in MB, though - in the source code we have:
>> 
>> condor_sysapi/reconfig.cpp
>> _sysapi_reserve_disk = param_integer_c( "RESERVED_DISK", 0, INT_MIN, INT_MAX );
>> _sysapi_reserve_disk *= 1024;    /* Parameter is in meg */
>> 
>> We recently used the config variable to reserve 2GB which caused the calculated
>> DISK attribute to be set to 0 on some hosts, when using 2000000.
>> 
>> These hosts then simply did not match jobs (insufficient DISK) and it took us a
>> while to find out why...
>> 
>> After removing three 0's and using 2000 instead, the hosts again have DISK and
>> immediately started running jobs.
>> 
>> Best
>>  Kruno
>> 
>> --
>> ------------------------------------------------------------------------
>> Krunoslav Sever            Deutsches Elektronen-Synchrotron (IT-Systems)
>>                        Ein Forschungszentrum der Helmholtz-Gemeinschaft
>>                                                            Notkestr. 85
>> phone:  +49-40-8998-1648                                   22607 Hamburg
>> e-mail: krunoslav.sever@xxxxxxx                                  Germany
>> ------------------------------------------------------------------------
>> _______________________________________________
>> HTCondor-users mailing list
>> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
>> subject: Unsubscribe
>> You can also unsubscribe by visiting
>> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
>> 
>> The archives can be found at:
>> https://lists.cs.wisc.edu/archive/htcondor-users/
> 
> --
> ------------------------------------------------------------------------
> Krunoslav Sever            Deutsches Elektronen-Synchrotron (IT-Systems)
>                        Ein Forschungszentrum der Helmholtz-Gemeinschaft
>                                                            Notkestr. 85
> phone:  +49-40-8998-1648                                   22607 Hamburg
> e-mail: krunoslav.sever@xxxxxxx                                  Germany
> ------------------------------------------------------------------------
> _______________________________________________
> HTCondor-users mailing list
> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
> 
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/htcondor-users/

-- 
------------------------------------------------------------------------
Krunoslav Sever            Deutsches Elektronen-Synchrotron (IT-Systems)
                        Ein Forschungszentrum der Helmholtz-Gemeinschaft
                                                            Notkestr. 85
phone:  +49-40-8998-1648                                   22607 Hamburg
e-mail: krunoslav.sever@xxxxxxx                                  Germany
------------------------------------------------------------------------