Module: SystemCheck

Defined in:
lib/system_check.rb,
lib/system_check/helpers.rb,
lib/system_check/base_check.rb,
lib/system_check/ldap_check.rb,
lib/system_check/gitaly_check.rb,
lib/system_check/sidekiq_check.rb,
lib/system_check/simple_executor.rb,
lib/system_check/gitlab_shell_check.rb,
lib/system_check/rake_task/app_task.rb,
lib/system_check/rake_task/ldap_task.rb,
lib/system_check/app/git_config_check.rb,
lib/system_check/incoming_email_check.rb,
lib/system_check/app/git_version_check.rb,
lib/system_check/rake_task/gitaly_task.rb,
lib/system_check/rake_task/gitlab_task.rb,
lib/system_check/app/active_users_check.rb,
lib/system_check/app/log_writable_check.rb,
lib/system_check/app/ruby_version_check.rb,
lib/system_check/app/tmp_writable_check.rb,
lib/system_check/rake_task/orphans_task.rb,
lib/system_check/rake_task/sidekiq_task.rb,
lib/system_check/app/redis_version_check.rb,
lib/system_check/orphans/namespace_check.rb,
lib/system_check/orphans/repository_check.rb,
lib/system_check/app/migrations_are_up_check.rb,
lib/system_check/rake_task/gitlab_shell_task.rb,
lib/system_check/rake_task/rake_task_helpers.rb,
lib/system_check/app/init_script_exists_check.rb,
lib/system_check/rake_task/incoming_email_task.rb,
lib/system_check/app/gitlab_config_exists_check.rb,
lib/system_check/app/database_config_exists_check.rb,
lib/system_check/app/hashed_storage_enabled_check.rb,
lib/system_check/app/init_script_up_to_date_check.rb,
lib/system_check/app/orphaned_group_members_check.rb,
lib/system_check/rake_task/orphans/namespace_task.rb,
lib/system_check/app/projects_have_namespace_check.rb,
lib/system_check/app/uploads_path_permission_check.rb,
lib/system_check/rake_task/orphans/repository_task.rb,
lib/system_check/app/gitlab_config_up_to_date_check.rb,
lib/system_check/app/uploads_directory_exists_check.rb,
lib/system_check/app/authorized_keys_permission_check.rb,
lib/system_check/app/git_user_default_ssh_config_check.rb,
lib/system_check/app/hashed_storage_all_projects_check.rb,
lib/system_check/app/uploads_path_tmp_permission_check.rb,
lib/system_check/incoming_email/initd_configured_check.rb,
lib/system_check/incoming_email/mail_room_running_check.rb,
lib/system_check/incoming_email/imap_authentication_check.rb

Overview

Library to perform System Checks

Every Check is implemented as its own class inherited from SystemCheck::BaseCheck Execution coordination and boilerplate output is done by the SystemCheck::SimpleExecutor

This structure decouples checks from Rake tasks and facilitates unit-testing

Defined Under Namespace

Modules: App, Helpers, IncomingEmail, Orphans, RakeTask Classes: BaseCheck, GitalyCheck, GitlabShellCheck, IncomingEmailCheck, LdapCheck, SidekiqCheck, SimpleExecutor

Class Method Summary collapse

Class Method Details

.run(component, checks = []) ⇒ Object

Executes a bunch of checks for specified component

Parameters:

  • component (String)

    name of the component relative to the checks being executed

  • checks (Array<BaseCheck>) (defaults to: [])

    classes of corresponding checks to be executed in the same order


14
15
16
17
18
19
20
21
22
# File 'lib/system_check.rb', line 14

def self.run(component, checks = [])
  executor = SimpleExecutor.new(component)

  checks.each do |check|
    executor << check
  end

  executor.execute
end