Commit Graph

20 Commits

Author SHA1 Message Date
Chad Austin
850999df92 handle mounts with device type starting with edenfs:
Summary:
We intend to rename the edenfs device type to include a colon (and
possibly the backing repo basename). In preparation, update code that
detects edenfs mounts to include anything that starts with "edenfs:".

Reviewed By: genevievehelsel

Differential Revision: D23520008

fbshipit-source-id: 280f7617d5c96e23d548041b3482bca388076a7b
2020-09-11 13:35:03 -07:00
Genevieve Helsel
89791f6b89 mock kerberos checks in doctor tests
Summary: These tests fail locally since adding these checks in eden doctor, so we need to mock them.

Reviewed By: chadaustin

Differential Revision: D23326597

fbshipit-source-id: 87a0e6ab0472e3ae56f89503e928c5a00a16ab04
2020-08-31 07:51:17 -07:00
Xavier Deguillard
4f9e1750c2 cli: enable doctor on Windows
Summary:
Most of the fixes are pretty trivial as the code was using functions not
present on Windows, either work around them, or switch to ones that are
multi-platform.

Of note, it looks like `hg doctor` doesn't properly detect when Mercurial and
EdenFS are out of sync, disabling the  tests until we figure out why.

Reviewed By: genevievehelsel, fanzeyi

Differential Revision: D23409708

fbshipit-source-id: 3314c197d43364dda13891a6874caab4c29e76ca
2020-08-28 19:49:37 -07:00
Genevieve Helsel
7c5ebb67bf check kerberos certificate issues in eden doctor
Summary: Often users run into kerberos certificate issues, which in turn causes permissions issues with mercurial and eden. This issue is not obvious while users are running hg commands, so `eden doctor` should identity this issue and tell the user about it. `hg doctor` runs `eden doctor`, so this should also show itself if a user runs `hg doctor`.

Reviewed By: wez

Differential Revision: D22825882

fbshipit-source-id: 5f51901934862336b0ebc2996da6e1168ea8d8a3
2020-08-05 12:48:30 -07:00
generatedunixname89002005307016
6527db2809 suppress errors in eden - batch 1
Reviewed By: pradeep90

Differential Revision: D22628389

fbshipit-source-id: c109334243a92269a7fb9a9b0515565ac22ecfac
2020-07-20 13:29:51 -07:00
Genevieve Helsel
da7b453306 fix AssertionError if a checkout is in the middle of a merge
Summary:
An assertion error is raised if `eden doctor` is in the middle of a merge. This is because we enter a specific "if" condition in the case that mercurial has two parent commits, and EdenFS only ever tracks `p0`, so EdenFS simply sets `p1` to the null commit in `_select_new_parents()`. Specifically, this is in the case in which both `_old_dirstate_parents` and `_old_snapshot` are not None.

Because `_old_dirstate_parents` has `p1` set to nonnull, and Eden thinks it is null , the check `self._new_parents != self._old_dirstate_parents` would be `True` even though there was actually no error.

Reviewed By: chadaustin

Differential Revision: D22048525

fbshipit-source-id: 9a19cc092e2bd80db0e01fb38533a1007640bee6
2020-06-30 13:58:21 -07:00
Genevieve Helsel
f799ca8981 suggest graceful restart in eden doctor version check
Summary: I've updated most messages to suggest a graceful restart, but I overlooked this instance and we got a user question about this. So lets update this message here as well.

Reviewed By: chadaustin

Differential Revision: D21681035

fbshipit-source-id: 32bf5e75b9ad1d98bcd70427101aabeee0be5046
2020-05-21 09:38:58 -07:00
Genevieve Helsel
12c5a2d221 doctor - fixup redirections
Summary: `eden doctor` should probably fix misconfigured redirections. this is mostly copy pasted from the `eden redirect fixup` command.

Reviewed By: wez

Differential Revision: D21487225

fbshipit-source-id: 69e7fcb446cbc42966cabb6d80ab716533da50a9
2020-05-11 22:13:06 -07:00
Jessica Gomes
50022171c9 add uptime field to DaemonInfo
Summary:
- Added uptime field to DaemonInfo thrift struct
- Created startTime member variable in EdenServer
- Made appropriate refactoring changes to EdenMain and EdenServer
- Changed main.py and util.py to use the new uptime value

Reviewed By: genevievehelsel

Differential Revision: D21471140

fbshipit-source-id: 8868de667dfb95de93e3e71b90c0412fb3825388
2020-05-11 11:42:15 -07:00
Chad Austin
c4db2f39a9 remove some internal uses of the term 'client'
Summary:
Our use of the term "client" to refer to a checkout is
deprecated. Rename some internal functions that use the term client.

Reviewed By: simpkins

Differential Revision: D21395159

fbshipit-source-id: fa96ba593f53b493e5ae816fa686f333a132c232
2020-05-07 22:08:10 -07:00
Shannon Zhu
83dc7b9129 Custom pyre upgrade for eden
Summary:
Addressing issues simpkins brought up on D21207287 when we upgraded and introduced some pyre bugs.

Temporarily upgrading just this project, once we resolve some sandcastle capacity issues we'll release this via another global upgrade in fbcode.

Reviewed By: simpkins

Differential Revision: D21316793

fbshipit-source-id: f0c79f53d97f7182e7d8fe6e081c58ef53ce0c9a
2020-05-04 21:19:20 -07:00
Shannon Zhu
0b93429dc1 Convert type check targets in eden to use configuration
Summary:
D21316793 is blocked from landing because there are a few targets in eden that are running pyre via buck targets integration.

