Skip to content
Snippets Groups Projects

praefect: Check of the service readiness with RPC call

Merged Pavlo Strokov requested to merge ps-praefect-readiness-check into master
1 unresolved thread

For the praefect binary we have a sub-command to verify if praefect service can operate without issues. The verification process checks if migrations were applied, if gitaly nodes are reachable, if the clock synced, etc. This check can be done only when you have direct access to the binary. With introducing of ReadinessCheck RPC we now can run the same verification process mentioned above by issuing an RPC call. The new RPC will be part of the gitlab:gitaly:check task. It is noop for the gitaly service as of now.

Part of: gitlab#348174 (closed)

Once we release this change the next step would be to include invocation of it in the gitlab:gitaly:check task.

Edited by Pavlo Strokov

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • John Cai
  • John Cai
  • @8bitlife nice addition. Had a few suggestions/comments :ping_pong:

  • John Cai removed review request for @jcaigitlab

    removed review request for @jcaigitlab

  • Pavlo Strokov requested review from @jcaigitlab

    requested review from @jcaigitlab

  • John Cai
  • Pavlo Strokov added 213 commits

    added 213 commits

    Compare with previous version

  • Author Contributor

    How the response with failed checks looks like:

    {
      "failure_response": {
        "checks": [
          {
            "name": "gitaly node connectivity & disk access",
            "cause": "can't connect to node"
          },
          {
            "name": "clock synchronization",
            "cause": "praefect: clock is out"
          }
        ]
      },
      "result": "failure_response"
    }
  • John Cai
  • Pavlo Strokov added 3 commits

    added 3 commits

    • 037123c5 - proto: RPC to check service readiness
    • 29ae6928 - praefect: Move of the service checks
    • 3b408ee6 - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov requested review from @samihiltunen

    requested review from @samihiltunen

  • Author Contributor

    @samihiltunen could you please give a review here? Assigned you because you already know the context here.

  • Sami Hiltunen
  • Sami Hiltunen
  • Sami Hiltunen
  • Sami Hiltunen
  • @8bitlife looking good--not much more to add from @samihiltunen's feedback.

  • John Cai removed review request for @jcaigitlab

    removed review request for @jcaigitlab

  • Pavlo Strokov added 3 commits

    added 3 commits

    • 6e3d7c4f - proto: RPC to check service readiness
    • 0ee6bb60 - praefect: Move of the service checks
    • bf3d7b63 - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov mentioned in issue #4386

    mentioned in issue #4386

  • Pavlo Strokov added 1 commit

    added 1 commit

    • 18ce5906 - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov added 1 commit

    added 1 commit

    • 74236fa2 - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov added 64 commits

    added 64 commits

    • 74236fa2...17a3fc6c - 61 commits from branch master
    • 04bc67b6 - proto: RPC to check service readiness
    • e1d2b44a - praefect: Move of the service checks
    • d4b062d9 - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov added 1 commit

    added 1 commit

    • ef5d3389 - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov added 1 commit

    added 1 commit

    • ee753856 - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Sami Hiltunen
  • Sami Hiltunen
  • Sami Hiltunen
  • Sami Hiltunen
  • Sami Hiltunen
  • Sami Hiltunen removed review request for @samihiltunen

    removed review request for @samihiltunen

  • Pavlo Strokov added 1 commit

    added 1 commit

    • 13d942c1 - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov added 1 commit

    added 1 commit

    • 03549c62 - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov added 55 commits

    added 55 commits

    • 03549c62...333f0808 - 52 commits from branch master
    • 7730fa65 - proto: RPC to check service readiness
    • a572cbee - praefect: Move of the service checks
    • 6195cb5c - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov requested review from @samihiltunen

    requested review from @samihiltunen

  • Pavlo Strokov requested review from @jcaigitlab

    requested review from @jcaigitlab

    • Author Contributor
      Resolved by Pavlo Strokov

      OK, the issue is that we run tests as unprivileged user and it has no rights to use ports lower that 1024.
      I am trying to find a solution for that atm. But overall the code change is pretty much done so can be reviewed.

  • Pavlo Strokov added 1 commit

    added 1 commit

    • fc2343cc - .gitlab-ci: Run test as super user

    Compare with previous version

  • Pavlo Strokov added 1 commit

    added 1 commit

    • 0e627279 - .gitlab-ci: Run test as super-user

    Compare with previous version

  • John Cai
  • John Cai
  • John Cai
  • John Cai approved this merge request

    approved this merge request

  • @8bitlife a couple of nits. It's unfortunately the NTP client hardcoded the port...

  • John Cai removed review request for @jcaigitlab

    removed review request for @jcaigitlab

  • Pavlo Strokov added 5 commits

    added 5 commits

    • c848b6b3 - proto: RPC to check service readiness
    • 0a2f5550 - praefect: Move of the service checks
    • 3ef0b170 - praefect: Make runPraefectServer exportable
    • 6a8cb11d - praefect: Make readiness checks injectable
    • d03c651d - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov added 38 commits

    added 38 commits

    • d03c651d...31ea786f - 33 commits from branch master
    • d1d63496 - proto: RPC to check service readiness
    • 1b019586 - praefect: Move of the service checks
    • a0a0525f - praefect: Make runPraefectServer exportable
    • 94287b74 - praefect: Make readiness checks injectable
    • 6f55f8ae - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov added 1 commit

    added 1 commit

    • aa0ffccf - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov added 1 commit

    added 1 commit

    • 4012dfef - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov added 3 commits

    added 3 commits

    • 155539fe - praefect: Make runPraefectServer exportable
    • 9ecf0828 - praefect: Make readiness checks injectable
    • cfad4a6e - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Sami Hiltunen removed review request for @samihiltunen

    removed review request for @samihiltunen

  • Sami Hiltunen
  • Sami Hiltunen
  • Sami Hiltunen
    Sami Hiltunen @samihiltunen started a thread on an outdated change in commit cfad4a6e
  • 1 //go:build !gitaly_test_sha256
    • Is this needed? If not, we should remove it so we don't add more work for the sha256 migration accidentally. The tests seems to run fine with the build tag set and this tag removed.

      Edited by Sami Hiltunen
    • Author Contributor

      I think it is as the comment where the tag was added to all tests says that no tests should run.

    • @8bitlife The problem was that not all of the existing tests worked with SHA256 so the build tag was added to fix the tests package by package to support SHA256. We've since been updating the tests to support SHA256 and removing the build tag once that's. Since these tests work fine without the build tag, we shouldn't have it here. It adds extra work to the migration as we'll have to go through the package again to remove it and it allows for new tests to be a added in the files without SHA256 support.

      Maybe @toon can correct me here if I am mistaken.

    • Pavlo Strokov changed this line in version 23 of the diff

      changed this line in version 23 of the diff

    • @samihiltunen @8bitlife I'm sorry, but I should have added some documentation.

      Anyhow let me give you a brief summary. Normally we set up repos in test with SHA1 hashes. But over time we want to have Gitaly support SHA256 as well. Most tests won't work with that, so I've added build tag !gitaly_test_sha256 to those. If a test is able to run with SHA256 hashes, it should not have this tag. Over time we plan to have more and more tests that also work with SHA256.

      To run tests with SHA256 hashes, pass GITALY_TESTING_ENABLE_SHA256=1 to make test-go. There's also a CI job that will do that. This method should at least help us to not add more tests files that do not support SHA256 hashes.

      There's some context in #4307 (closed) and it's parent's epic.

    • Please register or sign in to reply
  • Sami Hiltunen
  • Pavlo Strokov added 5 commits

    added 5 commits

    • 6c066031 - proto: RPC to check service readiness
    • a19da4b1 - praefect: Move of the service checks
    • ef5adcc0 - praefect: Make runPraefectServer exportable
    • 468e12bc - praefect: Make readiness checks injectable
    • 714c0310 - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov requested review from @samihiltunen

    requested review from @samihiltunen

  • Pavlo Strokov added 5 commits

    added 5 commits

    • be875cbf - proto: RPC to check service readiness
    • cba676d9 - praefect: Move of the service checks
    • aa93a2bb - praefect: Make runPraefectServer exportable
    • bac3afd1 - praefect: Make readiness checks injectable
    • b34db136 - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Sami Hiltunen
  • Sami Hiltunen approved this merge request

    approved this merge request

  • Sami Hiltunen removed review request for @samihiltunen

    removed review request for @samihiltunen

  • Pavlo Strokov added 1 commit

    added 1 commit

    • 10dc304c - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov added 121 commits

    added 121 commits

    • 10dc304c...6bb5f696 - 116 commits from branch master
    • d0919136 - proto: RPC to check service readiness
    • f6459afe - praefect: Move of the service checks
    • 8d4ab55c - praefect: Make runPraefectServer exportable
    • 07c48fac - praefect: Make readiness checks injectable
    • 96af8f1c - praefect: Check of the service readiness with RPC call

    Compare with previous version

  • Pavlo Strokov resolved all threads

    resolved all threads

  • Pavlo Strokov added typefeature label and removed typemaintenance label

    added typefeature label and removed typemaintenance label

  • Pavlo Strokov started a merge train

    started a merge train

  • merged

  • Pavlo Strokov mentioned in commit 9765a973

    mentioned in commit 9765a973

  • added workflowstaging label and removed workflowcanary label

  • mentioned in commit gitlab@bd53f01a

  • mentioned in commit gitlab@5c13c713

  • Pavlo Strokov mentioned in merge request gitlab!95243 (merged)

    mentioned in merge request gitlab!95243 (merged)

  • mentioned in commit gitlab@de07bb1f

  • mentioned in commit gitlab@aaeca080

  • mentioned in commit gitlab@d4b5e11a

  • mentioned in commit gitlab@e74c60a7

  • mentioned in commit gitlab@fce4c200

  • mentioned in commit gitlab@00ece26d

  • mentioned in commit gitlab@a93b4ffb

  • mentioned in commit gitlab@919c57f4

  • mentioned in commit gitlab@5923d4d2

  • mentioned in merge request gitlab!100629 (merged)

  • mentioned in issue #4598 (closed)

  • Please register or sign in to reply
    Loading