TestPartition is failing due to unknown node error

Description

some test cases of TestPartition are failing due to "unknown node" error in a manager call.

2017-10-25 21:45:53,168 INFO manager on x53-c6p6 as root: set node x53-c6p6.pbspro.com
{'partition': 'P1'}

2017-10-25 21:45:53,168 INFOCLI x53-c6p6: sudo -H -u root /opt/pbs/bin/qmgr -c set node x53-c6p6.pbspro.com partition=P1
2017-10-25 21:45:53,257 ERROR err: ['qmgr obj=x53-c6p6.pbspro.com svr=default: Unknown node ', 'qmgr: Error (15062) returned from server']

Traceback (most recent call last):
File "/home/pbsroot/TEST/tmp/tests/interfaces/pbs_partition.py", line 215, in test_partition_node_attr
self.partition_attr(obj_name="NODE")
File "/home/pbsroot/TEST/tmp/tests/interfaces/pbs_partition.py", line 112, in partition_attr
id=name, expect=True, runas=user)
File "/home/pbsroot/TEST/tmp/18.2.0.20171018010818/lib/python2.7/site-packages/ptl/lib/pbs_testlib.py", line 6433, in manager
post=self._disconnect, conn=c)

Analysis:
The host_name used in the test is populated by socket.gethostname() which returns the FQDN of host. Thus the id attribute in the self.manager call ends up having FQDN.
On x53 machine below are the steps I tried.
[pbsroot@x53-c6p6 interfaces]$ hostname -f
x53-c6p6.pbspro.com
[pbsroot@x53-c6p6 interfaces]$ qmgr
Max open servers: 49
Qmgr: set node x53-c6p6.pbspro.com state=down
qmgr obj=x53-c6p6.pbspro.com svr=default: Unknown node
qmgr: Error (15062) returned from server
Qmgr:
Therefore the test cases needs to be updated in such a way that should work for both shortname and FQDN.

Acceptance Criteria

None

Status

Assignee

Bhagat Singh Rajput

Reporter

anamika upadhyay

Severity

2-Medium

OS

None

Start Date

None

Pull Request URL

Story Points

1

Components

Priority

High