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)
BEEGFS_CFLAGS += -DBEEGFS_OPENTK_IBVERBS
endif
ifneq ($(OFED_INCLUDE_PATH),)
BEEGFS_CFLAGS += -I$(OFED_INCLUDE_PATH)
endif
# OFED API version
ifneq ($(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)
BEEGFS_CFLAGS += -DBEEGFS_OPENTK_IBVERBS
endif
ifneq ($(OFED_INCLUDE_PATH),)
BEEGFS_CFLAGS += -I$(OFED_INCLUDE_PATH)
endif
# OFED API version
ifneq ($(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)
TimerQueue::~TimerQueue()
{
selfTerminate();
if (getID())
{
std::unique_lock<Mutex> lock(mutex);
selfTerminate();
condition.signal();
join();
}
join();
for (auto it = workerPool.begin(); it != workerPool.end(); ++it)
{
......
......@@ -37,7 +37,7 @@ class NodeStoreClients : public AbstractNodeStore
NodeMap activeNodes;
virtual NumNodeID generateID(Node& node) const
virtual NumNodeID generateID(Node& node)
{
return {};
}
......
......@@ -48,6 +48,9 @@ class PThread
void join()
{
if (!threadID)
throw PThreadException("Cannot join invalid thread.");
pthread_join(threadID, NULL);
}
......@@ -56,6 +59,10 @@ class PThread
*/
bool timedjoin(int timeoutMS)
{
if (!threadID)
throw PThreadException("Cannot join invalid thread.");
struct timespec joinEndtime;
if(clock_gettime(CLOCK_REALTIME, &joinEndtime) )
......@@ -82,11 +89,17 @@ class PThread
void terminate()
{
if (!threadID)
throw PThreadException("Cannot terminate invalid thread.");
pthread_kill(threadID, SIGTERM);
}
void kill()
{
if (!threadID)
throw PThreadException("Cannot kill invalid thread.");
pthread_kill(threadID, SIGKILL);
}
......
......@@ -55,10 +55,12 @@ override_dh_install:
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 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-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-helperd.init
cat common_package/build/dist/etc/init.d/beegfs-service.init >> debian/beegfs-mon.init
@# daemon configs and defaults
install -D -m644 storage/build/dist/etc/default/beegfs-storage \
debian/beegfs-storage.default
......@@ -76,6 +78,10 @@ override_dh_install:
debian/beegfs-helperd.default
install -D -m644 helperd/build/dist/etc/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
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
......@@ -113,6 +119,9 @@ override_dh_install:
mkdir -p debian/beegfs-admon/var/lib/beegfs
# mongoose document root
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
install -D upgrade/beegfs_mirror_md/build/beegfs-mirror-md \
debian/beegfs-mirror-md/opt/beegfs/sbin/beegfs-mirror-md
......@@ -210,7 +219,7 @@ override_dh_strip:
# avoid auto-start because default config is not useful
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/; \
install -D -m644 $$component/build/dist/usr/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)
this->statsCollector = NULL;
this->internodeSyncer = NULL;
this->modificationEventFlusher = NULL;
this->timerQueue = NULL;
this->timerQueue = new TimerQueue(1, 1);
this->buddyResyncer = NULL;
this->nextNumaBindTarget = 0;
......@@ -137,6 +137,8 @@ App::~App()
SAFE_DELETE(this->cfg);
delete timerQueue;
Logger::destroyLogger();
closelog();
}
......@@ -831,8 +833,6 @@ void App::initComponents(TargetConsistencyState initialConsistencyState)
this->internodeSyncer = new InternodeSyncer(initialConsistencyState);
this->timerQueue = new TimerQueue(1, 1);
this->modificationEventFlusher = new ModificationEventFlusher();
workersInit();
......
......@@ -16,7 +16,7 @@
const std::string QuotaManager::QUOTA_SAVE_DIR = "quota";
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";
// relative paths inside mgmt directory
......
......@@ -20,18 +20,18 @@
*
* @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
NumNodeID previousNumID = retrieveNumIDFromStringID(node.getID());
if (previousNumID)
return previousNumID;
if (activeNodes.empty())
return NumNodeID(1);
if (activeNodes.rbegin()->first.val() < NODESTORECLIENTS_MAX_ID)
return NumNodeID(activeNodes.rbegin()->first.val() + 1);
// generate increasing IDs until we read the u32 maximum. this should take a while.
if (lastUsedNumID.val() < NODESTORECLIENTS_MAX_ID) {
lastUsedNumID = NumNodeID(lastUsedNumID.val() + 1);
return lastUsedNumID;
}
if (activeNodes.begin()->first.val() > 1)
return NumNodeID(1);
......@@ -265,6 +265,9 @@ bool NodeStoreClientsEx::loadFromBuf(const char* buf, unsigned bufLen, bool v6Fo
IGNORE_UNUSED_VARIABLE(&nodeID);
}
if (!activeNodes.empty())
lastUsedNumID = activeNodes.rbegin()->first;
return true;
}
......
......@@ -19,7 +19,7 @@ class NodeStoreClientsEx : public NodeStoreClients
bool loadFromBuf(const char* buf, unsigned bufLen, bool v6Format);
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;
public:
......
......@@ -11,27 +11,19 @@ StoragePoolEx::StoragePoolEx(StoragePoolId id, const std::string& description,
void StoragePoolEx::initQuota()
{
if (!quotaUserLimits)
{
quotaUserLimits = std::unique_ptr<QuotaStoreLimits>(new QuotaStoreLimits(
QuotaDataType_USER,
"QuotaUserLimits (Pool: " + id.str() + ")",
USER_LIMITS_STORE_PATH(id.str())));
}
quotaUserLimits = std::unique_ptr<QuotaStoreLimits>(new QuotaStoreLimits(
QuotaDataType_USER,
"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)
{
quotaDefaultLimits = std::unique_ptr<QuotaDefaultLimits>(new QuotaDefaultLimits(
DEFAULT_LIMITS_STORE_PATH(id.str())));
}
quotaGroupLimits = std::unique_ptr<QuotaStoreLimits>(new QuotaStoreLimits(
QuotaDataType_GROUP,
"QuotaGroupLimits (Pool: " + id.str() + ")",
GROUP_LIMITS_STORE_PATH(id.str())));
quotaDefaultLimits = std::unique_ptr<QuotaDefaultLimits>(new QuotaDefaultLimits(
DEFAULT_LIMITS_STORE_PATH(id.str())));
}
void StoragePoolEx::clearQuota()
......
......@@ -1157,6 +1157,7 @@ boost::optional<std::map<uint16_t, std::unique_ptr<StorageTarget>>> App::preregi
{
targets[newTargetNumID] = boost::make_unique<StorageTarget>(path, newTargetNumID,
*timerQueue, *mgmtNodes, *mirrorBuddyGroupMapper);
targets[newTargetNumID]->setCleanShutdown(StorageTk::checkSessionFileExists(path.str()));
}
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