[ 
https://issues.apache.org/jira/browse/MESOS-3002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam B updated MESOS-3002:
--------------------------
    Target Version/s: 0.24.0  (was: 0.23.0)

> Rename Option<T>::get(const T& _t) to getOrElse() broke network isolator
> ------------------------------------------------------------------------
>
>                 Key: MESOS-3002
>                 URL: https://issues.apache.org/jira/browse/MESOS-3002
>             Project: Mesos
>          Issue Type: Bug
>          Components: isolation
>    Affects Versions: 0.24.0
>            Reporter: Paul Brett
>            Assignee: Joris Van Remoortere
>            Priority: Blocker
>
> Change to Option from get() to getOrElse() breaks network isolator.  Building 
> with '../configure --with-network-isolator' generates the following error:
> ../../src/slave/containerizer/isolators/network/port_mapping.cpp: In static 
> member function 'static Try<mesos::slave::Isolator*> 
> mesos::internal::slave::PortMappingIsolatorProcess::create(const 
> mesos::internal::slave::Flags&)':
> ../../src/slave/containerizer/isolators/network/port_mapping.cpp:1103:29: 
> error: no matching function for call to 'Option<std::basic_string<char> 
> >::get(const char [1]) const'
>        flags.resources.get(""),
>                              ^
> ../../src/slave/containerizer/isolators/network/port_mapping.cpp:1103:29: 
> note: candidates are:
> In file included from 
> ../../3rdparty/libprocess/3rdparty/stout/include/stout/check.hpp:26:0,
>                  from ../../3rdparty/libprocess/include/process/check.hpp:19,
>                  from ../../3rdparty/libprocess/include/process/collect.hpp:7,
>                  from 
> ../../src/slave/containerizer/isolators/network/port_mapping.cpp:30:
> ../../3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp:130:12: 
> note: const T& Option<T>::get() const [with T = std::basic_string<char>]
>    const T& get() const { assert(isSome()); return t; }
>             ^
> ../../3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp:130:12: 
> note:   candidate expects 0 arguments, 1 provided
> ../../3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp:131:6: 
> note: T& Option<T>::get() [with T = std::basic_string<char>]
>    T& get() { assert(isSome()); return t; }
>       ^
> ../../3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp:131:6: 
> note:   candidate expects 0 arguments, 1 provided
> make[2]: *** 
> [slave/containerizer/isolators/network/libmesos_no_3rdparty_la-port_mapping.lo]
>  Error 1
> make[2]: Leaving directory `/home/pbrett/sandbox/mesos.master/build/src'
> make[1]: *** [check] Error 2
> make[1]: Leaving directory `/home/pbrett/sandbox/mesos.master/build/src'
> make: *** [check-recursive] Error 1



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to