Skip to content

Commit

Permalink
Revert "[core] Add support for vsock transport" (grpc#33276)
Browse files Browse the repository at this point in the history
Reverts grpc#32847. Breaks the Python build.
  • Loading branch information
drfloob authored and eugeneo committed Jun 1, 2023
1 parent 0801ac4 commit 6ae9802
Show file tree
Hide file tree
Showing 36 changed files with 13 additions and 465 deletions.
2 changes: 0 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,6 @@ grpc_cc_library(
"//src/core:lib/iomgr/tcp_windows.cc",
"//src/core:lib/iomgr/unix_sockets_posix.cc",
"//src/core:lib/iomgr/unix_sockets_posix_noop.cc",
"//src/core:lib/iomgr/vsock.cc",
"//src/core:lib/iomgr/wakeup_fd_eventfd.cc",
"//src/core:lib/iomgr/wakeup_fd_nospecial.cc",
"//src/core:lib/iomgr/wakeup_fd_pipe.cc",
Expand Down Expand Up @@ -1427,7 +1426,6 @@ grpc_cc_library(
"//src/core:lib/iomgr/tcp_server_utils_posix.h",
"//src/core:lib/iomgr/tcp_windows.h",
"//src/core:lib/iomgr/unix_sockets_posix.h",
"//src/core:lib/iomgr/vsock.h",
"//src/core:lib/iomgr/wakeup_fd_pipe.h",
"//src/core:lib/iomgr/wakeup_fd_posix.h",
"//src/core:lib/resource_quota/api.h",
Expand Down
4 changes: 0 additions & 4 deletions CMakeLists.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions build_autogenerated.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion config.m4

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion config.w32

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions doc/naming.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ Most gRPC implementations support the following URI schemes:
as the first character; the implementation will prepend this null. Do not include
the null in `abstract_path`.

- `vsock:cid:port` -- VSOCK (Linux systems only)
- `cid` is 32-bit Context Identifier (CID). It indicates the source or
destination, which is either a virtual machine or the host.
- `port` is a 32-bit port number. It differentiates between multiple
services running on a single machine.

The following schemes are supported by the gRPC C-core implementation,
but may not be supported in other languages:

Expand Down
2 changes: 0 additions & 2 deletions gRPC-C++.podspec

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions gRPC-Core.podspec

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions grpc.gemspec

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions grpc.gyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/core/ext/filters/client_channel/http_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,6 @@ absl::optional<std::string> HttpProxyMapper::MapName(
std::string(server_uri).c_str());
return absl::nullopt;
}
if (uri->scheme() == "vsock") {
gpr_log(GPR_INFO, "not using proxy for VSock '%s'",
std::string(server_uri).c_str());
return absl::nullopt;
}
// Prefer using 'no_grpc_proxy'. Fallback on 'no_proxy' if it is not set.
auto no_proxy_str = GetEnv("no_grpc_proxy");
if (!no_proxy_str.has_value()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Support for resolving ipv4:, ipv6:, unix:, vsock: schemes
Support for resolving ipv4:, ipv6:, unix: schemes
Original file line number Diff line number Diff line change
Expand Up @@ -172,26 +172,6 @@ class UnixAbstractResolverFactory : public ResolverFactory {
};
#endif // GRPC_HAVE_UNIX_SOCKET

#ifdef GRPC_HAVE_VSOCK
class VSockResolverFactory : public ResolverFactory {
public:
bool IsValidUri(const URI& uri) const override {
return ParseUri(uri, grpc_parse_vsock, nullptr);
}

OrphanablePtr<Resolver> CreateResolver(ResolverArgs args) const override {
return CreateSockaddrResolver(std::move(args), grpc_parse_vsock);
}

std::string GetDefaultAuthority(const URI& /*uri*/) const override {
return "localhost";
}

absl::string_view scheme() const override { return "vsock"; }
};

#endif // GRPC_HAVE_VSOCK

} // namespace

void RegisterSockaddrResolver(CoreConfiguration::Builder* builder) {
Expand All @@ -205,10 +185,6 @@ void RegisterSockaddrResolver(CoreConfiguration::Builder* builder) {
builder->resolver_registry()->RegisterResolverFactory(
std::make_unique<UnixAbstractResolverFactory>());
#endif
#ifdef GRPC_HAVE_VSOCK
builder->resolver_registry()->RegisterResolverFactory(
std::make_unique<VSockResolverFactory>());
#endif
}

} // namespace grpc_core
4 changes: 0 additions & 4 deletions src/core/ext/transport/chttp2/server/chttp2_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
#include "src/core/lib/iomgr/resolved_address.h"
#include "src/core/lib/iomgr/tcp_server.h"
#include "src/core/lib/iomgr/unix_sockets_posix.h"
#include "src/core/lib/iomgr/vsock.h"
#include "src/core/lib/resource_quota/memory_quota.h"
#include "src/core/lib/resource_quota/resource_quota.h"
#include "src/core/lib/security/credentials/credentials.h"
Expand Down Expand Up @@ -99,7 +98,6 @@ using ::grpc_event_engine::experimental::EventEngine;

const char kUnixUriPrefix[] = "unix:";
const char kUnixAbstractUriPrefix[] = "unix-abstract:";
const char kVSockUriPrefix[] = "vsock:";

class Chttp2ServerListener : public Server::ListenerInterface {
public:
Expand Down Expand Up @@ -943,8 +941,6 @@ grpc_error_handle Chttp2ServerAddPort(Server* server, const char* addr,
kUnixAbstractUriPrefix)) {
resolved_or =
grpc_resolve_unix_abstract_domain_address(parsed_addr_unprefixed);
} else if (absl::ConsumePrefix(&parsed_addr_unprefixed, kVSockUriPrefix)) {
resolved_or = grpc_resolve_vsock_address(parsed_addr_unprefixed);
} else {
resolved_or =
GetDNSResolver()->LookupHostnameBlocking(parsed_addr, "https");
Expand Down

0 comments on commit 6ae9802

Please sign in to comment.