Apache Mesos
aufs.hpp
Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 
17 #ifndef __MESOS_PROVISIONER_AUFS_HPP__
18 #define __MESOS_PROVISIONER_AUFS_HPP__
19 
21 
22 namespace mesos {
23 namespace internal {
24 namespace slave {
25 
26 // Forward declaration.
27 class AufsBackendProcess;
28 
29 
30 // This backend mounts the images layers to the rootfs using the aufs file
31 // system. The directory layout is as follows:
32 // <work_dir> ('--work_dir' flag)
33 // |-- provisioner
34 // |-- containers
35 // |-- <container-id>
36 // |-- backends
37 // |-- aufs
38 // |-- rootfses
39 // |-- <rootfs_id> (the rootfs)
40 // |-- scratch
41 // |-- <rootfs_id> (the scratch space)
42 // |-- workdir
43 // |-- links (symlink to temp dir with links to layers) // NOLINT(whitespace/line_length)
44 class AufsBackend : public Backend
45 {
46 public:
47  ~AufsBackend() override;
48 
50 
52  const std::vector<std::string>& layers,
53  const std::string& rootfs,
54  const std::string& backendDir) override;
55 
57  const std::string& rootfs,
58  const std::string& backendDir) override;
59 
60 private:
62 
63  AufsBackend(const AufsBackend&);
64  AufsBackend& operator=(const AufsBackend&);
65 
67 };
68 
69 } // namespace slave {
70 } // namespace internal {
71 } // namespace mesos {
72 
73 #endif // __MESOS_PROVISIONER_AUFS_HPP__
static Try< process::Owned< Backend > > create(const Flags &)
Definition: check.hpp:33
process::Future< bool > destroy(const std::string &rootfs, const std::string &backendDir) override
Definition: flags.hpp:39
Definition: backend.hpp:38
Definition: agent.hpp:25
process::Future< Option< std::vector< Path > > > provision(const std::vector< std::string > &layers, const std::string &rootfs, const std::string &backendDir) override
Definition: attributes.hpp:24
Definition: executor.hpp:48
Definition: future.hpp:58