Locmap fails for type(landb-responsible)==user && type(landb-mainuser)==egroup
Hi Linux Team,
We spotted a following problem with one of the machines created in OpenStack using the latest CC7 image when running locmap --configure all
[root@bgi-vm-cc7-test ~]# locmap --configure all
[INFO] Configuring all enabled modules.
Traceback (most recent call last):
File "/usr/bin/locmap", line 341, in <module>
main()
File "/usr/bin/locmap", line 258, in main
imported_module.deploy()
File "/usr/lib/python2.7/site-packages/locmap/modules/afs.py", line 59, in deploy
node, suser, k5user, respuser, mainuser = hiera_config.node_info(hostname)
File "/usr/lib/python2.7/site-packages/locmap/hierawrite.py", line 168, in node_info
mainuser = config.mainuser
AttributeError: XldapClient instance has no attribute 'mainuser'
Here info from LanDB about this box
Responsible for the device:
SANDBERG HAMPUS BE BI
Main User of the device:
BE-BI-BGI E-GROUP BE BI
Manager of the device:
AI-OPENSTACK-ADMIN E-GROUP IT CM
And bellow short debugging session directly in python, directly indicating where does the problem come from
>>> import locmap.xldapclient
>>> config = locmap.xldapclient.XldapClient()
>>> config.cn("BGI-VM-CC7-TEST")
>>> dir(config)
['__doc__', '__init__', '__module__', 'baseDN', 'cern_egroups_expansion', 'cn', 'connection', 'manager_egroup_users', 'manager_node', 'mapdevice', 'node', 'respuser', 'rootforward', 'searchScope', 'server', 'sshkeys']
>>> config.node
'user'
>>> config.respuser
'hsandber'
>>> config.mainuser
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: XldapClient instance has no attribute 'mainuser'
>>> config.respuser
'hsandber'
>>> config.respuser
'hsandber'
>>> config.manager_egroup_users
['hsandber', 'jshackle', 'jstorey', 'slevasse']
>>> config.manager_node
'egroup'