mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <benjamin.bann...@mesosphere.io>
Subject Re: Review Request 70302: Adjusted CSI v0 bundling and proto compilation.
Date Tue, 02 Apr 2019 13:50:37 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70302/#review214277
-----------------------------------------------------------




3rdparty/csi.md
Lines 10-12 (patched)
<https://reviews.apache.org/r/70302/#comment300490>

    Thinking about this, let's not rebundle, but instead us the upstream tarball.
    
    ```
    curl -L https://github.com/container-storage-interface/spec/archive/v<X.Y.Z>.tar.gz
-o csi-<X.Y.Z>.tar.gz
    ```
    
    We can then adjust the directory layout as part of our build.
    
    cmake: use e.g., `CONFIGURE_COMMAND mkdir -p ${CSI_V0_ROOT}/csi/v0 && mv ${CSI_V0_ROOT}/csi.proto
${CSI_V0_ROOT}/csi/v0` and `CONFIGURE_COMMAND mkdir -p ${CSI_V1_ROOT}/csi/v1 && mv
${CSI_V1_ROOT}/csi.proto ${CSI_V1_ROOT}/csi/v1`
    
    autotools:
    ```
    -ALL_LOCAL += $(CSI_V0)-stamp
    +$(CSI_V0)-build-stamp: $(CSI_V0)-stamp
    +       $(MKDIR_P) $(CSI_V0)/csi/v0 && mv spec-$(CSI_V0_VERSION)/csi.proto $(CSI_V0)/csi/v0
    +       touch $@
    +
    +ALL_LOCAL += $(CSI_V0)-build-stamp
    ```
    We also need to add `spec-$(CSI_V0_VERSION)` to `CLEAN_EXTRACTED` there.
    
    The same should be done for v1 later in the chain.



src/Makefile.am
Lines 705-706 (patched)
<https://reviews.apache.org/r/70302/#comment300491>

    This does not what you think it does, in particular the headers will not be installed
in `csi/v0`, but in `$csidir` instead.
    
    You need to declare these headers separately, e.g.,
    ```
    +csi_v0dir = $(pkgincludedir)/csi/v0
    +nodist_csi_v0_HEADERS =                                                        \
    +  ../include/csi/v0/csi.grpc.pb.h                                      \
    +  ../include/csi/v0/csi.pb.h
    +
    ```
    
    Similarly later in the chain for the v1 headers.


- Benjamin Bannier


On April 2, 2019, 8:11 a.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70302/
> -----------------------------------------------------------
> 
> (Updated April 2, 2019, 8:11 a.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Joseph Wu.
> 
> 
> Bugs: MESOS-9624
>     https://issues.apache.org/jira/browse/MESOS-9624
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch makes the following adjustments so we can build CSI v0 and v1
> in the future:
> 
> * Standardize placements for third-party proto files: `csi.proto` from
>   CSI v0 should be in `csi/v0/` of the library root directory and that
>   from v1 should be in `csi/v1/` in the future. Dependent proto files
>   should import `csi/v0/csi.proto` or `csi/v1/csi.proto`. The procedure
>   to bundle CSI is described in `3rdparty/csi.md`.
> 
> * The generated files for CSI v0 is placed in `build/include/csi/v0`,
>   and those for CSI v1 will be in `build/include/csi/v1` in the future.
> 
> * Moved `include/csi/spec.hpp` to `include/mesos/csi/v0.hpp`. In the
>   future, CSI v1 proto headers will be in `include/mesos/csi/v1.hpp`.
>   Since we don't install CSI headers, for the installed `v0.hpp` and
>   `v1.hpp` headers to work, users must ensure that the CSI headers can
>   be found through `csi/v0/csi*.pb.h` and `csi/v1/csi*.pb.h`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/CMakeLists.txt 1999dd20964da96bc5acfbd47cb80d4ca6f734b9 
>   3rdparty/Makefile.am 98a2623b34132885279bea6135c0da4ffc8c59cf 
>   3rdparty/cmake/Versions.cmake 972c706a18bfce45af6c2632b326606052888b02 
>   3rdparty/csi-0.2.0.tar.gz eea1cbd47eaf955ca94c579135e95cb4d750356a 
>   3rdparty/csi.md PRE-CREATION 
>   3rdparty/versions.am 24381073f4c77d92c5ba62f54bb2194bf041ee6c 
>   include/csi/spec.hpp 19d9445fe1da7be6e41b484b5a78dcd10e5ece52 
>   src/CMakeLists.txt 3397c3b1d4e8a7900b2e5f870679cc7aa30b4be2 
>   src/Makefile.am 7c2131a9daf16d49e8e8d75b12f019e5c4df1da3 
>   src/cmake/MesosProtobuf.cmake 09074d77a1df5076c6e51292523ce994a77a88f2 
>   src/csi/client.hpp c2583cf4c0d2abc38d65ddc801cae3696a8080a9 
>   src/csi/rpc.hpp b2502ceb319638038b4d151965f6226db675f96b 
>   src/csi/utils.hpp 9145c6795c3ecdde5de5859a852763fe9aeb1ddf 
>   src/examples/test_csi_plugin.cpp 73a6c43e72afec0dd124b0fe2f8ef0e45acb307f 
>   src/resource_provider/storage/disk_profile.proto 1c97e9c62fb3154d6048d0e55352a1276adcbca8

>   src/resource_provider/storage/disk_profile_utils.hpp 8a83a15ba555ce66bbb86b8df72178bce17a615a

>   src/tests/csi_utils_tests.cpp PRE-CREATION 
>   src/tests/disk_profile_adaptor_tests.cpp 0ccbc79d7ffb82a68b7ed5aeab930bcd8e6e770e 
>   src/tests/mock_csi_plugin.hpp 6897fbc878f1e2f5b9e9c402b09358c187af79a0 
> 
> 
> Diff: https://reviews.apache.org/r/70302/diff/3/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message