Commit Graph

2057 Commits

Author SHA1 Message Date
Wez Furlong
605665368f eden: windows: use globFiles to power prefetch
Summary:
Now that we have globFiles available via thrift on windows,
we can use it to implement eden prefetch on windows, rather than the
significantly slower `hg prefetch`.

Reviewed By: pkaush

Differential Revision: D20781187

fbshipit-source-id: f6cd37a2a504d07f03be2695a69a72ddf7a62593
2020-04-24 15:57:27 -07:00
Wez Furlong
fc2abaec02 eden: add stattimes helpers for win32
Summary:
Add variants of the helpers that return by value rather
than by reference so that we can use those on Windows (which
doesn't embed a `timespec` in a `struct stat`).

Reviewed By: simpkins

Differential Revision: D20562242

fbshipit-source-id: e4769fccb40229765bbf99d0967708cc864db6c3
2020-04-24 15:57:27 -07:00
Wez Furlong
15f27eae3f eden: enable globFiles on windows
Summary:
This enables globFiles for Windows, with some
minor tweaks around dtype to enable the build and make
the results consistent between watchman and eden.

Reviewed By: chadaustin

Differential Revision: D20536715

fbshipit-source-id: b1c8184dc664910e4d052a21b4cd993ddfaadf25
2020-04-24 15:57:27 -07:00
Wez Furlong
2b3f085bd8 eden: thrift enable basic journal APIs on Windows.
Summary:
This is ostensibly removing and ifndef to enable watchman
to successfully query the journal.

However, for this to work we need to teach the mountPoints list about
normalizing file names.

We avoid using realpath on posix systems because we absolutely cannot afford to
make VFS calls back to ourselves.  I don't know if the same applies on Windows.
If not then perhaps the right thing to do here is to use something like
GetFinalPathNameW to canonicalize the paths.

For now, this does the dumb thing and lowercases and converts slashes.

With this change, watchman is able to subscribe to eden and query
journal information.

However, since most queries get translated to glob requests it
still isn't useful; need to enable globFiles in a follow up diff.

Reviewed By: pkaush

Differential Revision: D20516737

fbshipit-source-id: 2053d7b565a40f6ae9cc738386e37d737772e91e
2020-04-24 15:57:26 -07:00
Puneet Kaushik
139717db04 Add DiffTest to CMake build
Summary: This diff ports DiffTest on Windows and enables them for the CMake builds.

Reviewed By: simpkins

Differential Revision: D20480869

fbshipit-source-id: 77eda5ef53e4cd19552f0da52de4ff53d9807cc3
2020-04-24 14:57:43 -07:00
Puneet Kaushik
db6ac0136e Add InodeBaseTest and TreeInodeTest to CMake build
Summary: This diff adds readdir tests for Windows and enables InodeBaseTest and TreeInodeTest for CMake build.

Reviewed By: simpkins

Differential Revision: D20480866

fbshipit-source-id: 44fb33448c2e6cdb3ecce08136bf8b9e1d5c398a
2020-04-24 14:57:43 -07:00
Puneet Kaushik
2fc667fc2a Add InodeMapTest to CMake build
Summary: This diff make the InodeMapTest work on Windows and enables this test on all the platforms for CMake build.

Reviewed By: wez

Differential Revision: D20480865

fbshipit-source-id: 8f13f88bb3655475c635c889851e39672ce5b9c7
2020-04-24 14:57:43 -07:00
Adam Simpkins
cadcd0ab39 enable building the integration helper tools in the CMake build
Summary:
Enable building fake_edenfs.cpp and TakeoverTool.cpp in the CMake build.

This includes a few changes to get `fake_edenfs.cpp` closer to building on
Windows, but at the moment it still does not fully build since the
`StartupLogger` is currently not compiled on Windows.

TakeoverTool.cpp is specific to the graceful restart tests, and doesn't make
sense to ever build on Windows.

Reviewed By: wez

Differential Revision: D21214614

fbshipit-source-id: a7a8306ea3f69579fa02bd3753a66d3095ea004a
2020-04-24 14:48:05 -07:00
Puneet Kaushik
be9628b2bc Enable hg update on Eden Windows
Summary: This diff enables running source control update and rebase operations on Eden Windows clones.

Reviewed By: wez

Differential Revision: D20480873

fbshipit-source-id: 9e7cd6acdd9aedc87ddfe126718f48509d1d7c4f
2020-04-24 12:46:19 -07:00
Puneet Kaushik
4fb5762206 Clean up prjfs cache on update
Reviewed By: wez

Differential Revision: D20480872

fbshipit-source-id: ec006be468e231de3292466bfcc0df8292341fc5
2020-04-24 12:46:19 -07:00
Puneet Kaushik
258e5ed5b2 Update the PathMap::find to do a case insensitive search on Windows
Reviewed By: simpkins

Differential Revision: D20480874

fbshipit-source-id: 65cde4dba13c49663562c96cbaa23270712c1348
2020-04-24 12:46:19 -07:00
Puneet Kaushik
33631031d7 Enable hg status on Eden Windows
Reviewed By: simpkins

Differential Revision: D20480863

fbshipit-source-id: 01289bd02d0fd1f447c18484c29324450125aeeb
2020-04-24 12:46:19 -07:00
Puneet Kaushik
2cc0d4385c Update EdenDispatcher to use Inode backed fs data on Windows
Summary:
This diff updates the EdenDispatcher to fetch/update the FS info in EdenMount which is backed by InodeTree. This helps to store the FS state in the Inode structure, which are used for source control status and update operations.

Also added a custom formatter definition for RelativePathPiece to make it easy to log relative paths.

Reviewed By: simpkins

Differential Revision: D20480861

fbshipit-source-id: b4bf1da3eeebeaee46a4a187eea9193302182068
2020-04-24 12:46:18 -07:00
Puneet Kaushik
542a7bfc46 Add APIs to remove cached files and tombstones from ProjectedFS cache
Reviewed By: simpkins

Differential Revision: D20480880

fbshipit-source-id: b185c179340d369c2479ac6fcafd0373fa01135d
2020-04-24 12:46:18 -07:00
Puneet Kaushik
16bd8c5baf Use getFileContent() on Windows
Reviewed By: simpkins

Differential Revision: D20995872

fbshipit-source-id: ab089a4a94eac4844d173397f24c1cdbb2d06205
2020-04-24 12:46:18 -07:00
Puneet Kaushik
70eab1fb4d Use hg.real to import contents
Summary: On Windows we are seeing frequent hang issues while using telemetry hg binary. Switching to using the hg.real for all the platforms.

Reviewed By: simpkins

Differential Revision: D20480875

fbshipit-source-id: 82892da7f8d46f2413442c37251243400180f9db
2020-04-24 12:46:17 -07:00
Puneet Kaushik
74bc023b18 Remove old EdenMount code
Summary: Eden Windows now shares the common EdenMount code. We can remove the unused version of EdenMount.

Reviewed By: simpkins

Differential Revision: D20993231

fbshipit-source-id: 943ee540c5f2aa30827afb73658cb0250143e4af
2020-04-24 12:46:17 -07:00
Puneet Kaushik
4f3b625825 Build the merged TestMounts on Windows
Summary: Now we are building the merged EdenMount on Windows, so we can also start using the new TestMount code.

Reviewed By: simpkins

Differential Revision: D20966556

fbshipit-source-id: a726b13250d6c29872349e1a2f562c719420f3f1
2020-04-24 12:46:17 -07:00
Puneet Kaushik
133e5faa7c Switch to new EdenMount
Summary:
This diff enabled building the Inodes code on the Windows platform. With this we also swtich to using the new merged version of EdenMount.
From this diff onwards Eden Windows works with Inodes.

Reviewed By: simpkins

Differential Revision: D20955997

fbshipit-source-id: 9b9d8bf56c352c98a3018e5bb389e35489ebd6fb
2020-04-24 08:33:27 -07:00
Puneet Kaushik
d2c6eaff04 Remove old version of Windows TestMounts
Summary: We have merged the Windows version of test mount to the POSIX, which now work across platform. We can remove the older version now.

Reviewed By: simpkins

Differential Revision: D20955565

fbshipit-source-id: c68eef961d27e822e6408eba06876a4034e8f3d2
2020-04-24 08:33:27 -07:00
Puneet Kaushik
19200e2e41 Remove the Windows old mount/test
Summary: These tests were designed to work with registry based implementation to store the status information. We need to remove them before we could swtich to the new Inode based merged EdenMount.

Reviewed By: simpkins

Differential Revision: D20951974

fbshipit-source-id: fa9438e157ddfb4a66ba2b1de11c1b634481d3b3
2020-04-24 08:33:26 -07:00
Puneet Kaushik
b310e9cba3 Close the inherited handle from the parent process
Summary: Close the Pipe handles that are inherited in the child and are not needed in the parent process. This will also make sure the pipe is closed when the child process ends.

Reviewed By: simpkins

Differential Revision: D20923588

fbshipit-source-id: aa58e99148d2f5c3bf666a3237266eac725be563
2020-04-24 08:33:26 -07:00
Puneet Kaushik
69aaf55c2d Update EdenMount to handle FS operations on Windows
Summary: These API will handle the file system requests for each mount.

Reviewed By: simpkins

Differential Revision: D20480868

fbshipit-source-id: 84149af4449d258149fce97bb227d45d8d3d0e3a
2020-04-24 08:33:26 -07:00
Puneet Kaushik
9a2c23cfcf Implement readdir for ProjectedFS requests
Summary: Adds a new version of readdir which populates FileMetadata. This version of readdir is used to return the result to Projected FS.

Reviewed By: wez

Differential Revision: D20480876

fbshipit-source-id: dae99753225bc3124e734e3926e777fb629b2a64
2020-04-24 08:33:25 -07:00
Xavier Deguillard
603ee0b21d fix typo in NOT_IMPLEMENTED
Reviewed By: wez

Differential Revision: D21193220

fbshipit-source-id: a47ca951fa13d69be7f99b7b3c1a705a8cf420c6
2020-04-23 14:00:23 -07:00
Puneet Kaushik
d7edef56a5 Remove CurrentState from EdenDispatcher
Summary:
The new merged EdenMount uses the sqlite overlay to track the status. Removing the calls to CurrentStatus from EdenMount.

This change is required here before we can switch to the merged EdenMount. Later in this stack we will add calls to the Inode APIs to report the FS changes.

Reviewed By: simpkins

Differential Revision: D20895074

fbshipit-source-id: 5e04684203f5735ff9068d3609b256991d1569f4
2020-04-23 12:41:48 -07:00
Puneet Kaushik
ca84d255e8 Merge Windows and POSIX version of TestMounts
Summary: This diff is merging the Windows version of MountTest with the POSIX version. The merged MountTest is build and tested later in this stack with the Merged EdenMount.

Reviewed By: simpkins

Differential Revision: D20480864

fbshipit-source-id: 65e9402f1b03c81166835a6a605053a1bf011ddc
2020-04-23 12:41:48 -07:00
Puneet Kaushik
d366d86e61 Merge Windows and POSIX version of EdenMount
Summary: The diff merge the Windows version of EdenMount into POSIX version. We don't start using the new all platform version of EdenMount in this diff. This switch needs few more changes and is done later in this diff stack.

Reviewed By: simpkins

Differential Revision: D20480878

fbshipit-source-id: 42bfaee8769beb7a2ac45cfcff5dda2a52a7dcb0
2020-04-23 12:41:47 -07:00
Puneet Kaushik
b2cb66890b Add readdir to Eden Windows
Summary: This diff implements DirList for Windows and use it for readdir implemetation. On Windows readdir will return all the entries in one single call.

Reviewed By: simpkins

Differential Revision: D20480871

fbshipit-source-id: 15abb337c55c5016debeb0680a1a3a7063b341c3
2020-04-23 12:41:47 -07:00
Puneet Kaushik
38299c2d3a Sqlite Overlay for Inode support on Windows
Summary:
This diff introduces a sqlite based overlay, which stores the directory inode and its entries in the sqlite database. This is similar to FsOverlay but doesn't support all the functionality. Sqlite overlay in this diff is only designed to handles the requirement for Eden on Windows.

We did not build sqlite overlay as a virtual class because as of this diff the interface and functionality of this is different from fsOverlay.

Reviewed By: simpkins

Differential Revision: D20480870

fbshipit-source-id: c87cb2ffd11c6c0c7a10bc8dfaf6164e0e442b2b
2020-04-23 12:41:47 -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
Katie Mancini
37c264f457 make FUSE metrics more efficient
Summary:
Tl;DR Reduces costs of fuse request mertics by reducing lock contention.

D20922194 adds tracking for FUSE request metrics, this makes tracking those
metrics more efficient.  Since every user request goes through the FUSE channel,
we want to reduce the cost of these metrics as much  as possible (originally
mentioned in a comment D20922194).

The synchronization used to track the metrics is costly especially
when the lock is contended.

To reduce the cost, each FuseChannel will have a thread local copy of metrics.
Each will still be synchronized to allow for reading the metrics and for
Requests moved to other threads that will need to access the metrics. However,
the lock should be contended less often since only requests from a single fuse
channel thread will access it.

Reviewed By: chadaustin

Differential Revision: D21043792

fbshipit-source-id: ce58a0cbce334095976233bfac7578d39c81bb55
2020-04-23 10:46:16 -07:00
Adam Simpkins
72f6ada7c2 add a new EdenTestCaseBase class
Summary:
This adds a new `EdenTestCaseBase` class to serve as the base class across a
number of our integration tests and some of our CLI tests.

The main goal of this is to allow eliminating many of the annoying `*Mixin`
classes used in a lot of our integration tests.  These mixin classes are
annoying since they result in complicated multiple inheritance, and it can be
tricky to ensure that the method resolution order behaves the way you want.
The systemd tests in particular use a lot of mixins, which gets complicated.
These mixin classes are also awkward from a Python typing perspective, and the
systemd tests end up resorting to just declaring different APIs in several
places when `typing.TYPE_CHECKING` is True.

The fact that `EdenTestCaseBase` has a `contextlib.ExitStack` member variable
should make it easier for us to eliminate these mixins moving forward: rather
than using mixins that use inheritance and assume a `self.cleanUp()` method
exists, we can transition this code to standalone functions or context
managers, and they can take the `ExitStack` variable as an argument if
necessary.

Reviewed By: wez

Differential Revision: D21084097

fbshipit-source-id: 77ee457b7debe6f584f630e3e30f79fe634a2026
2020-04-22 15:02:41 -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
883a1e924f expose build version information via thrift
Summary: Update the DefaultEdenMain logic to expose build version information.

Reviewed By: wez

Differential Revision: D21000166

fbshipit-source-id: 3729df83a69dce0be20e6dfe6b4f19fa67cd602f
2020-04-22 12:48:47 -07:00
Adam Simpkins
c07261c5ca update build configuration information for Python and C++
Summary:
This updates the top-level CMakeLists.txt file to compute package version
information, and expose this to C++ code in `eden-config.h`, and to Python
code in a new `eden/config.py` module.

Previously we exposed an `EDEN_VERSION` macro for the C++ code in
`eden-config.h`, but this was not initialized or used anywhere.  Now the
top-level CMakeLists.txt file computes appropriate version information and
exposes the package name, version, release, commit ID, and build time in these
configuration files.

The version selection logic in CMakeLists.txt based largely on the code that
wez wrote for watchman in D20636833.

Reviewed By: wez

Differential Revision: D21000164

fbshipit-source-id: db1a1035f1eefec058bbad558d35e113005e454e
2020-04-22 12:48:47 -07:00
Katie Mancini
d850667e19 expose live FUSE requests
Summary:
This exposes metrics for the live FUSE requests (the duration
of the longest outstanding request and the number of outstanding
requests).

Because FUSE is the interface through which the user mostly interacts
with the file system they provide good metrics to judge if the perfomance
of eden is normal, or there may be an issue.

Exposing these counters this way will send them to ods, so it will not only
allow for debuging current issues, but can be used to look back at previous
problems. This data could also be used for alerting or more proactive
remediation.

Metrics are exposed per checkout to allow seeing which checkout was
having issues. This data will aggregated in `eden top` to be used as
an overall health indicator, but should more information be needed it
will be logged in ods.

Reviewed By: chadaustin

Differential Revision: D20922194

fbshipit-source-id: 16208883417acb77b62bf712cfdd9068c5420303
2020-04-22 12:33:34 -07:00
Adam Simpkins
2f114e25e7 build the fuse privhelper unit tests in CMake-based builds
Summary:
Build and run the fuse privhelper unit tests, as well as the `drop_privs`
helper program used by some of the integration tests.

Reviewed By: wez

Differential Revision: D21004425

fbshipit-source-id: 650e0729909f4753095e19fba4f01c02d516713b
2020-04-21 17:33:31 -07:00
Xavier Deguillard
f156d818ec StatusTest: pass listIgnored properly
Summary:
The listIgnored argument is not used anywhere, so this won't fix anything,
but this caught my eye while looking at the code.

Reviewed By: fanzeyi

Differential Revision: D21147432

fbshipit-source-id: e696d926fe0999da14c8c5748a0951b229c20efb
2020-04-21 11:50:56 -07:00
Xavier Deguillard
d105d03a5f StatusTest: enable some tests
Summary: These appear to be passing on my laptop, let's enable them.

Reviewed By: fanzeyi

Differential Revision: D21145712

fbshipit-source-id: cbe6578c2206192ec2fd8c68aba07d8ea860682b
2020-04-21 11:50:55 -07:00
Xavier Deguillard
97cdd3a4d1 escape repository path
Summary:
On Windows, paths components are usually separated by '\', and since the
repository path is stored in a toml file, whatever character is after a '\',
will be escaped. In my case, this is followed by U (for C:\Users), and thus
toml expects the next characters to be an escaped unicode. That's obviously
not the case and thus EdenFS fails to parse the config, preventing me from
cloning fbsource.

Since Windows is perfectly fine with '/' as path separator, let's just
replace '\' with '/'.

The underlying bug appears to be in the toml Python code: https://github.com/uiri/toml/issues/280

Manually trying some random path is pretty conclusive:
  (Pdb) toml.dumps({'foo': 'c:\\Users\\wez'})
  'foo = "c:\\\\Users\\\\wez"\n'
  (Pdb) toml.dumps({'foo': 'c:\\Users\\xavier'})
  'foo = "c:\\Users\\xavier"\n'

Reviewed By: chadaustin

Differential Revision: D21143545

fbshipit-source-id: 448471da12c253dd37680f6a28251a1e69850920
2020-04-20 21:05:20 -07:00
Adam Simpkins
248d717b30 fix dependencies on CoreFoundation & IOKit on Mac OS
Summary:
The `eden_fuse_privhelper` library depends on CoreFoundation and IOKit.
Previously this dependency was specified for the `eden_service` library, which
doesn't use these frameworks directly, only indirectly through the
`eden_fuse_privhelper` library.

The fact that `eden_fuse_privhelper` was missing this dependency causes
problems when trying to build unit tests and tools that depend on
`eden_fuse_privhelper` without using the `eden_service` library.

Reviewed By: genevievehelsel

Differential Revision: D21057925

fbshipit-source-id: b846ebde0de158b70be462067c4412a655ad8036
2020-04-20 19:29:07 -07:00
Genevieve Helsel
9242ac8e23 ensure a process is running after a failed graceful restart
Summary:
As a top layer of reliability in graceful restart, we'd like the CLI to enforce that something has started after a graceful restart call. There are a few things that can happen

1) The restart short circuts before attempting to shutdown (version mismatch etc). The old process will continue (`success == False`)
2) The restart is successful, the new process will continue (`success == True`)
3) The restart is not successful (failed ping), the old process will recover (`success ==
False`)

