glideinWMS / glideinwms

The glideinWMS Project
http://tinyurl.com/glideinwms
Apache License 2.0
16 stars 46 forks source link

Advertizing information about unprivileged user namespaces in glidein classad #416

Closed namrathaurs closed 4 months ago

namrathaurs commented 5 months ago

Fixes #371

As identified in the issue description, the cvmfs_helper_funcs.sh contains a utility has_unpriv_userns that can be used to fetch information whether unprivileged user namespaces are (1) supported and (2) enabled on the worker node. This utility internally uses the variables GWMS_IS_UNPRIV_USERNS_SUPPORTED and GWMS_IS_UNPRIV_USERNS_ENABLED. The utility returns one of four values:

It is this value that gets advertized to the glidein classad and can be accessed using HAS_UNPRIVILEGED_USER_NAMESPACES attribute.

As an example, if the worker node supports unprivileged user namespaces and has unprivileged user namespaces enabled, the glidein classad on the client should show:

[testuser@gwms-frontend ~]$ condor_status -l slot1@glidein_1649634_917375096@fermicloudxxx.fnal.gov | grep -i "namespaces"
HAS_UNPRIVILEGED_USER_NAMESPACES = "enabled"
HasUserNamespaces = true

Additionally, the same variable is also exported to the user job environment (with the same name HAS_UNPRIVILEGED_USER_NAMESPACES).