Skip to content

Commit

Permalink
Merge pull request #6 from ystia/bugfix/BRBDCF-1127-slurm-trim-null-c…
Browse files Browse the repository at this point in the history
…haracters

Trimming null characters
  • Loading branch information
loicalbertin committed Mar 7, 2018
2 parents ebb484c + 5d8ae66 commit 728adcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prov/slurm/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ func (e *defaultExecutor) createNodeAllocation(ctx context.Context, kv *api.KV,
if len(split) != 2 {
return errors.New("Malformed command : " + squeueCmd)
}
slurmNodeName := strings.Trim(split[0], "\" \t\n")
slurmPartition := strings.Trim(split[1], "\" \t\n")
slurmNodeName := strings.Trim(split[0], "\" \t\n\x00")
slurmPartition := strings.Trim(split[1], "\" \t\n\x00")

err = deployments.SetInstanceCapabilityAttribute(deploymentID, nodeName, nodeAlloc.instanceName, "endpoint", "ip_address", slurmNodeName)
if err != nil {
Expand Down

0 comments on commit 728adcd

Please sign in to comment.