(note here that the `success` field is the return code of the `StartupLogger` process, not the edenfs process itself).

In case any of these fail, we'd like a final line of defence with the CLI.

First, in the case of a successful start from the `StartupLogger` report, we consider this successful and exit. If we do not have a successful (`success == False`) graceful restart, we will wait for the new process to recover (since the old process will go from `ALIVE` to `STOPPED` to `ALIVE`). I do not expect recovery to take long since we are only remounting, not waiting on RocksDB. Here though, we give a fairly long timeout (1hr) to ensure we're not stuck on an in process thrift call, since we would not like to force kill the process if we're writing to the overlay.

If we time out waiting, we will just kick off a force restart and assume the old process is stuck.

Reviewed By: simpkins

Differential Revision: D20673460

fbshipit-source-id: 215e06fa8aa76dbe5dae6602f82ce5f05968e538
2020-04-20 15:47:52 -07:00
Genevieve Helsel
87bd70f0b0 restructure ThriftServer stop code in takeover case
Summary:
This restructures the `ThriftServer server_` stopping logic in the graceful restart case. Instead of stopping the server, we stop listening then explicitly stop the server. This refactor should exhibit the same behavior as today since we block on `stopListening()`, but this will allow for simpler refactoring of thrift call queueing logic in the future (by removing the `stopListening()` call and replacing it with a `startQueueingAndWaitForOutstandingCallsToFinish()` type of call).

In terms of layout, this consolidates all the stopping code into one function `startTakeoverShutdown()`. This function now returns the `TakeoverData` itself instead returning a future that is fulfilled after stopping the Thrift server. The TakeoverServer still communicates via `takeoverComplete`, but now that future is stored during `startTakeoverShutdown()` instead of being the return value of `performTakeoverShutdown()`. This also generally eliminates `TakeoverPromise`.

Reviewed By: simpkins

Differential Revision: D20744151

fbshipit-source-id: 60f0c273b4f3889b53586d79efd95bfb27256e1b
2020-04-20 12:28:36 -07:00
Adam Simpkins
9b8034c738 fix a link error in the CMake-based builds
Summary:
D20846826 added a dependency from the fuse library to the telemetry code,
so the CMakeLists.txt file needs to be updated.

Reviewed By: genevievehelsel

Differential Revision: D21083715

fbshipit-source-id: 823cc2eb128808d0e807c6b91cacc9fd91cdad48
2020-04-20 12:16:52 -07:00
Genevieve Helsel
7492cc406f add more explicit remediation steps for stale mounts after restart
Summary:
We got a user request to add this output after a restart. This (` run "cd / && cd -" to
update your shell's working directory.`) is the output from eden doctor when it detects stale mount points. I don't think it hurts to add, especially since new customers may not make the connection/have the context to deduce that "programs" in this message also apply to the user's shell.

