You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Andrei Budnik <ab...@mesosphere.com> on 2018/01/22 13:00:38 UTC
Review Request 65261: Fixed connection refused error in IOSwitchboard
for unix socket.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65261/
-----------------------------------------------------------
Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
Bugs: MESOS-7742
https://issues.apache.org/jira/browse/MESOS-7742
Repository: mesos
Description
-------
Once IOSwitchboard's unix socket appears in the file system, the agent
can try to connect to it. If the agent attempts to connect to the
socket before `listen` has been called, then it gets connection refused
error. To address this, create a unix socket using a temporary name,
then initialize it, then rename the socket with the original path.
Diffs
-----
src/slave/containerizer/mesos/io/switchboard.cpp 45b615be60af9af839309011eea85912c01ff451
src/slave/containerizer/mesos/paths.hpp 65830a153f765c74bb0399bca9b2941390eeb531
src/slave/containerizer/mesos/paths.cpp 0df4cf5f50aee94a2758ce885389fb488a85fdbd
Diff: https://reviews.apache.org/r/65261/diff/1/
Testing
-------
make check (Fedora 25)
internal CI
Thanks,
Andrei Budnik
Re: Review Request 65261: Fixed connection refused error in
IOSwitchboard for unix socket.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65261/#review196156
-----------------------------------------------------------
FAIL: Mesos tests failed to build.
Reviews applied: `['65317', '65261']`
Failed command: `cmake.exe --build . --target mesos-tests --config Debug`
All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/65261
Relevant logs:
- [mesos-tests-build-cmake-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/65261/logs/mesos-tests-build-cmake-stdout.log):
```
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\lib\server.c(1799): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\lib\server.c(1814): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\lib\server.c(1818): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\lib\server.c(1826): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\lib\server.c(2363): warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\lib\server.c(2377): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\lib\seterror.c(189): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\lib\windlopen.c(236): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\lib\windlopen.c(241): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\lib\windlopen.c(253): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\lib\windlopen.c(278): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\lib\windlopen.c(289): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\lib\windlopen.c(290): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\lib\windlopen.c(293): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\plugins\cram.c(138): warning C4477: 'snprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'time_t' [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\plugins\cram.c(157): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3\plugins\cram.c(293): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3\src\sasl2-2.1.27rc3-build\libsasl2.vcxproj] [D:\DCOS\mesos\3rdparty\sasl2-2.1.27rc3.vcxproj]
"D:\DCOS\mesos\src\tests\mesos-tests.vcxproj" (default target) (1) ->
"D:\DCOS\mesos\src\mesos.vcxproj" (default target) (12) ->
(ClCompile target) ->
D:\DCOS\mesos\mesos\src\executor\executor.cpp(233): error C2039: 'eraseenv': is not a member of 'os' [D:\DCOS\mesos\src\mesos.vcxproj]
D:\DCOS\mesos\mesos\src\executor\executor.cpp(233): error C3861: 'eraseenv': identifier not found [D:\DCOS\mesos\src\mesos.vcxproj]
112 Warning(s)
2 Error(s)
Time Elapsed 00:03:09.76
```
- [mesos-tests-CMakeOutput.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/65261/logs/mesos-tests-CMakeOutput.log):
```
Creating directory "cmTC_2d9e3.dir\Debug\".
Creating directory "D:\DCOS\mesos\CMakeFiles\CMakeTmp\Debug\".
Creating directory "cmTC_2d9e3.dir\Debug\cmTC_2d9e3.tlog\".
InitializeBuildStatus:
Creating "cmTC_2d9e3.dir\Debug\cmTC_2d9e3.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX64\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D COMPILER_SUPPORTS_CXX11 /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_2d9e3.dir\Debug\" /Fd"cmTC_2d9e3.dir\Debug\vc141.pdb" /Gd /TP /errorReport:queue D:\DCOS\mesos\CMakeFiles\CMakeTmp\src.cxx
Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25830.2 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D COMPILER_SUPPORTS_CXX11 /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_2d9e3.dir\Debug\" /Fd"cmTC_2d9e3.dir\Debug\vc141.pdb" /Gd /TP /errorReport:queue D:\DCOS\mesos\CMakeFiles\CMakeTmp\src.cxx
src.cxx
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"D:\DCOS\mesos\CMakeFiles\CMakeTmp\Debug\cmTC_2d9e3.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"D:/DCOS/mesos/CMakeFiles/CMakeTmp/Debug/cmTC_2d9e3.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/DCOS/mesos/CMakeFiles/CMakeTmp/Debug/cmTC_2d9e3.lib" /MACHINE:X64 /machine:x64 cmTC_2d9e3.dir\Debug\src.obj
cmTC_2d9e3.vcxproj -> D:\DCOS\mesos\CMakeFiles\CMakeTmp\Debug\cmTC_2d9e3.exe
FinalizeBuildStatus:
Deleting file "cmTC_2d9e3.dir\Debug\cmTC_2d9e3.tlog\unsuccessfulbuild".
Touching "cmTC_2d9e3.dir\Debug\cmTC_2d9e3.tlog\cmTC_2d9e3.lastbuildstate".
Done Building Project "D:\DCOS\mesos\CMakeFiles\CMakeTmp\cmTC_2d9e3.vcxproj" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.60
Source file was:
int main() { return 0; }
```
- [mesos-tests-CMakeError.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/65261/logs/mesos-tests-CMakeError.log):
```
PrepareForBuild:
Creating directory "cmTC_698ed.dir\Debug\".
Creating directory "D:\DCOS\mesos\CMakeFiles\CMakeTmp\Debug\".
Creating directory "cmTC_698ed.dir\Debug\cmTC_698ed.tlog\".
InitializeBuildStatus:
Creating "cmTC_698ed.dir\Debug\cmTC_698ed.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX64\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /MP /Od /Ob0 /D WIN32 /D _WINDOWS /D UNICODE /D _UNICODE /D "CMAKE_INTDIR=\"Debug\"" /D _UNICODE /D UNICODE /Gm- /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_698ed.dir\Debug\" /Fd"cmTC_698ed.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue D:\DCOS\mesos\CMakeFiles\CMakeTmp\CheckIncludeFile.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25830.2 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /diagnostics:classic /MP /Od /Ob0 /D WIN32 /D _WINDOWS /D UNICODE /D _UNICODE /D "CMAKE_INTDIR=\"Debug\"" /D _UNICODE /D UNICODE /Gm- /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_698ed.dir\Debug\" /Fd"cmTC_698ed.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue D:\DCOS\mesos\CMakeFiles\CMakeTmp\CheckIncludeFile.c
CheckIncludeFile.c
D:\DCOS\mesos\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [D:\DCOS\mesos\CMakeFiles\CMakeTmp\cmTC_698ed.vcxproj]
Done Building Project "D:\DCOS\mesos\CMakeFiles\CMakeTmp\cmTC_698ed.vcxproj" (default targets) -- FAILED.
Build FAILED.
"D:\DCOS\mesos\CMakeFiles\CMakeTmp\cmTC_698ed.vcxproj" (default target) (1) ->
(ClCompile target) ->
D:\DCOS\mesos\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [D:\DCOS\mesos\CMakeFiles\CMakeTmp\cmTC_698ed.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.62
```
- Mesos Reviewbot Windows
On Jan. 22, 2018, 1 p.m., Andrei Budnik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65261/
> -----------------------------------------------------------
>
> (Updated Jan. 22, 2018, 1 p.m.)
>
>
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
>
>
> Bugs: MESOS-7742
> https://issues.apache.org/jira/browse/MESOS-7742
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Once IOSwitchboard's unix socket appears in the file system, the agent
> can try to connect to it. If the agent attempts to connect to the
> socket before `listen` has been called, then it gets connection refused
> error. To address this, we initialize a unix socket using a provisional
> path and rename it after `listen` has been called.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/io/switchboard.cpp 45b615be60af9af839309011eea85912c01ff451
> src/slave/containerizer/mesos/paths.hpp 65830a153f765c74bb0399bca9b2941390eeb531
> src/slave/containerizer/mesos/paths.cpp 0df4cf5f50aee94a2758ce885389fb488a85fdbd
>
>
> Diff: https://reviews.apache.org/r/65261/diff/2/
>
>
> Testing
> -------
>
> make check (Fedora 25)
> internal CI
>
>
> Thanks,
>
> Andrei Budnik
>
>
Re: Review Request 65261: Fixed connection refused error in
IOSwitchboard for unix socket.
Posted by Alexander Rukletsov <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65261/#review196185
-----------------------------------------------------------
Fix it, then Ship it!
src/slave/containerizer/mesos/io/switchboard.cpp
Lines 839-840 (original), 840-847 (patched)
<https://reviews.apache.org/r/65261/#comment275730>
Let's do the following for brevity and clarity:
```
const string socketPath = address.isSome()
? address->path()
: getContainerIOSwitchboardSocketProvisionalPath(
flags.runtime_dir, containerId);
```
src/slave/containerizer/mesos/io/switchboard.cpp
Lines 1054 (patched)
<https://reviews.apache.org/r/65261/#comment275727>
const string?
src/slave/containerizer/mesos/io/switchboard.cpp
Lines 1078 (patched)
<https://reviews.apache.org/r/65261/#comment275728>
s/"to '"/" to '"
src/slave/containerizer/mesos/paths.hpp
Lines 147 (patched)
<https://reviews.apache.org/r/65261/#comment275721>
Add "See comments in IOSwitchboardServer::create()".
src/slave/containerizer/mesos/paths.hpp
Lines 152 (patched)
<https://reviews.apache.org/r/65261/#comment275722>
Add "See comments in IOSwitchboardServer::create()".
- Alexander Rukletsov
On Jan. 22, 2018, 1 p.m., Andrei Budnik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65261/
> -----------------------------------------------------------
>
> (Updated Jan. 22, 2018, 1 p.m.)
>
>
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
>
>
> Bugs: MESOS-7742
> https://issues.apache.org/jira/browse/MESOS-7742
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Once IOSwitchboard's unix socket appears in the file system, the agent
> can try to connect to it. If the agent attempts to connect to the
> socket before `listen` has been called, then it gets connection refused
> error. To address this, we initialize a unix socket using a provisional
> path and rename it after `listen` has been called.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/io/switchboard.cpp 45b615be60af9af839309011eea85912c01ff451
> src/slave/containerizer/mesos/paths.hpp 65830a153f765c74bb0399bca9b2941390eeb531
> src/slave/containerizer/mesos/paths.cpp 0df4cf5f50aee94a2758ce885389fb488a85fdbd
>
>
> Diff: https://reviews.apache.org/r/65261/diff/2/
>
>
> Testing
> -------
>
> make check (Fedora 25)
> internal CI
>
>
> Thanks,
>
> Andrei Budnik
>
>
Re: Review Request 65261: Fixed connection refused error in
IOSwitchboard for unix socket.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65261/#review195902
-----------------------------------------------------------
PASS: Mesos patch 65261 was successfully built and tested.
Reviews applied: `['65261']`
All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/65261
- Mesos Reviewbot Windows
On Jan. 22, 2018, 2 p.m., Andrei Budnik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65261/
> -----------------------------------------------------------
>
> (Updated Jan. 22, 2018, 2 p.m.)
>
>
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
>
>
> Bugs: MESOS-7742
> https://issues.apache.org/jira/browse/MESOS-7742
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Once IOSwitchboard's unix socket appears in the file system, the agent
> can try to connect to it. If the agent attempts to connect to the
> socket before `listen` has been called, then it gets connection refused
> error. To address this, create a unix socket using a temporary name,
> then initialize it, then rename the socket with the original path.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/io/switchboard.cpp 45b615be60af9af839309011eea85912c01ff451
> src/slave/containerizer/mesos/paths.hpp 65830a153f765c74bb0399bca9b2941390eeb531
> src/slave/containerizer/mesos/paths.cpp 0df4cf5f50aee94a2758ce885389fb488a85fdbd
>
>
> Diff: https://reviews.apache.org/r/65261/diff/1/
>
>
> Testing
> -------
>
> make check (Fedora 25)
> internal CI
>
>
> Thanks,
>
> Andrei Budnik
>
>
Re: Review Request 65261: Fixed connection refused error in
IOSwitchboard for unix socket.
Posted by Andrei Budnik <ab...@mesosphere.com>.
> On Jan. 23, 2018, 3:12 p.m., Alexander Rukletsov wrote:
> > src/slave/containerizer/mesos/paths.hpp
> > Lines 147-149 (patched)
> > <https://reviews.apache.org/r/65261/diff/1/?file=1943242#file1943242line147>
> >
> > Let's find a more descriptive word for this, "temp" can mean anything. We want to say, that this is a path that exists before the socket is being listend on, or, in other words, fully initialized.
> >
> > How about "prefatory" or "preparatory". Maybe "prep" is sufficient. Can you please consult a native English speaker?
Renamed "temporary" to "provisional".
- Andrei
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65261/#review196009
-----------------------------------------------------------
On Jan. 22, 2018, 1 p.m., Andrei Budnik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65261/
> -----------------------------------------------------------
>
> (Updated Jan. 22, 2018, 1 p.m.)
>
>
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
>
>
> Bugs: MESOS-7742
> https://issues.apache.org/jira/browse/MESOS-7742
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Once IOSwitchboard's unix socket appears in the file system, the agent
> can try to connect to it. If the agent attempts to connect to the
> socket before `listen` has been called, then it gets connection refused
> error. To address this, we initialize a unix socket using a provisional
> path and rename it after `listen` has been called.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/io/switchboard.cpp 45b615be60af9af839309011eea85912c01ff451
> src/slave/containerizer/mesos/paths.hpp 65830a153f765c74bb0399bca9b2941390eeb531
> src/slave/containerizer/mesos/paths.cpp 0df4cf5f50aee94a2758ce885389fb488a85fdbd
>
>
> Diff: https://reviews.apache.org/r/65261/diff/2/
>
>
> Testing
> -------
>
> make check (Fedora 25)
> internal CI
>
>
> Thanks,
>
> Andrei Budnik
>
>
Re: Review Request 65261: Fixed connection refused error in
IOSwitchboard for unix socket.
Posted by Andrei Budnik <ab...@mesosphere.com>.
> On Jan. 23, 2018, 3:12 p.m., Alexander Rukletsov wrote:
> > src/slave/containerizer/mesos/io/switchboard.cpp
> > Lines 842-843 (original), 845-852 (patched)
> > <https://reviews.apache.org/r/65261/diff/1/?file=1943241#file1943241line849>
> >
> > If you add an override for `getContainerIOSwitchboardSocketTempPath()` that takes same arguments as `getContainerIOSwitchboardSocketPath()`, this snippet will reduce to a tertiary operator and will become more readable.
`getContainerIOSwitchboardSocketTempPath()` is also used in `IOSwitchboardServer::create()`, so it looks like we can't have same arguments as for `getContainerIOSwitchboardSocketPath`.
- Andrei
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65261/#review196009
-----------------------------------------------------------
On Jan. 22, 2018, 1 p.m., Andrei Budnik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65261/
> -----------------------------------------------------------
>
> (Updated Jan. 22, 2018, 1 p.m.)
>
>
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
>
>
> Bugs: MESOS-7742
> https://issues.apache.org/jira/browse/MESOS-7742
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Once IOSwitchboard's unix socket appears in the file system, the agent
> can try to connect to it. If the agent attempts to connect to the
> socket before `listen` has been called, then it gets connection refused
> error. To address this, create a unix socket using a temporary name,
> then initialize it, then rename the socket with the original path.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/io/switchboard.cpp 45b615be60af9af839309011eea85912c01ff451
> src/slave/containerizer/mesos/paths.hpp 65830a153f765c74bb0399bca9b2941390eeb531
> src/slave/containerizer/mesos/paths.cpp 0df4cf5f50aee94a2758ce885389fb488a85fdbd
>
>
> Diff: https://reviews.apache.org/r/65261/diff/1/
>
>
> Testing
> -------
>
> make check (Fedora 25)
> internal CI
>
>
> Thanks,
>
> Andrei Budnik
>
>
Re: Review Request 65261: Fixed connection refused error in
IOSwitchboard for unix socket.
Posted by Alexander Rukletsov <ru...@gmail.com>.
> On Jan. 23, 2018, 3:12 p.m., Alexander Rukletsov wrote:
> > src/slave/containerizer/mesos/io/switchboard.cpp
> > Lines 842-843 (original), 845-852 (patched)
> > <https://reviews.apache.org/r/65261/diff/1/?file=1943241#file1943241line849>
> >
> > If you add an override for `getContainerIOSwitchboardSocketTempPath()` that takes same arguments as `getContainerIOSwitchboardSocketPath()`, this snippet will reduce to a tertiary operator and will become more readable.
>
> Andrei Budnik wrote:
> `getContainerIOSwitchboardSocketTempPath()` is also used in `IOSwitchboardServer::create()`, so it looks like we can't have same arguments as for `getContainerIOSwitchboardSocketPath`.
Why not? Just add an override.
- Alexander
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65261/#review196009
-----------------------------------------------------------
On Jan. 22, 2018, 1 p.m., Andrei Budnik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65261/
> -----------------------------------------------------------
>
> (Updated Jan. 22, 2018, 1 p.m.)
>
>
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
>
>
> Bugs: MESOS-7742
> https://issues.apache.org/jira/browse/MESOS-7742
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Once IOSwitchboard's unix socket appears in the file system, the agent
> can try to connect to it. If the agent attempts to connect to the
> socket before `listen` has been called, then it gets connection refused
> error. To address this, create a unix socket using a temporary name,
> then initialize it, then rename the socket with the original path.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/io/switchboard.cpp 45b615be60af9af839309011eea85912c01ff451
> src/slave/containerizer/mesos/paths.hpp 65830a153f765c74bb0399bca9b2941390eeb531
> src/slave/containerizer/mesos/paths.cpp 0df4cf5f50aee94a2758ce885389fb488a85fdbd
>
>
> Diff: https://reviews.apache.org/r/65261/diff/1/
>
>
> Testing
> -------
>
> make check (Fedora 25)
> internal CI
>
>
> Thanks,
>
> Andrei Budnik
>
>
Re: Review Request 65261: Fixed connection refused error in
IOSwitchboard for unix socket.
Posted by Alexander Rukletsov <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65261/#review196009
-----------------------------------------------------------
Great idea, Andrei: clever yet clear and clean. We can ship this once you address the feedback.
src/slave/containerizer/mesos/io/switchboard.cpp
Lines 842-843 (original), 845-852 (patched)
<https://reviews.apache.org/r/65261/#comment275519>
If you add an override for `getContainerIOSwitchboardSocketTempPath()` that takes same arguments as `getContainerIOSwitchboardSocketPath()`, this snippet will reduce to a tertiary operator and will become more readable.
src/slave/containerizer/mesos/io/switchboard.cpp
Lines 1057 (patched)
<https://reviews.apache.org/r/65261/#comment275521>
change "temporary" to a more specific word, see above.
src/slave/containerizer/mesos/io/switchboard.cpp
Lines 1058 (patched)
<https://reviews.apache.org/r/65261/#comment275520>
s/then rename it with the original path./and rename it it after `listen()` has been called./
src/slave/containerizer/mesos/paths.hpp
Lines 147-149 (patched)
<https://reviews.apache.org/r/65261/#comment275517>
Let's find a more descriptive word for this, "temp" can mean anything. We want to say, that this is a path that exists before the socket is being listend on, or, in other words, fully initialized.
How about "prefatory" or "preparatory". Maybe "prep" is sufficient. Can you please consult a native English speaker?
- Alexander Rukletsov
On Jan. 22, 2018, 1 p.m., Andrei Budnik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65261/
> -----------------------------------------------------------
>
> (Updated Jan. 22, 2018, 1 p.m.)
>
>
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
>
>
> Bugs: MESOS-7742
> https://issues.apache.org/jira/browse/MESOS-7742
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Once IOSwitchboard's unix socket appears in the file system, the agent
> can try to connect to it. If the agent attempts to connect to the
> socket before `listen` has been called, then it gets connection refused
> error. To address this, create a unix socket using a temporary name,
> then initialize it, then rename the socket with the original path.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/io/switchboard.cpp 45b615be60af9af839309011eea85912c01ff451
> src/slave/containerizer/mesos/paths.hpp 65830a153f765c74bb0399bca9b2941390eeb531
> src/slave/containerizer/mesos/paths.cpp 0df4cf5f50aee94a2758ce885389fb488a85fdbd
>
>
> Diff: https://reviews.apache.org/r/65261/diff/1/
>
>
> Testing
> -------
>
> make check (Fedora 25)
> internal CI
>
>
> Thanks,
>
> Andrei Budnik
>
>