Commit Graph

210 Commits

Author SHA1 Message Date
GitLab Bot 51ad17b411 Add latest changes from gitlab-org/gitlab@master 2023-11-22 15:11:39 +00:00
GitLab Bot 64f7eb2b37 Add latest changes from gitlab-org/gitlab@master 2021-02-05 12:09:31 +00:00
GitLab Bot 0f8c2334f0 Add latest changes from gitlab-org/gitlab@master 2020-01-23 06:08:32 +00:00
Michael Kozono 6855e6b586 Extract system check rake task logic
These changes make the code more reusable, testable, and most
importantly, overrideable.
2018-12-03 13:51:46 -08:00
Zeger-Jan van de Weg 358fefc777
Migrate storage checks to Gitaly
Most of these checks are not valuable in the current setup, thus removed
and replaced by Gitaly checking if its read and writeable.

Depends on:
1. https://gitlab.com/gitlab-org/gitaly/merge_requests/675
2018-11-09 09:15:42 +01:00
Alejandro Rodríguez 098c722542 Add gitlab:gitaly:check task for Gitaly health check
Also, since Gitaly now takes care of checking for storage paths
existence/accessibility, we can remove those check from the
gitlab:gitlab_shell_check task and advance further into 0 direct disk
approach on gitlab-rails
2018-10-23 20:11:10 -03:00
Zeger-Jan van de Weg 4600265e00
Remove gitlab:user:check_repos task
While reviewing this branch it was noted that this task was broken.
Given the limited value this task brings, and given the fact that much
of the old behaviour has been moved to be automatically fixed, removing
was a good option.

Suggestion in:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20806#note_91261001
2018-07-31 14:31:51 +02:00
Zeger-Jan van de Weg f1f7bfc06f
Remove git rake tasks
These tasks are happening through housekeeping right now, by default
ever 10th push. This removes the need for these tasks.

Side note, this removes one of my first contributions to GitLab, as back
than I introduced these tasks through: 54e6c0045b

Closes https://gitlab.com/gitlab-org/gitaly/issues/768
2018-07-31 14:31:50 +02:00
Jacob Vosmaer f376347f24 Find and mark more Git disk access locations, part 2 2018-06-12 14:33:37 +02:00
Zeger-Jan van de Weg ec4423665c
Gitlab::Shell works on shard name, not path
Direct disk access is done through Gitaly now, so the legacy path was
deprecated. This path was used in Gitlab::Shell however. This required
the refactoring in this commit.

Added is the removal of direct path access on the project model, as that
lookup wasn't needed anymore is most cases.

Closes https://gitlab.com/gitlab-org/gitaly/issues/1111
2018-04-25 13:36:22 +02:00
Jacob Vosmaer 008a6a6ce6 Route path lookups through legacy_disk_path 2018-03-21 18:18:32 +01:00
Horatiu Eugen Vlad 1ad5df49b1 Moved o_auth/saml/ldap modules under gitlab/auth 2018-02-28 16:53:02 +01:00
Lin Jen-Shin 8e87ecbf30 Eliminate the warnings from task helpers 2018-01-26 19:42:48 +08:00
Ben Bodenmiller cd54479406 typo fix 2018-01-18 09:26:03 +00:00
🙈 jacopo beschi 🙉 729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
James Lopez 6ee122c04e deprecate check integrity task 2018-01-04 11:22:43 +01:00
Gabriel Mazetto 2c489f8289 Refactor on namespace and repository checks and added specs 2017-09-12 06:57:22 +02:00
Gabriel Mazetto cc28abeafd Detect orphaned repositories and namespaces in any storage 2017-09-12 04:06:00 +02:00
Sean McGivern 446c7fc6f1 Merge branch 'system-checks-incoming-email' into 'master'
Move Incoming Email checks to System Checks

