sclorg / container-common-scripts

Apache License 2.0
21 stars 45 forks source link

cgroups: return None if number of cores can not be obtained #316

Closed zmiklank closed 1 year ago

zmiklank commented 1 year ago

Fixes: https://github.com/sclorg/postgresql-container/issues/482

zmiklank commented 1 year ago

[test-all]

zmiklank commented 1 year ago

@pkubat could you please look at this?

Another approach could be to return at least something, if either _read_cpu_quota() or _read_cpuset_size() is successful. Wdyt?

pkubatrh commented 1 year ago

Since the return part already expects None in the list items, we should instead check if there are only None values in the list.

zmiklank commented 1 year ago

Oh, you are right.

zmiklank commented 1 year ago

Fixed.

pkubatrh commented 1 year ago

[test-all]

pkubatrh commented 1 year ago

LGTM if tests pass

zmiklank commented 1 year ago

This change will not appear in the test results, because they affect the s2i-core-container -> other containers would need be to be rebuilt on top of it first, in order to propagate the change.