Function "set_sched_config" doesn't throw error when validation of sched_config fails

Description

  • Function "set_sched_config" doesn't throw error when sched_config validation fails

  • In one the tests we are setting value of max_starve attribute to a invalid value(lets say 10). the function "set_sched_config" should fail the tests as it is able to get the following message "Error reading Line" in sched_logs

Test-logs:
2018-01-18 04:07:30,480 INFO scheduler pbspro-master: config {'max_starve': '10'}
2018-01-18 04:07:30,481 INFOCLI2 pbspro-master: sudo -H /opt/tools/wrappers/cp -p /var/spool/pbs/sched_priv/sched_config /var/spool/pbs/sched_priv/sched_config.bak
2018-01-18 04:07:30,496 DEBUG out: []
2018-01-18 04:07:30,496 DEBUG err: []
2018-01-18 04:07:30,496 DEBUG rc: 0
2018-01-18 04:07:30,496 INFOCLI2 pbspro-master: sudo -H /opt/tools/wrappers/cp -p /tmp/PtlPbsHwJdLO /var/spool/pbs/sched_priv/sched_config
2018-01-18 04:07:30,510 DEBUG out: []
2018-01-18 04:07:30,511 DEBUG err: []
2018-01-18 04:07:30,511 DEBUG rc: 0
2018-01-18 04:07:30,511 INFOCLI2 pbspro-master: sudo -H /opt/tools/wrappers/chmod 0644 /var/spool/pbs/sched_priv/sched_config
2018-01-18 04:07:30,524 DEBUG out: []
2018-01-18 04:07:30,525 DEBUG err: []
2018-01-18 04:07:30,525 DEBUG rc: 0
2018-01-18 04:07:30,525 INFOCLI2 pbspro-master: sudo -H /opt/tools/wrappers/chown root /var/spool/pbs/sched_priv/sched_config
2018-01-18 04:07:30,539 DEBUG out: []
2018-01-18 04:07:30,539 DEBUG err: []
2018-01-18 04:07:30,539 DEBUG rc: 0
2018-01-18 04:07:30,540 INFOCLI2 pbspro-master: sudo -H /opt/tools/wrappers/chgrp root /var/spool/pbs/sched_priv/sched_config
2018-01-18 04:07:30,553 DEBUG out: []
2018-01-18 04:07:30,553 DEBUG err: []
2018-01-18 04:07:30,553 DEBUG rc: 0
2018-01-18 04:07:30,553 DEBUG scheduler pbspro-master: updated configuration
2018-01-18 04:07:30,554 INFO scheduler pbspro-master: sent signal -HUP
2018-01-18 04:07:30,554 INFOCLI2 pbspro-master: sudo -H kill -HUP 5650
2018-01-18 04:07:30,571 DEBUG out: []
2018-01-18 04:07:30,571 DEBUG err: []
2018-01-18 04:07:30,572 DEBUG rc: 0
2018-01-18 04:07:30,573 INFO scheduler pbspro-master log match: searching for "Sched;reconfigure;Scheduler is reconfiguring" - No match
2018-01-18 04:07:31,128 INFO scheduler pbspro-master log match: searching for "Sched;reconfigure;Scheduler is reconfiguring"... OK
2018-01-18 04:07:31,128 INFO scheduler pbspro-master log match: searching for "Error reading line"... OK

  • Code snippet:
    if apply:
    try:
    self.apply_config(validate=validate)
    except PbsSchedConfigError:
    for k in confs:
    del self.sched_config[k]
    self.apply_config(validate=validate)
    return True

Acceptance Criteria

None

Status

Assignee

Unassigned

Reporter

zulekha mahalty

Severity

None

OS

None

Start Date

None

Pull Request URL

None

Story Points

1

Components

Affects versions

18.1.0

Priority

High
Configure