See merge request !14028
2017-09-06 09:02:47 +00:00
Nick Thomas 48115be509 Add a system check for the git user's custom SSH configuration 2017-09-04 18:16:31 +01:00
Gabriel Mazetto 71000b394b Refactored Incoming Email checks to use SystemCheck library 2017-09-04 04:25:58 +02:00
Lin Jen-Shin e26acdb11b Just extend main, rather than include to Kernel
Unfortunately rake doesn't have nested context,
everything just runs on a main rake object.
This is probably due to compatibility issue,
but anyway, we could just extend the object.
2017-08-08 22:20:16 +08:00
Gabriel Mazetto fb06a4d8fe Rename more path_with_namespace -> full_path or disk_path 2017-08-01 07:28:13 +02:00
Douwe Maan f1e4376fb9 Don't check if MailRoom is running on Omnibus 2017-06-09 10:58:11 -05:00
Gabriel Mazetto 3f187751d4 Fixed and improved some existing checks and SystemCheck library 2017-05-31 14:33:03 +02:00
Gabriel Mazetto 27e632758f Add ActiveUsers Check 2017-05-31 14:33:03 +02:00
Gabriel Mazetto 13e88c9395 Refactor gitlab:app:checks to use SystemCheck 2017-05-31 14:33:03 +02:00
Gabriel Mazetto 500e5227a0 WIP SystemCheck library for executing checks from a rake task 2017-05-31 14:33:03 +02:00
Rémy Coutable 755325c827 Fix the `gitlab:gitlab_shell:check` task
Make the `gitlab:gitlab_shell:check` task check that the repositories storage
path are owned by the `root` group

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-12 17:40:19 +02:00
Sebastian Reitenbach d8569440b5 There might be ps utilities out there, that assume 80chars instead
of unlimited width if they cannot detect terminal size, therefore
force unlimited terminal size when checking processes via ps.
2017-03-28 23:15:17 +02:00
Alejandro Rodríguez 0b9d56f960 Update storage settings to allow extra values per shard
This will be necessary when adding gitaly settings. This version
doesn't make any functional changes, but allows us to include this
breaking change in 9.0 and add the needed extra settings in the future
with backwards compatibility
2017-03-03 12:13:30 -03:00
Douwe Maan 87c9df29ce Don’t exclude some file in lib from rubocop 2017-02-23 09:32:42 -06:00
Gabriel Mazetto 649a1fcf15 Fix incomming email check task to use same patch we did in mail_room 2017-02-21 18:50:28 +01:00
Drew Blessing dc30783057 Introduce better credential and error checking to `rake gitlab:ldap:check`
It was previously possible for invalid credential errors to go unnoticed
in this task. Users would believe everything was configured correctly and
then sign in would fail with 'invalid credentials'. This adds a specific
bind check, plus catches errors connecting to the server. Also, specs :)
2016-11-08 15:46:10 -06:00
Achilleas Pipinellis dffd33252f Move reply by email docs to a new location
[ci skip]
2016-09-25 11:55:14 +02:00
bogdanvlviv 96ebc8c4f7 Use `File::exist?` instead of `File::exists?`
Since version ruby-2.2.0, method `File::exists?` is deprecated.
2016-08-11 13:54:45 +03:00
Robert Speicher 12e93d6f4b Rename `run` task helper method to prevent conflict with StateMachine
This prevents the following message from appearing whenever running a
Rake task:

    Instance method "run" is already defined in Object, use generic
    helper instead or set StateMachines::Machine.ignore_method_conflicts
    = true.
2016-08-09 18:31:51 -05:00
M. Ricketts 6d324f082e Use limit parameter rather than hardcoded value 2016-07-20 16:37:40 +02:00
Alejandro Rodríguez 86359ec854 Refactor repository paths handling to allow multiple git mount points 2016-06-29 22:30:31 -04:00
Connor Shea 903946c78a
Replace colorize gem with rainbow.
Colorize is a gem licensed under the GPLv2, so we can’t use it in GitLab without relicensing GitLab under the terms of the GPL. Rainbow is licensed under the MIT license and does the exact same thing as Colorize, so Rainbow was added in place of Colorize.

The syntax is slightly different for Rainbow vs. Colorize, and was updated in accordance.

The gem is still a dependency of Spinach, so it’s included in the development/test environments, but won’t be packaged with the actual product, and therefore doesn’t require we relicense the product.

An attempt at relicensing Colorize was made, but didn’t succeed as the library owner never responded.

Rainbow library: https://github.com/sickill/rainbow
Relevant issue regarding licensing in GitLab's gems: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3775
2016-06-03 10:37:09 -06:00
Jazz 8eb1748ab2 Fixed advice on invalid permissions on upload path 2016-05-19 16:53:47 +02:00
Rémy Coutable 9f218fc184 Improve and finish the fallback to the In-Reply-To and References header for the reply-by-email feature
A few things to note:
- The IncomingEmail feature is now enabled even without a
  correctly-formatted sub-address
- Message-ID for new thread mail are kept the same so that subsequent
  notifications to this thread are grouped in the thread by the email
  service that receives the notification
  (i.e. In-Reply-To of the answer == Message-ID of the first thread message)
- To maximize our chance to be able to retrieve the reply key, we look
  for it in the In-Reply-To header and the References header
- The pattern for the fallback reply message id is "reply-[key]@[gitlab_host]"
- Improve docs thanks to Axil
2016-03-25 13:05:15 +01:00
Douwe Maan 7ae573c75a Bump Git version requirement to 2.7.3 2016-03-15 23:22:05 +01:00
Douwe Maan e1baa48584 Fix `gitlab:incoming_email:check` task. 2016-02-29 11:04:40 +01:00
Marin Jankovski f317d5fcb9 Merge branch 'uploads-700' into 'master'
Restrict permissions on public/uploads

Based on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/631

See merge request !2764
2016-02-23 15:12:20 +00:00
Achilleas Pipinellis e5f9c4460f Remove remaining sqlite method call 2016-02-17 20:34:54 +02:00
Achilleas Pipinellis f8036ec910 Remove sqlite check in raketask 2016-02-10 16:54:15 +02:00
Achilleas Pipinellis a1a6f3cc73 Simplify permissions creation
[ci skip]
2016-02-10 16:52:02 +02:00
Achilleas Pipinellis 751ae14081 Restrict permissions on public/uploads 2016-02-09 11:35:19 +02:00
Stan Hu e57b506222 Suggest prefacing find command with sudo when base permissions are wrong
Closes #5872
2016-01-05 05:30:01 -08:00