In singularity containers the user name and UID should be the same inside as outside.
However, in k8s pods, the UID is defined as part of the pod YAML spec. It can be any arbitrary UID (but may need to match a certain range to comply with pod security policy on clusters.) And the user name is equally arbitrary and meaningless as the UID, so generally it is left out to avoid redundancy.
Anyway in order to add full container support and be able to run in k8s (and to some extent Docker as well), applications should not strictly require running with a named user account. There is only an arbitrary UID:
bash-4.2$ whoami
whoami: cannot find name for user ID 10000
bash-4.2$ id
uid=10000 gid=10000 groups=10000,1000
---- Ready to run pilot ----
2020-12-16 21:35:50,110 [wrapper] ==== pilot stdout BEGIN ====
2020-12-16 21:35:50,122 [wrapper] pilotpid: 3345
2020-12-16 21:35:53,016 | INFO | MainThread | pilot.util.auxiliary | pilot_version_banner | ****************************************
2020-12-16 21:35:53,016 | INFO | MainThread | pilot.util.auxiliary | pilot_version_banner | *** PanDA Pilot version 2.9.3 (10) ***
2020-12-16 21:35:53,016 | INFO | MainThread | pilot.util.auxiliary | pilot_version_banner | ****************************************
2020-12-16 21:35:53,016 | INFO | MainThread | pilot.util.auxiliary | pilot_version_banner |
2020-12-16 21:35:53,016 | INFO | MainThread | pilot.util.auxiliary | pilot_version_banner | pilot is running in a VM
2020-12-16 21:35:53,016 | INFO | MainThread | pilot.util.auxiliary | display_architecture_info | architecture information:
2020-12-16 21:35:53,184 | INFO | MainThread | pilot.util.auxiliary | display_architecture_info |
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.8.2003 (Core)
Release: 7.8.2003
Codename: Core
2020-12-16 21:35:53,185 | INFO | MainThread | pilot.util.auxiliary | pilot_version_banner | ****************************************
2020-12-16 21:35:53,216 | DEBUG | MainThread | pilot.util.https | https_setup | User-Agent: pilot/2.9.3 (10) (Python 2.7.5; Linux x86_64)
2020-12-16 21:35:53,218 | WARNING | MainThread | pilot.util.https | https_setup | Python version <2.7.9 lacks SSL contexts -- falling back to curl
2020-12-16 21:35:53,235 | WARNING | MainThread | pilot.info.dataloader | load_url_data | cache file=/pilotdir/PanDA_Pilot2_3345_1608154553/queuedata.json is not available: [Errno 2] No such file or directory: '/pilotdir/PanDA_Pilot2_3345_1608154553/queuedata.json' .. skipped
2020-12-16 21:35:53,235 | INFO | MainThread | pilot.info.dataloader | load_url_data | [attempt=1/3] loading data from url=http://pandaserver.cern.ch:25085/cache/schedconfig/CA-VICTORIA-K8S-TEST-T2.all.json
2020-12-16 21:35:53,605 | INFO | MainThread | pilot.info.dataloader | load_url_data | saved data from "http://pandaserver.cern.ch:25085/cache/schedconfig/CA-VICTORIA-K8S-TEST-T2.all.json" resource into file=/pilotdir/PanDA_Pilot2_3345_1608154553/queuedata.json, length=3.6Kb
2020-12-16 21:35:53,605 | WARNING | MainThread | pilot.info.dataloader | load_url_data | cache file=/pilotdir/PanDA_Pilot2_3345_1608154553/cric_pandaqueues.json is not available: [Errno 2] No such file or directory: '/pilotdir/PanDA_Pilot2_3345_1608154553/cric_pandaqueues.json' .. skipped
2020-12-16 21:35:53,606 | INFO | MainThread | pilot.info.dataloader | load_url_data | [attempt=1/1] loading data from file=/cvmfs/atlas.cern.ch/repo/sw/local/etc/cric_pandaqueues.json
2020-12-16 21:35:54,188 | INFO | MainThread | pilot.info.dataloader | load_url_data | saved data from "/cvmfs/atlas.cern.ch/repo/sw/local/etc/cric_pandaqueues.json" resource into file=/pilotdir/PanDA_Pilot2_3345_1608154553/agis_schedconf.cvmfs.json, length=1184.0Kb
2020-12-16 21:35:54,236 | INFO | MainThread | pilot.info.configinfo | resolve_queuedata | queuedata: following keys will be overwritten by config values: {'maxwdir_broken': '14336 MB', 'es_stageout_gap': 601}
2020-12-16 21:35:54,237 | DEBUG | MainThread | pilot.info.queuedata | __init__ | Final parsed QueueData content:
acopytools={u'pr': [u'rucio', u'xrdcp'], u'write_lan': [u'rucio'], u'read_lan': [u'rucio', u'xrdcp'], u'pw': [u'rucio']}
acopytools_schemas={}
allow_lan=True
allow_wan=False
appdir=
aprotocols=None
astorages={u'pr': [u'CA-VICTORIA-WESTGRID-T2_DATADISK', u'CA-VICTORIA-WESTGRID-T2_LOCALGROUPDISK', u'CA-VICTORIA-WESTGRID-T2_SCRATCHDISK'], u'es_events': [u'CERN-PROD_ES'], u'read_lan': [u'CA-VICTORIA-WESTGRID-T2_DATADISK', u'CA-VICTORIA-WESTGRID-T2_LOCALGROUPDISK', u'CA-VICTORIA-WESTGRID-T2_SCRATCHDISK'], u'pw': [u'CA-VICTORIA-WESTGRID-T2_DATADISK', u'CA-VICTORIA-WESTGRID-T2_LOCALGROUPDISK', u'CA-VICTORIA-WESTGRID-T2_SCRATCHDISK'], u'write_lan': [u'CA-VICTORIA-WESTGRID-T2_DATADISK', u'CA-VICTORIA-WESTGRID-T2_LOCALGROUPDISK', u'CA-VICTORIA-WESTGRID-T2_SCRATCHDISK']}
catchall=
container_options=
container_type={}
copytools={u'xrdcp': {u'setup': u'$VO_ATLAS_SW_DIR/local/xrootdsetup.sh'}, u'rucio': {u'setup': u''}}
corecount=8
direct_access_lan=False
direct_access_wan=False
es_stageout_gap=7200
is_cvmfs=True
maxinputsize=20000
maxrss=32000
maxtime=86400
maxwdir=150000
name=CA-VICTORIA-K8S-TEST-T2
platform=
pledgedcpu=0
resource=CA-VICTORIA-K8S-TEST-T2
site=CA-VICTORIA-WESTGRID-T2
state=ACTIVE
status=test
timefloor=3600
type=production
use_pcache=False
2020-12-16 21:35:54,241 | WARNING | MainThread | pilot.info.dataloader | load_url_data | cache file=/pilotdir/PanDA_Pilot2_3345_1608154553/cric_ddmendpoints.json is not available: [Errno 2] No such file or directory: '/pilotdir/PanDA_Pilot2_3345_1608154553/cric_ddmendpoints.json' .. skipped
2020-12-16 21:35:54,241 | INFO | MainThread | pilot.info.dataloader | load_url_data | [attempt=1/1] loading data from file=/cvmfs/atlas.cern.ch/repo/sw/local/etc/cric_ddmendpoints.json
2020-12-16 21:35:54,274 | INFO | MainThread | pilot.info.dataloader | load_url_data | saved data from "/cvmfs/atlas.cern.ch/repo/sw/local/etc/cric_ddmendpoints.json" resource into file=/pilotdir/PanDA_Pilot2_3345_1608154553/cric_ddmendpoints.json, length=2186.6Kb
2020-12-16 21:35:54,379 | INFO | MainThread | __main__ | main | pilot arguments: Namespace(abort_job=<threading._Event object at 0x7f7455668510>, allow_other_country=False, allow_same_user=False, cacert=None, capath=None, cleanup=True, country_group='', debug=True, graceful_stop=<threading._Event object at 0x7f7455668450>, harvester=False, harvester_datadir='', harvester_eventstatusdump='', harvester_submitmode='PULL', harvester_workdir='', harvester_workerattributes='', hpc_mode='manytoone', hpc_resource='', input_dir='', job_aborted=<threading._Event object at 0x7f7455668550>, job_label='managed', job_status={}, jobtype='', kill_time=0, lifetime=324000, mainworkdir='/pilotdir/PanDA_Pilot2_3345_1608154553', nopilotlog=False, output_dir='', pilot_user='ATLAS', port=25443, queue='CA-VICTORIA-K8S-TEST-T2', queuedata_url='', resource=None, resource_type='SCORE_HIMEM', retrieve_next_job=True, signal=None, signal_counter=0, site=None, sourcedir='/pilotdir/atlas_6uTEAmt0', timing={'1': {'PILOT_MULTIJOB_START_TIME': 1608154553.015654}, '0': {'PILOT_START_TIME': 1608154553.015652}}, update_server=True, url='https://pandaserver.cern.ch', use_https=True, verify_proxy=False, version_tag='PR', workdir='/pilotdir', workflow='generic', working_group='')
Traceback (most recent call last):
File "pilot2/pilot.py", line 557, in <module>
trace = main()
File "pilot2/pilot.py", line 85, in main
workflow = __import__('pilot.workflow.%s' % args.workflow, globals(), locals(), [args.workflow], 0) # Python 3, -1 -> 0
File "/pilotdir/atlas_6uTEAmt0/pilot2/pilot/workflow/generic.py", line 32, in <module>
from pilot.control import job, payload, data, monitor
File "/pilotdir/atlas_6uTEAmt0/pilot2/pilot/control/monitor.py", line 131, in <module>
def get_process_info(cmd, user=getuser(), args='aufx', pid=None):
File "/usr/lib64/python2.7/getpass.py", line 158, in getuser
return pwd.getpwuid(os.getuid())[0]
KeyError: 'getpwuid(): uid not found: 10000'
2020-12-16 21:35:54,662 [wrapper] ==== pilot stdout END ====
2020-12-16 21:35:54,673 [wrapper] ==== wrapper stdout RESUME ====
2020-12-16 21:35:54,685 [wrapper] Pilot exit status: 1
-u userlist Select by effective user ID (EUID) or name.
This selects the processes whose effective user name or ID is in userlist. The effective user ID describes the user whose file
access permissions are used by the process (see geteuid(2)). Identical to U and --user.