Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xdmod-update-resource-specs: fix resources file name #1085

Merged
merged 1 commit into from
Oct 2, 2019
Merged

xdmod-update-resource-specs: fix resources file name #1085

merged 1 commit into from
Oct 2, 2019

Conversation

kcgthb
Copy link
Contributor

@kcgthb kcgthb commented Oct 2, 2019

Description

The resource file name referenced in xdmod-update-resource-specs does not match the real file name.
The script references a resource-specs.json while the actual file name is resource_specs.json (underscore _ vs. dash -).

Motivation and Context

Running the current script results in the following error

# xdmod-update-resource-specs -r cluster --node-count 1000 --cpu-count 20000
PHP Warning:  file_get_contents(/etc/xdmod/resource-specs.json): failed to open stream: No such file or directory in /usr/share/xdmod/classes/CCR/Json.php on line 26
2019-10-02 09:33:17 [critical] Failed to read file '/etc/xdmod/resource-specs.json' (stacktrace: #0 /usr/bin/xdmod-update-resource-specs(168): CCR\Json::loadFile('/etc/xdmod/reso...')
#1 /usr/bin/xdmod-update-resource-specs(18): main()
#2 {main})

Tests performed

With the change, the script doesn't fail and the resource file is updated correctly.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project as found in the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Contributor

@smgallo smgallo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for catching this.

@smgallo smgallo merged commit 3b53b1e into ubccr:xdmod8.5 Oct 2, 2019
@kcgthb kcgthb deleted the resource_specs branch October 2, 2019 17:17
@plessbd plessbd added bug Bugfixes Category:General General labels Oct 16, 2019
@plessbd plessbd added this to the 8.5.0 milestone Oct 16, 2019
@plessbd plessbd changed the title xdmod-update-resource-specs: fix resources file name xdmod-update-resource-specs: fix resources file name Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugfixes Category:General General
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants