Show a warning when tmpfs size is not specified

PiperOrigin-RevId: 302441519
Change-Id: Ia4130c9067f00ed48065ea3b4854c844e7b88f85
This commit is contained in:
Kevin Hamacher 2020-03-23 08:44:01 -07:00 committed by Copybara-Service
parent 8e83506380
commit dadf55f647

View File

@ -432,8 +432,14 @@ class PolicyBuilder final {
// directories inside the namespace if needed.
//
// Calling this function will enable use of namespaces.
PolicyBuilder& AddTmpfs(absl::string_view inside,
size_t sz = 4 << 20 /* 4MiB */);
ABSL_DEPRECATED(
"Explicitly specify tmpfs size by using AddTmpfs(inside, sz) instead")
PolicyBuilder& AddTmpfs(absl::string_view inside) {
LOG(WARNING) << "Tmpfs size not specified, defaulting to 4 MiB";
return AddTmpfs(inside, 4 << 20 /* 4 MiB */);
}
PolicyBuilder& AddTmpfs(absl::string_view inside, size_t sz);
// Allows unrestricted access to the network by *not* creating a network
// namespace. Note that this only disables the network namespace. To actually