Commit 308db034 authored by Bernd Lietzow's avatar Bernd Lietzow 🐨

update to release 7.1.2

parent aa603ff6
...@@ -100,6 +100,10 @@ ifeq ($(BEEGFS_OPENTK_IBVERBS),1) ...@@ -100,6 +100,10 @@ ifeq ($(BEEGFS_OPENTK_IBVERBS),1)
BEEGFS_CFLAGS += -DBEEGFS_OPENTK_IBVERBS BEEGFS_CFLAGS += -DBEEGFS_OPENTK_IBVERBS
endif endif
ifneq ($(OFED_INCLUDE_PATH),)
BEEGFS_CFLAGS += -I$(OFED_INCLUDE_PATH)
endif
# OFED API version # OFED API version
ifneq ($(BEEGFS_OFED_1_2_API),) ifneq ($(BEEGFS_OFED_1_2_API),)
BEEGFS_CFLAGS += "-DBEEGFS_OFED_1_2_API=$(BEEGFS_OFED_1_2_API)" BEEGFS_CFLAGS += "-DBEEGFS_OFED_1_2_API=$(BEEGFS_OFED_1_2_API)"
......
...@@ -92,6 +92,10 @@ ifeq ($(BEEGFS_OPENTK_IBVERBS),1) ...@@ -92,6 +92,10 @@ ifeq ($(BEEGFS_OPENTK_IBVERBS),1)
BEEGFS_CFLAGS += -DBEEGFS_OPENTK_IBVERBS BEEGFS_CFLAGS += -DBEEGFS_OPENTK_IBVERBS
endif endif
ifneq ($(OFED_INCLUDE_PATH),)
BEEGFS_CFLAGS += -I$(OFED_INCLUDE_PATH)
endif
# OFED API version # OFED API version
ifneq ($(BEEGFS_OFED_1_2_API),) ifneq ($(BEEGFS_OFED_1_2_API),)
BEEGFS_CFLAGS += "-DBEEGFS_OFED_1_2_API=$(BEEGFS_OFED_1_2_API)" BEEGFS_CFLAGS += "-DBEEGFS_OFED_1_2_API=$(BEEGFS_OFED_1_2_API)"
......
...@@ -120,12 +120,12 @@ TimerQueue::TimerQueue(unsigned minPoolSize, unsigned maxPoolSize) ...@@ -120,12 +120,12 @@ TimerQueue::TimerQueue(unsigned minPoolSize, unsigned maxPoolSize)
TimerQueue::~TimerQueue() TimerQueue::~TimerQueue()
{ {
selfTerminate(); if (getID())
{ {
std::unique_lock<Mutex> lock(mutex); selfTerminate();
condition.signal(); condition.signal();
join();
} }
join();
for (auto it = workerPool.begin(); it != workerPool.end(); ++it) for (auto it = workerPool.begin(); it != workerPool.end(); ++it)
{ {
......
...@@ -37,7 +37,7 @@ class NodeStoreClients : public AbstractNodeStore ...@@ -37,7 +37,7 @@ class NodeStoreClients : public AbstractNodeStore
NodeMap activeNodes; NodeMap activeNodes;
virtual NumNodeID generateID(Node& node) const virtual NumNodeID generateID(Node& node)
{ {
return {}; return {};
} }
......
...@@ -48,6 +48,9 @@ class PThread ...@@ -48,6 +48,9 @@ class PThread
void join() void join()
{ {
if (!threadID)
throw PThreadException("Cannot join invalid thread.");
pthread_join(threadID, NULL); pthread_join(threadID, NULL);
} }
...@@ -56,6 +59,10 @@ class PThread ...@@ -56,6 +59,10 @@ class PThread
*/ */
bool timedjoin(int timeoutMS) bool timedjoin(int timeoutMS)
{ {
if (!threadID)
throw PThreadException("Cannot join invalid thread.");
struct timespec joinEndtime; struct timespec joinEndtime;
if(clock_gettime(CLOCK_REALTIME, &joinEndtime) ) if(clock_gettime(CLOCK_REALTIME, &joinEndtime) )
...@@ -82,11 +89,17 @@ class PThread ...@@ -82,11 +89,17 @@ class PThread
void terminate() void terminate()
{ {
if (!threadID)
throw PThreadException("Cannot terminate invalid thread.");
pthread_kill(threadID, SIGTERM); pthread_kill(threadID, SIGTERM);
} }
void kill() void kill()
{ {
if (!threadID)
throw PThreadException("Cannot kill invalid thread.");
pthread_kill(threadID, SIGKILL); pthread_kill(threadID, SIGKILL);
} }
......
...@@ -55,10 +55,12 @@ override_dh_install: ...@@ -55,10 +55,12 @@ override_dh_install:
install -D meta/build/dist/etc/init.d/beegfs-meta.init debian/beegfs-meta.init install -D meta/build/dist/etc/init.d/beegfs-meta.init debian/beegfs-meta.init
install -D mgmtd/build/dist/etc/init.d/beegfs-mgmtd.init debian/beegfs-mgmtd.init install -D mgmtd/build/dist/etc/init.d/beegfs-mgmtd.init debian/beegfs-mgmtd.init
install -D helperd/build/dist/etc/init.d/beegfs-helperd.init debian/beegfs-helperd.init install -D helperd/build/dist/etc/init.d/beegfs-helperd.init debian/beegfs-helperd.init
install -D mon/build/dist/etc/init.d/beegfs-mon.init debian/beegfs-mon.init
cat common_package/build/dist/etc/init.d/beegfs-service.init >> debian/beegfs-storage.init cat common_package/build/dist/etc/init.d/beegfs-service.init >> debian/beegfs-storage.init
cat common_package/build/dist/etc/init.d/beegfs-service.init >> debian/beegfs-meta.init cat common_package/build/dist/etc/init.d/beegfs-service.init >> debian/beegfs-meta.init
cat common_package/build/dist/etc/init.d/beegfs-service.init >> debian/beegfs-mgmtd.init cat common_package/build/dist/etc/init.d/beegfs-service.init >> debian/beegfs-mgmtd.init
cat common_package/build/dist/etc/init.d/beegfs-service.init >> debian/beegfs-helperd.init cat common_package/build/dist/etc/init.d/beegfs-service.init >> debian/beegfs-helperd.init
cat common_package/build/dist/etc/init.d/beegfs-service.init >> debian/beegfs-mon.init
@# daemon configs and defaults @# daemon configs and defaults
install -D -m644 storage/build/dist/etc/default/beegfs-storage \ install -D -m644 storage/build/dist/etc/default/beegfs-storage \
debian/beegfs-storage.default debian/beegfs-storage.default
...@@ -76,6 +78,10 @@ override_dh_install: ...@@ -76,6 +78,10 @@ override_dh_install:
debian/beegfs-helperd.default debian/beegfs-helperd.default
install -D -m644 helperd/build/dist/etc/beegfs-helperd.conf \ install -D -m644 helperd/build/dist/etc/beegfs-helperd.conf \
debian/beegfs-helperd/etc/beegfs/beegfs-helperd.conf debian/beegfs-helperd/etc/beegfs/beegfs-helperd.conf
install -D -m644 mon/build/dist/etc/default/beegfs-mon \
debian/beegfs-mon.default
install -D -m644 mon/build/dist/etc/beegfs-mon.conf \
debian/beegfs-mon/etc/beegfs/beegfs-mon.conf
@# admon is special @# admon is special
install -D admon/build/dist/etc/init.d/beegfs-admon.init debian/beegfs-admon.init install -D admon/build/dist/etc/init.d/beegfs-admon.init debian/beegfs-admon.init
#add the genric part of the init script from the common package #add the genric part of the init script from the common package
...@@ -113,6 +119,9 @@ override_dh_install: ...@@ -113,6 +119,9 @@ override_dh_install:
mkdir -p debian/beegfs-admon/var/lib/beegfs mkdir -p debian/beegfs-admon/var/lib/beegfs
# mongoose document root # mongoose document root
mkdir -p debian/beegfs-admon/var/lib/beegfs/www mkdir -p debian/beegfs-admon/var/lib/beegfs/www
@# mon
mkdir -p debian/beegfs-mon/opt/beegfs/lib/grafana
cp -a mon/scripts/grafana/* debian/beegfs-mon/opt/beegfs/lib/grafana
@# upgraders @# upgraders
install -D upgrade/beegfs_mirror_md/build/beegfs-mirror-md \ install -D upgrade/beegfs_mirror_md/build/beegfs-mirror-md \
debian/beegfs-mirror-md/opt/beegfs/sbin/beegfs-mirror-md debian/beegfs-mirror-md/opt/beegfs/sbin/beegfs-mirror-md
...@@ -210,7 +219,7 @@ override_dh_strip: ...@@ -210,7 +219,7 @@ override_dh_strip:
# avoid auto-start because default config is not useful # avoid auto-start because default config is not useful
override_dh_installinit: override_dh_installinit:
for component in storage meta mgmtd helperd; do \ for component in storage meta mgmtd helperd mon; do \
cp $$component/build/dist/usr/lib/systemd/system/beegfs-$$component.service debian/; \ cp $$component/build/dist/usr/lib/systemd/system/beegfs-$$component.service debian/; \
install -D -m644 $$component/build/dist/usr/lib/systemd/system/beegfs-$$component@.service \ install -D -m644 $$component/build/dist/usr/lib/systemd/system/beegfs-$$component@.service \
debian/beegfs-$$component/lib/systemd/system/beegfs-$$component@.service; \ debian/beegfs-$$component/lib/systemd/system/beegfs-$$component@.service; \
......
...@@ -77,7 +77,7 @@ App::App(int argc, char** argv) ...@@ -77,7 +77,7 @@ App::App(int argc, char** argv)
this->statsCollector = NULL; this->statsCollector = NULL;
this->internodeSyncer = NULL; this->internodeSyncer = NULL;
this->modificationEventFlusher = NULL; this->modificationEventFlusher = NULL;
this->timerQueue = NULL; this->timerQueue = new TimerQueue(1, 1);
this->buddyResyncer = NULL; this->buddyResyncer = NULL;
this->nextNumaBindTarget = 0; this->nextNumaBindTarget = 0;
...@@ -137,6 +137,8 @@ App::~App() ...@@ -137,6 +137,8 @@ App::~App()
SAFE_DELETE(this->cfg); SAFE_DELETE(this->cfg);
delete timerQueue;
Logger::destroyLogger(); Logger::destroyLogger();
closelog(); closelog();
} }
...@@ -831,8 +833,6 @@ void App::initComponents(TargetConsistencyState initialConsistencyState) ...@@ -831,8 +833,6 @@ void App::initComponents(TargetConsistencyState initialConsistencyState)
this->internodeSyncer = new InternodeSyncer(initialConsistencyState); this->internodeSyncer = new InternodeSyncer(initialConsistencyState);
this->timerQueue = new TimerQueue(1, 1);
this->modificationEventFlusher = new ModificationEventFlusher(); this->modificationEventFlusher = new ModificationEventFlusher();
workersInit(); workersInit();
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
const std::string QuotaManager::QUOTA_SAVE_DIR = "quota"; const std::string QuotaManager::QUOTA_SAVE_DIR = "quota";
const std::string QuotaManager::USER_LIMITS_FILENAME = "quotaUserLimits.store"; const std::string QuotaManager::USER_LIMITS_FILENAME = "quotaUserLimits.store";
const std::string QuotaManager::GROUP_LIMITS_FILENAME = "quotaUserLimits.store"; const std::string QuotaManager::GROUP_LIMITS_FILENAME = "quotaGroupLimits.store";
const std::string QuotaManager::DEFAULT_LIMITS_FILENAME = "quotaDefaultLimits.store"; const std::string QuotaManager::DEFAULT_LIMITS_FILENAME = "quotaDefaultLimits.store";
// relative paths inside mgmt directory // relative paths inside mgmt directory
......
...@@ -20,18 +20,18 @@ ...@@ -20,18 +20,18 @@
* *
* @return 0 if all available numIDs are currently assigned, so none are left * @return 0 if all available numIDs are currently assigned, so none are left
*/ */
NumNodeID NodeStoreClientsEx::generateID(Node& node) const NumNodeID NodeStoreClientsEx::generateID(Node& node)
{ {
// check whether this node's stringID is already associated with an active or deleted numID // check whether this node's stringID is already associated with an active or deleted numID
NumNodeID previousNumID = retrieveNumIDFromStringID(node.getID()); NumNodeID previousNumID = retrieveNumIDFromStringID(node.getID());
if (previousNumID) if (previousNumID)
return previousNumID; return previousNumID;
if (activeNodes.empty()) // generate increasing IDs until we read the u32 maximum. this should take a while.
return NumNodeID(1); if (lastUsedNumID.val() < NODESTORECLIENTS_MAX_ID) {
lastUsedNumID = NumNodeID(lastUsedNumID.val() + 1);
if (activeNodes.rbegin()->first.val() < NODESTORECLIENTS_MAX_ID) return lastUsedNumID;
return NumNodeID(activeNodes.rbegin()->first.val() + 1); }
if (activeNodes.begin()->first.val() > 1) if (activeNodes.begin()->first.val() > 1)
return NumNodeID(1); return NumNodeID(1);
...@@ -265,6 +265,9 @@ bool NodeStoreClientsEx::loadFromBuf(const char* buf, unsigned bufLen, bool v6Fo ...@@ -265,6 +265,9 @@ bool NodeStoreClientsEx::loadFromBuf(const char* buf, unsigned bufLen, bool v6Fo
IGNORE_UNUSED_VARIABLE(&nodeID); IGNORE_UNUSED_VARIABLE(&nodeID);
} }
if (!activeNodes.empty())
lastUsedNumID = activeNodes.rbegin()->first;
return true; return true;
} }
......
...@@ -19,7 +19,7 @@ class NodeStoreClientsEx : public NodeStoreClients ...@@ -19,7 +19,7 @@ class NodeStoreClientsEx : public NodeStoreClients
bool loadFromBuf(const char* buf, unsigned bufLen, bool v6Format); bool loadFromBuf(const char* buf, unsigned bufLen, bool v6Format);
ssize_t saveToBuf(boost::scoped_array<char>& buf); ssize_t saveToBuf(boost::scoped_array<char>& buf);
virtual NumNodeID generateID(Node& node) const override; virtual NumNodeID generateID(Node& node) override;
NumNodeID retrieveNumIDFromStringID(const std::string& nodeID) const; NumNodeID retrieveNumIDFromStringID(const std::string& nodeID) const;
public: public:
......
...@@ -11,27 +11,19 @@ StoragePoolEx::StoragePoolEx(StoragePoolId id, const std::string& description, ...@@ -11,27 +11,19 @@ StoragePoolEx::StoragePoolEx(StoragePoolId id, const std::string& description,
void StoragePoolEx::initQuota() void StoragePoolEx::initQuota()
{ {
if (!quotaUserLimits) quotaUserLimits = std::unique_ptr<QuotaStoreLimits>(new QuotaStoreLimits(
{ QuotaDataType_USER,
quotaUserLimits = std::unique_ptr<QuotaStoreLimits>(new QuotaStoreLimits( "QuotaUserLimits (Pool: " + id.str() + ")",
QuotaDataType_USER, USER_LIMITS_STORE_PATH(id.str())));
"QuotaUserLimits (Pool: " + id.str() + ")",
USER_LIMITS_STORE_PATH(id.str())));
}
if (!quotaGroupLimits)
{
quotaGroupLimits = std::unique_ptr<QuotaStoreLimits>(new QuotaStoreLimits(
QuotaDataType_GROUP,
"QuotaGroupLimits (Pool: " + id.str() + ")",
GROUP_LIMITS_STORE_PATH(id.str())));
}
if (!quotaDefaultLimits) quotaGroupLimits = std::unique_ptr<QuotaStoreLimits>(new QuotaStoreLimits(
{ QuotaDataType_GROUP,
quotaDefaultLimits = std::unique_ptr<QuotaDefaultLimits>(new QuotaDefaultLimits( "QuotaGroupLimits (Pool: " + id.str() + ")",
DEFAULT_LIMITS_STORE_PATH(id.str()))); GROUP_LIMITS_STORE_PATH(id.str())));
}
quotaDefaultLimits = std::unique_ptr<QuotaDefaultLimits>(new QuotaDefaultLimits(
DEFAULT_LIMITS_STORE_PATH(id.str())));
} }
void StoragePoolEx::clearQuota() void StoragePoolEx::clearQuota()
......
...@@ -1157,6 +1157,7 @@ boost::optional<std::map<uint16_t, std::unique_ptr<StorageTarget>>> App::preregi ...@@ -1157,6 +1157,7 @@ boost::optional<std::map<uint16_t, std::unique_ptr<StorageTarget>>> App::preregi
{ {
targets[newTargetNumID] = boost::make_unique<StorageTarget>(path, newTargetNumID, targets[newTargetNumID] = boost::make_unique<StorageTarget>(path, newTargetNumID,
*timerQueue, *mgmtNodes, *mirrorBuddyGroupMapper); *timerQueue, *mgmtNodes, *mirrorBuddyGroupMapper);
targets[newTargetNumID]->setCleanShutdown(StorageTk::checkSessionFileExists(path.str()));
} }
catch (const std::system_error& e) catch (const std::system_error& e)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment