Node attribute validations are not happening through vnodedef configuration file

Description

1. Delete all nodes
[root@stblr3 MyScripts]# qmgr -c "d n @default"
2. Insert the following vnodedefs file.
[root@stblr3 MyScripts]# cat vnodedefs
$configversion 2
foo[1]: resources_available.mem = 512mb
foo[1]: resources_available.ncpus = 4
foo[1]: queue=q11111

foo[2]: resources_available.ncpus = 4
foo[2]: resources_available.mem = 512mb
foo[2]: queue=q22222

foo[3]: resources_available.ncpus = 4
foo[3]: resources_available.mem = 512mb
foo[3]: queue=q33333

3.
[root@stblr3 MyScripts]# pbs_mom -s insert vnodedef vnodedefs

4. [root@stblr3 MyScripts]# service pbs restart
Restarting PBS
Stopping PBS
Shutting server down with qterm.
PBS server - was pid: 102544
PBS mom - was pid: 102184
PBS sched - was pid: 102198
PBS comm - was pid: 102154
Waiting for shutdown to complete
Starting PBS
/opt/pbs/sbin/pbs_comm ready (pid=106059), Proxy Name:stblr3:17001, Threads:4
PBS comm
PBS mom
Creating usage database for fairshare.
PBS sched
Connecting to PBS dataservice....connected to PBS dataservice@stblr3
Licenses valid for 10000000 Floating hosts
PBS server

5. [root@stblr3 MyScripts]# qmgr -c "c n stblr3"

Observation: Ideally node should not accept queues which are not existing. Unfortunately nodes are assigned unknown queues when inserted through vnodedef file. Please look into the following snapshot.

[root@stblr3 MyScripts]# pbsnodes -av
stblr3
Mom = stblr3
Port = 15002
pbs_version = 17.1.0
ntype = PBS
state = free
pcpus = 8
resources_available.arch = linux
resources_available.host = stblr3
resources_available.mem = 7711044kb
resources_available.ncpus = 8
resources_available.vnode = stblr3
resources_assigned.accelerator_memory = 0kb
resources_assigned.mem = 0kb
resources_assigned.naccelerators = 0
resources_assigned.ncpus = 0
resources_assigned.vmem = 0kb
resv_enable = True
sharing = default_shared
in_multivnode_host = 1
license = l

foo[1]
Mom = stblr3
Port = 15002
pbs_version = 17.1.0
ntype = PBS
state = free
resources_available.arch = linux
resources_available.host = stblr3
resources_available.mem = 512mb
resources_available.ncpus = 4
resources_available.vnode = foo[1]
resources_assigned.accelerator_memory = 0kb
resources_assigned.mem = 0kb
resources_assigned.naccelerators = 0
resources_assigned.ncpus = 0
resources_assigned.vmem = 0kb
queue = q11111
resv_enable = True
sharing = default_shared
in_multivnode_host = 1
license = l

foo[2]
Mom = stblr3
Port = 15002
pbs_version = 17.1.0
ntype = PBS
state = free
resources_available.arch = linux
resources_available.host = stblr3
resources_available.mem = 512mb
resources_available.ncpus = 4
resources_available.vnode = foo[2]
resources_assigned.accelerator_memory = 0kb
resources_assigned.mem = 0kb
resources_assigned.naccelerators = 0
resources_assigned.ncpus = 0
resources_assigned.vmem = 0kb
queue = q22222
resv_enable = True
sharing = default_shared
in_multivnode_host = 1
license = l

foo[3]
Mom = stblr3
Port = 15002
pbs_version = 17.1.0
ntype = PBS
state = free
resources_available.arch = linux
resources_available.host = stblr3
resources_available.mem = 512mb
resources_available.ncpus = 4
resources_available.vnode = foo[3]
resources_assigned.accelerator_memory = 0kb
resources_assigned.mem = 0kb
resources_assigned.naccelerators = 0
resources_assigned.ncpus = 0
resources_assigned.vmem = 0kb
queue = q33333
resv_enable = True
sharing = default_shared
in_multivnode_host = 1
license = l

Snapshot of queues
[root@stblr3 MyScripts]# qmgr -c "l q @default"
Queue workq
queue_type = Execution
total_jobs = 0
state_count = Transit:0 Queued:0 Held:0 Waiting:0 Running:0 Exiting:0 Begun:0
enabled = True
started = True

Whereas validations are happening when tried through qmgr.
Example:
[root@stblr3 MyScripts]# qmgr -c "s n foo[3] queue=q33333"
qmgr obj=foo[3] svr=default: Unknown queue
qmgr: Error (15018) returned from server

server_logs console snippet
08/17/2017 13:40:00;0100;Server@stblr3;Req;;Type 0 request received from root@stblr3, sock=15
08/17/2017 13:40:00;0100;Server@stblr3;Req;;Type 49 request received from root@stblr3, sock=16
08/17/2017 13:40:00;0100;Server@stblr3;Req;;Type 9 request received from root@stblr3, sock=15
08/17/2017 13:40:02;0d80;Server@stblr3;TPP;handle_incoming_data(Thread 0);Increased scratch size for tfd=14 to 16384
08/17/2017 13:40:02;0002;Server@stblr3;Node;stblr3;update2 state:0 ncpus:8
08/17/2017 13:40:02;0002;Server@stblr3;Node;stblr3;Mom reporting 4 vnodes as of Thu Aug 17 13:39:15 2017
08/17/2017 13:40:02;0002;Server@stblr3;Node;stblr3;autocreated vnode foo[1]
08/17/2017 13:40:02;0002;Server@stblr3;Node;stblr3;autocreated vnode foo[2]
08/17/2017 13:40:02;0002;Server@stblr3;Node;stblr3;autocreated vnode foo[3]
08/17/2017 13:40:02;0002;Server@stblr3;Node;stblr3;node up

Acceptance Criteria

None

Status

Assignee

Unassigned

Reporter

Suresh Thelkar

Severity

3-High

OS

None

Start Date

None

Pull Request URL

None

Story Points

1

Components

Affects versions

18.1.1

Priority

High
Configure