single or double quote in job env value, and the quote is not the last character in the value, causes qsub -V to lose env variable value as well as other variables when execjob_launch hook is present

Description

[root@centos7 tmp]# qstat -Bf | grep version
pbs_version = 14.2.1.20170124052131
[root@centos7 tmp]# qmgr -c "p h"
#

  1. Create hooks and set their properties.
    #
    #

  2. Create and define hook t
    #
    create hook t
    set hook t type = site
    set hook t enabled = true
    set hook t event = execjob_launch
    set hook t user = pbsadmin
    set hook t alarm = 30
    set hook t order = 1
    set hook t debug = false
    set hook t fail_action = none
    import hook t application/x-python base64 -
    aW1wb3J0IG9zCmltcG9ydCBwYnMKcGlkID0gb3MuZ2V0cHBpZCgpCnBicy5ldmVudCgpLmFjY2VwdCgpCgo=

import hook t application/x-config base64 -

[user1@centos7 ~]$ export hello="hi, how are you 'doing"

[user1@centos7 ~]$ qsub -I -V
qsub: waiting for job 494.centos7 to start
qsub: job 494.centos7 ready

[user1@centos7 ~]$ echo $hello

[user1@centos7 ~]$ logout

qsub: job 494.centos7 completed

[root@centos7 tmp]# qmgr -c "s h t enabled=f"

[user1@centos7 ~]$ qsub -I -V
qsub: waiting for job 495.centos7 to start
qsub: job 495.centos7 ready

[user1@centos7 ~]$ echo $hello
hi, how are you 'doing
[user1@centos7 ~]$ logout

qsub: job 495.centos7 completed

The comma is not critical, and these also cause the same problem (to be expected):

export hello=hi\ how\ are\ you\ \"doing

export hello='hi how are you "doing'

Acceptance Criteria

None

Status

Assignee

Al Bayucan

Reporter

Scott Campbell

Severity

3-High

OS

None

Start Date

None

Pull Request URL

Story Points

1

Components

Fix versions

Priority

Critical
Configure