We can't do custom version overrides for projects that are using a mix of local configurations and buck integration, because buck doesn't provide an interface for setting the equivalent pyre version override.

We're moving away from buck targets integration for pyre across the board, and I've run a codemod over the project to clean up all of the buck typing integration (including some residual mypy) as well as updated type ignores / fixmes accordingly.

Let me know if you have any concerns; upon skimming it looks like most changes are either converting `type: ignore`s into fixmes, or removing `type: ignores`.

Reviewed By: dkgi

Differential Revision: D21343093

fbshipit-source-id: 5ee1436377eb526c0a679fb821c42e07cbca52a5
2020-05-02 21:16:55 -07:00
Shannon Zhu
6ec7546cab Update pyre version for eden
Summary: Automatic upgrade to remove `version` override and silence errors.

Reviewed By: grievejia

Differential Revision: D21207287

fbshipit-source-id: ab82cf81690cb847bd130ff3448345f5a0ea19af
2020-04-23 12:09:39 -07:00
Adam Simpkins
a26b8e9930 update edenfsctl to report the compile-time version
Summary:
Update most locations in edenfsctl to report the version number that was built
into the edenfsctl binary at build time, rather than querying the RPM database
for the installed RPM version.  The RPM behavior only works on to RedHat-based
Linux systems, and the currently running process doesn't necessarily have to
have come from the RPM.

The one place where we do still attempt to print the RPM version is in the
`edenfsctl rage` report, when running on Linux.

Reviewed By: wez

Differential Revision: D21000168

fbshipit-source-id: 0fb747e71b6950d74f22c458efa0dfcbd45270bd
2020-04-22 12:48:48 -07:00
Adam Simpkins
baeac18ef3 add a --current-edenfs-only flag to edenfsctl doctor
Summary:
Add a command line argument to `edenfsctl doctor` to cause it to only report
problems with the current EdenFS instance, and to skip checks for system-wide
problems or other running EdenFS processes.

This does refactor a fair amount of the top-level doctor logic to encapsulate
most of the state into an `EdenDoctor` class.

This also updates the integration tests to use this flag when invoking
`edenfsctl doctor`.  Previously the integration tests could spuriously fail
due to other pre-existing problems on the system, or due to other EdenFS
instances that are currently being started or shut down by other tests running
in parallel.

Reviewed By: wez

Differential Revision: D20357521

fbshipit-source-id: 36640cc21e7bd79fbd300c4d2c7dbba127ec9170
2020-04-10 13:48:11 -07:00
Adam Simpkins
34275429fe remove all CLI code dealing with the old legacy bind-mounts config
Summary:
The bind-mounts configuration has been ignored by EdenFS since D17236366.
This removes all CLI code for dealing with this config section.

Reviewed By: wez

Differential Revision: D20876460

fbshipit-source-id: 6b3f3552de25ee28fc0418a6aaec14446520203c
2020-04-09 17:31:03 -07:00
Adam Simpkins
dbbb0d64c8 rename the ProcessFinder class to ProcUtils
Summary:
This renames the `ProcessFinder` class to `ProcUtils`, in preparation for
adding some more generic process management utilities into this class.

This class was originally just used for finding stale processes in
`edenfsctl doctor`.  However, it seems like a good place to consolidate all
platform-specific process querying logic.  We are currently need
platform-specific querying to tell if specific process IDs are still running
for `edenfsctl status` and `edenfsctl stop`, and we also already have some
Windows-specific spawning logic in `edenfsctl start`.  I plan to move all of
that logic into this `proc_utils.py` module.

This renames `ProcessFinder` to `ProcUtils` just to better reflect its
expanded purpose.

Reviewed By: genevievehelsel

Differential Revision: D20833243

fbshipit-source-id: 8d33460b7468d877bc327e855af5c620ac5b80a7
2020-04-03 16:52:33 -07:00
Adam Simpkins
97f0ab8b6c update LinuxProcessFinder find the eden directory from the lock file
Summary:
Update the LinuxProcessFinder code to ignore the command line arguments when
looking for the state directory, and instead only look at the open file
descriptors.

The path found from the command line arguments could be incorrect: if the
EdenFS state directory had been deleted or renamed the information extracted
from the command line would be incorrect.

The information found by examining the open file descriptors will point to the
new directory location if the state directory has been renamed.  We can also
tell if the lock file had been deleted in this case as well.  This adds
another field to the `EdenFSProcess` class to indicate if the lock file is no
longer valid.

Reviewed By: wez

Differential Revision: D20638621

fbshipit-source-id: e9db1390f97baf50ad3246de4a964eaaf92622e7
2020-03-27 12:22:44 -07:00
Ratnadeep Joshi
9ce47b3031 Move eden.cli namespace to eden.fs.cli
Summary: [edenfs] Move eden.cli namespace to eden.fs.cli

Reviewed By: simpkins

Differential Revision: D20520952

fbshipit-source-id: 182793867404dcb0753363282640f8fd4d2ff496
2020-03-25 11:46:56 -07:00
Ratnadeep Joshi
6447950e1a Move cli/ directory from eden/ to eden/fs (Without changing namespace)
Summary:
[edenfs] Move cli/ directory from eden/ to eden/fs (Without changing
namespace)

Reviewed By: simpkins

Differential Revision: D20505093

fbshipit-source-id: 1975afac2ca1cd70ca407dde485c97254f4cc1e9
2020-03-25 11:18:30 -07:00