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

Where is CommandFailed defined? #119

Open
elelayan opened this issue Nov 26, 2024 · 0 comments
Open

Where is CommandFailed defined? #119

elelayan opened this issue Nov 26, 2024 · 0 comments

Comments

@elelayan
Copy link

Hi,
sorry for the newbie question.
I'm trying to use osc-systemstatus to show my slurm cluster.

I get a undefined constant error unless I defined CommandFailed myself at the beginning of lib/slurm_squeue_client.rb.

Is it normal?

Error:

App 98471 output: error occured uninitialized constant SlurmSqueueClient::CommandFailed
App 98471 output: 
App 98471 output:     s.success? ? @sinfo = o : raise(CommandFailed, e)
App 98471 output:                                     ^^^^^^^^^^^^^:uninitialized constant SlurmSqueueClient::CommandFailed
App 98471 output: 
App 98471 output:     s.success? ? @sinfo = o : raise(CommandFailed, e)
App 98471 output:                                     ^^^^^^^^^^^^^
App 98471 output: /var/www/ood/apps/sys/systemstatus/lib/slurm_squeue_client.rb:85:in `sinfo'
App 98471 output: /var/www/ood/apps/sys/systemstatus/lib/slurm_squeue_client.rb:176:in `cluster_info'
App 98471 output: /var/www/ood/apps/sys/systemstatus/lib/slurm_squeue_client.rb:200:in `setup'
App 98471 output: /var/www/ood/apps/sys/systemstatus/app.rb:105:in `block (2 levels) in <top (required)>'

Fix:

diff --git a/lib/slurm_squeue_client.rb b/lib/slurm_squeue_client.rb
index a902236..7b154ce 100644
--- a/lib/slurm_squeue_client.rb
+++ b/lib/slurm_squeue_client.rb
@@ -1,3 +1,6 @@
+class CommandFailed < StandardError
+end
+
 class SlurmSqueueClient
@elelayan elelayan changed the title Where is CommandFailed defined Where is CommandFailed defined? Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant