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

NSFS | NC | Health script | distinguish between temporary and persistent errors #7733

Merged
merged 1 commit into from
Jan 18, 2024
Merged

NSFS | NC | Health script | distinguish between temporary and persistent errors #7733

merged 1 commit into from
Jan 18, 2024

Conversation

naveenpaul1
Copy link
Contributor

Explain the changes

  1. Heath script updated with error_type and for temporary errors multiple retries are added
  2. Health issue with missing accounts and buckets folder in the config root path
  3. Rsyslog start-up error fixed by removing unwanted default value configuration in noobaa_rsyslog.config

Issues: Fixed #xxx / Gap #xxx

  1. NSFS | NC | Health script | distinguish between temporary and persistent errors & retries addition #7714
  2. health command is returning empty and the return code is 2  #7730

Testing Instructions:

  1. run the health script and verify the health response structure similar to below
  "service_name": "nsfs",
  "status": "NOTOK",
  "memory": "88.6M",
  "error": {
    "error_code": "RSYSLOG_SERVICE_FAILED",
    "error_message": "RSYSLOG service is not started properly, Please verify the service with status command."
  },
  "checks": {
    "services": [
      {
        "name": "nsfs",
        "service_status": "active",
        "pid": "1204",
        "error_type": "PERSISTENCE"
      },
      {
        "name": "rsyslog",
        "service_status": "inactive",
        "pid": "0",
        "error_type": "PERSISTENCE"
      }
    ],
    "endpoint": {
      "endpoint_state": {
        "response": {
          "response_code": 200,
          "response_message": "Endpoint running successfuly."
        },
        "total_fork_count": 1,
        "running_workers": [
          "1"
        ]
      },
      "error_type": "TEMPORARY"
    },
    "accounts_status": {
      "invalid_accounts": [
        {
          "name": "naveen",
          "storage_path": "/tmp/nsfs_root_invalid/",
          "code": "STORAGE_NOT_EXIST"
        }
      ],
      "valid_accounts": [
        {
          "name": "naveen",
          "storage_path": "/tmp/nsfs_root"
        }
      ],
      "error_type": "PERSISTENCE"
    },
    "buckets_status": {
      "invalid_buckets": [
        {
          "name": "bucket1.json",
          "config_path": "/etc/noobaa.conf.d/buckets/bucket1.json",
          "code": "INVALID_CONFIG"
        },
        {
          "name": "bucket3",
          "storage_path": "/tmp/nsfs_root/bucket3",
          "code": "STORAGE_NOT_EXIST"
        }
      ],
      "valid_buckets": [
        {
          "name": "bucket2",
          "storage_path": "/tmp/nsfs_root/bucket2"
        }
      ],
      "error_type": "PERSISTENCE"
    }
  }
} ```

- [X] Doc added/updated
- [X] Tests added

docs/non_containerized_NSFS.md Outdated Show resolved Hide resolved
src/cmd/health.js Show resolved Hide resolved
src/cmd/health.js Outdated Show resolved Hide resolved
@naveenpaul1 naveenpaul1 requested a review from romayalon January 18, 2024 13:07
…ent errors

Signed-off-by: naveenpaul1 <napaul@redhat.com>
@naveenpaul1 naveenpaul1 merged commit 313a081 into noobaa:master Jan 18, 2024
9 checks passed
@ps20renar
Copy link

Is it possible to enhance these check also to add additional syslog services like syslogng instead rsyslog only?

@romayalon
Copy link
Contributor

@naveenpaul1 see the last comment, can we do it?

@naveenpaul1
Copy link
Contributor Author

@romayalon @ps20renar yes, can do a similar check depending on the user input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants