Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
bb5fd394
Commit
bb5fd394
authored
Sep 13, 2016
by
Eric Cano
Browse files
Partially completed process manager and plugged in cleaner session.
parent
a44c9bc1
Changes
40
Hide whitespace changes
Inline
Side-by-side
tapeserver/castor/io/io.hpp
View file @
bb5fd394
...
...
@@ -28,8 +28,8 @@
#include
"common/exception/InvalidArgument.hpp"
#include
"common/exception/NoPortInRange.hpp"
#include
"common/exception/TimeOut.hpp"
#include
"
castor/io/
Constants.hpp"
#include
"
castor/io/
IpAndPort.hpp"
#include
"Constants.hpp"
#include
"IpAndPort.hpp"
#include
"common/exception/Exception.hpp"
#include
<errno.h>
...
...
tapeserver/castor/legacymsg/RmcMountMsgBody.hpp
View file @
bb5fd394
...
...
@@ -23,7 +23,7 @@
#pragma once
#include
"h/Castor_limits.h"
#include
"
tapeserver/
h/Castor_limits.h"
#include
<stdint.h>
namespace
castor
{
...
...
tapeserver/castor/legacymsg/RmcProxy.hpp
View file @
bb5fd394
...
...
@@ -21,7 +21,7 @@
#pragma once
#include
"castor/mediachanger/ScsiLibrarySlot.hpp"
#include
"
tapeserver/
castor/mediachanger/ScsiLibrarySlot.hpp"
#include
"common/exception/Exception.hpp"
#include
<string>
...
...
tapeserver/castor/legacymsg/RmcProxyTcpIp.hpp
View file @
bb5fd394
...
...
@@ -21,14 +21,14 @@
#pragma once
#include
"castor/io/io.hpp"
#include
"
castor/legacymsg/
MessageHeader.hpp"
#include
"
castor/legacymsg/
RmcMountMsgBody.hpp"
#include
"
castor/legacymsg/
RmcProxy.hpp"
#include
"
castor/legacymsg/
RmcUnmountMsgBody.hpp"
#include
"castor/utils/utils.hpp"
#include
"
tapeserver/
castor/io/io.hpp"
#include
"MessageHeader.hpp"
#include
"RmcMountMsgBody.hpp"
#include
"RmcProxy.hpp"
#include
"RmcUnmountMsgBody.hpp"
#include
"
tapeserver/
castor/utils/utils.hpp"
#include
"common/SmartFd.hpp"
#include
"h/rmc_constants.h"
#include
"
tapeserver/
h/rmc_constants.h"
#include
<unistd.h>
#include
<sys/types.h>
...
...
tapeserver/castor/legacymsg/RmcUnmountMsgBody.hpp
View file @
bb5fd394
...
...
@@ -23,7 +23,7 @@
#pragma once
#include
"h/Castor_limits.h"
#include
"
tapeserver/
h/Castor_limits.h"
#include
<stdint.h>
namespace
castor
{
...
...
tapeserver/castor/mediachanger/AcsLibrarySlot.hpp
View file @
bb5fd394
...
...
@@ -22,7 +22,7 @@
#pragma once
#include
"common/exception/InvalidArgument.hpp"
#include
"castor/mediachanger/LibrarySlot.hpp"
#include
"
tapeserver/
castor/mediachanger/LibrarySlot.hpp"
#include
<stdint.h>
...
...
tapeserver/castor/mediachanger/LibrarySlot.hpp
View file @
bb5fd394
...
...
@@ -23,7 +23,7 @@
#pragma once
#include
"castor/mediachanger/TapeLibraryType.hpp"
#include
"
tapeserver/
castor/mediachanger/TapeLibraryType.hpp"
#include
<string>
...
...
tapeserver/castor/mediachanger/LibrarySlotParser.hpp
View file @
bb5fd394
...
...
@@ -23,10 +23,10 @@
#pragma once
#include
"
castor/mediachanger/
LibrarySlot.hpp"
#include
"
castor/mediachanger/
AcsLibrarySlot.hpp"
#include
"
castor/mediachanger/
ManualLibrarySlot.hpp"
#include
"
castor/mediachanger/
ScsiLibrarySlot.hpp"
#include
"LibrarySlot.hpp"
#include
"AcsLibrarySlot.hpp"
#include
"ManualLibrarySlot.hpp"
#include
"ScsiLibrarySlot.hpp"
namespace
castor
{
namespace
mediachanger
{
...
...
tapeserver/castor/mediachanger/ManualLibrarySlot.hpp
View file @
bb5fd394
...
...
@@ -21,7 +21,7 @@
#pragma once
#include
"
castor/mediachanger/
LibrarySlot.hpp"
#include
"LibrarySlot.hpp"
namespace
castor
{
namespace
mediachanger
{
...
...
tapeserver/castor/mediachanger/MediaChangerFacade.hpp
View file @
bb5fd394
...
...
@@ -21,11 +21,11 @@
#pragma once
#include
"castor/legacymsg/RmcProxy.hpp"
#include
"
castor/mediachanger/
LibrarySlot.hpp"
#include
"
castor/mediachanger/
MmcProxy.hpp"
#include
"
castor/mediachanger/
MmcProxyNotSupported.hpp"
#include
"castor/messages/AcsProxy.hpp"
#include
"
tapeserver/
castor/legacymsg/RmcProxy.hpp"
#include
"LibrarySlot.hpp"
#include
"MmcProxy.hpp"
#include
"MmcProxyNotSupported.hpp"
#include
"
tapeserver/
castor/messages/AcsProxy.hpp"
#include
<unistd.h>
#include
<sys/types.h>
...
...
tapeserver/castor/mediachanger/MmcProxy.hpp
View file @
bb5fd394
...
...
@@ -21,7 +21,7 @@
#pragma once
#include
"
castor/mediachanger/
ManualLibrarySlot.hpp"
#include
"ManualLibrarySlot.hpp"
#include
<string>
...
...
tapeserver/castor/mediachanger/MmcProxyLog.hpp
View file @
bb5fd394
...
...
@@ -22,7 +22,7 @@
#pragma once
#include
"common/log/Logger.hpp"
#include
"
castor/mediachanger/
MmcProxy.hpp"
#include
"MmcProxy.hpp"
namespace
castor
{
namespace
mediachanger
{
...
...
tapeserver/castor/mediachanger/MmcProxyNotSupported.hpp
View file @
bb5fd394
...
...
@@ -21,7 +21,7 @@
#pragma once
#include
"
castor/mediachanger/
MmcProxy.hpp"
#include
"MmcProxy.hpp"
namespace
castor
{
namespace
mediachanger
{
...
...
tapeserver/castor/mediachanger/ScsiLibrarySlot.hpp
View file @
bb5fd394
...
...
@@ -21,7 +21,7 @@
#pragma once
#include
"
castor/mediachanger/
LibrarySlot.hpp"
#include
"LibrarySlot.hpp"
#include
<stdint.h>
...
...
tapeserver/castor/messages/AcsProxy.hpp
View file @
bb5fd394
...
...
@@ -21,7 +21,7 @@
#pragma once
#include
"castor/mediachanger/AcsLibrarySlot.hpp"
#include
"
tapeserver/
castor/mediachanger/AcsLibrarySlot.hpp"
#include
<stdint.h>
#include
<string>
...
...
tapeserver/castor/messages/AcsProxyDummy.cpp
View file @
bb5fd394
...
...
@@ -19,7 +19,7 @@
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include
"
castor/messages/
AcsProxyDummy.hpp"
#include
"AcsProxyDummy.hpp"
//------------------------------------------------------------------------------
// mountTapeReadOnly
...
...
tapeserver/castor/messages/AcsProxyZmq.hpp
View file @
bb5fd394
...
...
@@ -21,10 +21,10 @@
#pragma once
#include
"
castor/messages/
AcsProxy.hpp"
#include
"
castor/messages/
Frame.hpp"
#include
"
castor/messages/
Mutex.hpp"
#include
"
castor/messages/
ZmqSocketMT.hpp"
#include
"AcsProxy.hpp"
#include
"Frame.hpp"
#include
"Mutex.hpp"
#include
"ZmqSocketMT.hpp"
namespace
castor
{
namespace
messages
{
...
...
tapeserver/castor/messages/Frame.hpp
View file @
bb5fd394
...
...
@@ -24,8 +24,8 @@
#pragma once
#include
"castor/messages/Header.pb.h"
#include
"
castor/messages/
ZmqMsg.hpp"
#include
"castor/utils/utils.hpp"
#include
"ZmqMsg.hpp"
#include
"
tapeserver/
castor/utils/utils.hpp"
#include
<google/protobuf/message.h>
#include
<string>
...
...
tapeserver/castor/messages/SmartZmqContext.cpp
View file @
bb5fd394
...
...
@@ -22,11 +22,14 @@
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include
"castor/messages/SmartZmqContext.hpp"
#include
"tapeserver/castor/messages/SmartZmqContext.hpp"
#include
"tapeserver/castor/utils/utils.hpp"
#include
"common/log/Logger.hpp"
#include
<errno.h>
#include
<unistd.h>
#include
<zmq.h>
#include
<list>
//-----------------------------------------------------------------------------
// constructor
...
...
@@ -106,3 +109,24 @@ void *castor::messages::SmartZmqContext::release() {
return
tmp
;
}
//-----------------------------------------------------------------------------
// release
//-----------------------------------------------------------------------------
void
*
castor
::
messages
::
SmartZmqContext
::
instantiateZmqContext
(
const
int
sizeOfIOThreadPoolForZMQ
,
cta
::
log
::
Logger
&
log
)
{
void
*
const
zmqContext
=
zmq_init
(
sizeOfIOThreadPoolForZMQ
);
if
(
NULL
==
zmqContext
)
{
const
std
::
string
message
=
castor
::
utils
::
errnoToString
(
errno
);
cta
::
exception
::
Exception
ex
;
ex
.
getMessage
()
<<
"Child of ProcessForker failed to instantiate ZMQ"
" context: "
<<
message
;
throw
ex
;
}
std
::
ostringstream
contextAddr
;
contextAddr
<<
std
::
hex
<<
zmqContext
;
std
::
list
<
cta
::
log
::
Param
>
params
=
{
cta
::
log
::
Param
(
"contextAddr"
,
contextAddr
.
str
())};
log
(
cta
::
log
::
INFO
,
"Child of ProcessForker instantiated a ZMQ context"
,
params
);
return
zmqContext
;
}
tapeserver/castor/messages/SmartZmqContext.hpp
View file @
bb5fd394
...
...
@@ -24,6 +24,7 @@
#pragma once
#include
"common/exception/NotAnOwner.hpp"
#include
"common/log/Logger.hpp"
#include
<stdio.h>
...
...
@@ -98,6 +99,16 @@ public:
* @return The released ZMQ context.
*/
void
*
release
()
;
/**
* Helper function instancing a ZMQ context.
* @param sizeOfIOThreadPoolForZMQ The size of the IO thread pool to be used
* by ZMQ.
* @param log a reference to the logger, provided by the caller.
* @return The ZMQ context.
*/
static
void
*
instantiateZmqContext
(
const
int
sizeOfIOThreadPoolForZMQ
,
cta
::
log
::
Logger
&
log
);
private:
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment