Skip to content

Commit

Permalink
upgrade class for 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom committed Sep 18, 2024
1 parent c56f2bc commit ee29c9f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 30 deletions.
16 changes: 0 additions & 16 deletions class.osc.edu/apps/dashboard/initializers/k8s_core.rb

This file was deleted.

30 changes: 16 additions & 14 deletions class.osc.edu/apps/dashboard/initializers/stats2480.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
def add_paths
OodFilesApp.candidate_favorite_paths.tap do |paths|
# add project space directories
projects = User.new.groups.map(&:name).grep(/^P./)
paths.concat projects.map { |p| Pathname.new("/fs/project/#{p}") }
Rails.application.config.after_initialize do
def add_paths
OodFilesApp.candidate_favorite_paths.tap do |paths|
# add project space directories
projects = User.new.groups.map(&:name).grep(/^P./)
paths.concat projects.map { |p| Pathname.new("/fs/project/#{p}") }

# add scratch space directories
paths << Pathname.new("/fs/scratch/#{User.new.name}")
paths.concat projects.map { |p| Pathname.new("/fs/scratch/#{p}") }
# add scratch space directories
paths << Pathname.new("/fs/scratch/#{User.new.name}")
paths.concat projects.map { |p| Pathname.new("/fs/scratch/#{p}") }

# add ess scratch and project directories
paths.concat projects.map { |p| Pathname.new("/fs/ess/scratch/#{p}") }
paths.concat projects.map { |p| Pathname.new("/fs/ess/#{p}") }
# add ess scratch and project directories
paths.concat projects.map { |p| Pathname.new("/fs/ess/scratch/#{p}") }
paths.concat projects.map { |p| Pathname.new("/fs/ess/#{p}") }
end
end
end

fs_outage = `grep node_file_test_failure /var/lib/node_exporter/textfile_collector/autofs-file-test.prom | grep -q ' 1'; echo $?`
add_paths if fs_outage.chomp == "1" && !File.exist?('/etc/ood/config/gpfs_outage')
fs_outage = `grep node_file_test_failure /var/lib/node_exporter/textfile_collector/autofs-file-test.prom | grep -q ' 1'; echo $?`
add_paths if fs_outage.chomp == "1" && !File.exist?('/etc/ood/config/gpfs_outage')
end

0 comments on commit ee29c9f

Please sign in to comment.