Reviewed By: kmancini

Differential Revision: D20971070

fbshipit-source-id: 3448651cae90b2b5c8c4d2432b946521cdc5a292
2020-04-20 09:21:01 -07:00
Andrii Grynenko
b7ad8d6bb5 Remove unnecessary calls to add RSRoutingHandler
Summary: RSRoutingHandler is now added by default

Reviewed By: bithree

Differential Revision: D21058633

fbshipit-source-id: 7d7607a5c5c7c3a5ed70259496c5f036c6fa8e4c
2020-04-16 14:26:09 -07:00
Adam Simpkins
d18ce1082e split edenfsctl start into foreground vs service logic
Summary:
This refactors the `edenfsctl start` command so that we more clearly split the
functionality into two pieces:
* Starting EdenFS as a service
* Running EdenFS in the foreground

In most normal situations in production the `start`, `restart`, and `stop`
commands are used to manage running EdenFS as a service.  In the future I
believe our service management logic will start to diverge a bit more on Linux
vs Mac vs Windows, and this should help isolate the service-management code a
bit more cleanly.

The foreground behavior is mainly only used by developers during testing and
during the integration tests.  Several options like `--gdb` and `--strace` are
only allowed in foreground mode, and this refactoring makes that clearer.  In
the future we may also want to further restrict this, to allow only
specifying additional custom arguments and a custom binary path when running
in foreground mode.  However, for now I have not updated that as I believe
some of our integration tests may be exercising this behavior today.

