Chun is working on a cleanup, see my comments in this review:
https://reviews.apache.org/r/64659/

- Jie

On Tue, Dec 19, 2017 at 11:16 AM, Benjamin Mahler <bmah...@apache.org>
wrote:

> +joseph
>
> Chun and I wrote a fix for this last night to unbreak the build, please
> take a look and adjust if this isn't the right approach. One thing I
> noticed was that slave.hpp doesn't need to include the volume_profile.hpp
> header (it can forward declare), might want to move the include to .cpp to
> help compile times?
>
> On Mon, Dec 18, 2017 at 9:40 PM, <bmah...@apache.org> wrote:
>
>> Fixed the volume profile related build breakage.
>>
>> Due to some lacking ifdef guards around GRPC being enabled,
>> the build broke for those that don't enable GRPC.
>>
>>
>> Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/cc3ee7aa
>> Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/cc3ee7aa
>> Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/cc3ee7aa
>>
>> Branch: refs/heads/master
>> Commit: cc3ee7aad3bee10dc4130ab2b39b89dddea8f4bb
>> Parents: 044fce5
>> Author: Benjamin Mahler <bmah...@apache.org>
>> Authored: Mon Dec 18 21:40:03 2017 -0800
>> Committer: Benjamin Mahler <bmah...@apache.org>
>> Committed: Mon Dec 18 21:40:03 2017 -0800
>>
>> ----------------------------------------------------------------------
>>  src/Makefile.am     | 8 ++++----
>>  src/slave/slave.cpp | 2 ++
>>  src/slave/slave.hpp | 4 ++++
>>  3 files changed, 10 insertions(+), 4 deletions(-)
>> ----------------------------------------------------------------------
>>
>>
>> http://git-wip-us.apache.org/repos/asf/mesos/blob/cc3ee7aa/s
>> rc/Makefile.am
>> ----------------------------------------------------------------------
>> diff --git a/src/Makefile.am b/src/Makefile.am
>> index c004004..4623cfc 100644
>> --- a/src/Makefile.am
>> +++ b/src/Makefile.am
>> @@ -2447,8 +2447,6 @@ noinst_LTLIBRARIES += $(MESOS_TEST_MODULES)
>>  endif
>>
>>  mesos_tests_SOURCES =                                          \
>> -  csi/uri_volume_profile.pb.cc                                 \
>> -  resource_provider/uri_volume_profile.cpp                     \
>>    slave/qos_controllers/load.cpp                               \
>>    tests/active_user_test_helper.cpp                            \
>>    tests/agent_container_api_tests.cpp                          \
>> @@ -2545,7 +2543,6 @@ mesos_tests_SOURCES =
>>                \
>>    tests/uri_fetcher_tests.cpp                                  \
>>    tests/utils.cpp                                              \
>>    tests/values_tests.cpp                                       \
>> -  tests/volume_profile_tests.cpp                               \
>>    tests/zookeeper_url_tests.cpp                                        \
>>    tests/common/command_utils_tests.cpp                         \
>>    tests/common/http_tests.cpp                                  \
>> @@ -2647,9 +2644,12 @@ endif
>>
>>  if ENABLE_GRPC
>>  mesos_tests_SOURCES +=                                         \
>> +  csi/uri_volume_profile.pb.cc                                 \
>> +  resource_provider/uri_volume_profile.cpp                     \
>>    tests/csi_client_tests.cpp                                   \
>>    tests/mock_csi_plugin.cpp                                    \
>> -  tests/mock_csi_plugin.hpp
>> +  tests/mock_csi_plugin.hpp                                    \
>> +  tests/volume_profile_tests.cpp
>>
>>  if OS_LINUX
>>  mesos_tests_SOURCES +=                                         \
>>
>> http://git-wip-us.apache.org/repos/asf/mesos/blob/cc3ee7aa/s
>> rc/slave/slave.cpp
>> ----------------------------------------------------------------------
>> diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
>> index 2dfbdeb..580ad19 100644
>> --- a/src/slave/slave.cpp
>> +++ b/src/slave/slave.cpp
>> @@ -419,6 +419,7 @@ void Slave::initialize()
>>        << mkdir.error();
>>    }
>>
>> +#ifdef ENABLE_GRPC
>>    // Create the VolumeProfileAdaptor module and set it globally so
>>    // any component that needs the module can share this instance.
>>    Try<VolumeProfileAdaptor*> _volumeProfileAdaptor =
>> @@ -434,6 +435,7 @@ void Slave::initialize()
>>      shared_ptr<VolumeProfileAdaptor>(_volumeProfileAdaptor.get());
>>
>>    VolumeProfileAdaptor::setAdaptor(volumeProfileAdaptor);
>> +#endif
>>
>>    string scheme = "http";
>>
>>
>> http://git-wip-us.apache.org/repos/asf/mesos/blob/cc3ee7aa/s
>> rc/slave/slave.hpp
>> ----------------------------------------------------------------------
>> diff --git a/src/slave/slave.hpp b/src/slave/slave.hpp
>> index 52759b1..c1322a3 100644
>> --- a/src/slave/slave.hpp
>> +++ b/src/slave/slave.hpp
>> @@ -40,7 +40,9 @@
>>
>>  #include <mesos/module/authenticatee.hpp>
>>
>> +#ifdef ENABLE_GRPC
>>  #include <mesos/resource_provider/volume_profile.hpp>
>> +#endif
>>
>>  #include <mesos/slave/containerizer.hpp>
>>  #include <mesos/slave/qos_controller.hpp>
>> @@ -726,7 +728,9 @@ private:
>>
>>    mesos::slave::QoSController* qosController;
>>
>> +#ifdef ENABLE_GRPC
>>    std::shared_ptr<VolumeProfileAdaptor> volumeProfileAdaptor;
>> +#endif
>>
>>    mesos::SecretGenerator* secretGenerator;
>>
>>
>>
>

Reply via email to