This change also cleans up some of the platform-specific code, and lets them
share more of the logic to construct arguments for edenfs.  With this change
`edenfsctl start --foreground` now works on Windows.

Reviewed By: pkaush

Differential Revision: D20833244

fbshipit-source-id: 0f09d59702d8b64ca8f4fedccbc30da1c858afb4
2020-04-15 15:46:25 -07:00
Adam Simpkins
ce48896dad get edenfsctl stop working on Windows
Summary:
Update the `edenfsctl` and `edenfs` code so that `edenfsctl stop` works on
Windows.

Reviewed By: pkaush

Differential Revision: D20854616

fbshipit-source-id: 9a51cdc1f1d1838c5089b945df1fb624a3eaedb7
2020-04-15 15:46:25 -07:00
Adam Simpkins
104ae880db fix issues when checking EdenFS status on windows
Summary:
- Catch the Windows-specific exceptions types thrown when attempting to open
  the socket if EdenFS is not running, and convert this to an EdenNotRunning
  exception.
- Update EdenFS to write its pid to a separate file, in addition to the normal
  lock file, and have `edenfsctl` read this file instead of the lock file on
  Windows.  Other processes cannot read the lock file while EdenFS is running
  and holding the lock, so it is nice to have the pid written in an alternate
  location.

Reviewed By: pkaush

Differential Revision: D20854615

fbshipit-source-id: 1c8e8f402eb17dd012d03e11fbb662f493d9362d
2020-04-15 15:46:24 -07:00