-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #185 from leil-io/release/v4.5.0
Main changes for Release v4.5.0: * fix(mount): Set default cacheExpirationTime to 0 (#180) * feat(mount): Add readcachemaxsize option (#145) * feat(master): Add empty reserved files option (#176) * fix(mount): Fix random case option parsing (#135) * feat(chunkserver): Add IDiskManager::getDiskForGC (#169) * test: Improve `stop_ganesha()` function (#168) * fix(ci): Modify timeout from env (#165) * ci: Fix tests behavior (#172) * fix(uraft): Fix missing floating ip address * fix(mount): Fix create time (Windows) (#167) * feat(admin): Add list-disk-groups command (#155) * ci: Abort previous concurrent tests * ci: Update de base docker image on build * fix(tests): Fix typo in setup-machine script * fix(tests): Amend upgrade tests (#146) * fix: Update services to wait for network (#151) * fix: Update uraft service to restart on failure (#153) * fix: Release compilation on GCC 14 (#148) * feat(chunkserver): Extend IDiskManager interface (#143) * test: Verify master loading legacy metadata * feat: Load legacy metadata file * fix: Allow legacy sessions download * fix: Allow legacy metadata download
- Loading branch information
Showing
80 changed files
with
1,048 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,30 @@ | ||
saunafs (4.5.0) stable; urgency=medium | ||
* fix(mount): Set default cacheExpirationTime to 0 (#180) | ||
* feat(mount): Add readcachemaxsize option (#145) | ||
* feat(master): Add empty reserved files option (#176) | ||
* fix(mount): Fix random case option parsing (#135) | ||
* feat(chunkserver): Add IDiskManager::getDiskForGC (#169) | ||
* test: Improve `stop_ganesha()` function (#168) | ||
* fix(ci): Modify timeout from env (#165) | ||
* ci: Fix tests behavior (#172) | ||
* fix(uraft): Fix missing floating ip address | ||
* fix(mount): Fix create time (Windows) (#167) | ||
* feat(admin): Add list-disk-groups command (#155) | ||
* ci: Abort previous concurrent tests | ||
* ci: Update de base docker image on build | ||
* fix(tests): Fix typo in setup-machine script | ||
* fix(tests): Amend upgrade tests (#146) | ||
* fix: Update services to wait for network (#151) | ||
* fix: Update uraft service to restart on failure (#153) | ||
* fix: Release compilation on GCC 14 (#148) | ||
* feat(chunkserver): Extend IDiskManager interface (#143) | ||
* test: Verify master loading legacy metadata | ||
* feat: Load legacy metadata file | ||
* fix: Allow legacy sessions download | ||
* fix: Allow legacy metadata download | ||
|
||
-- SaunaFS Team <[email protected]> Thu, 05 Sep 2024 14:23:04 +0000 | ||
|
||
saunafs (4.4.0) stable; urgency=medium | ||
* ci(.github): Add check for Conventional Commits (#131) | ||
* feat(metrics): Add initial prometheus support (#98) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
/* | ||
Copyright 2023 Leil Storage OÜ | ||
This file is part of SaunaFS. | ||
SaunaFS is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, version 3. | ||
SaunaFS is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with SaunaFS. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "common/platform.h" | ||
|
||
#include <yaml-cpp/yaml.h> | ||
#include <iostream> | ||
|
||
#include "admin/list_chunkservers_command.h" | ||
#include "admin/list_disk_groups_command.h" | ||
#include "common/saunafs_version.h" | ||
#include "common/serialization.h" | ||
#include "common/server_connection.h" | ||
|
||
std::string ListDiskGroupsCommand::name() const { return "list-disk-groups"; } | ||
|
||
void ListDiskGroupsCommand::usage() const { | ||
std::cerr << name() << " <master ip> <master port>\n"; | ||
std::cerr << " Prints disk groups configuration in chunkservers.\n"; | ||
} | ||
|
||
void ListDiskGroupsCommand::run(const Options &options) const { | ||
if (options.arguments().size() != 2) { | ||
throw WrongUsageException( | ||
"Expected <master ip> and <master port> for " + name()); | ||
} | ||
|
||
auto chunkservers = ListChunkserversCommand::getChunkserversList( | ||
options.argument(0), options.argument(1)); | ||
|
||
YAML::Emitter yaml; | ||
yaml << YAML::BeginMap; // start root map | ||
|
||
yaml << YAML::Key << "chunkservers"; | ||
yaml << YAML::Value << YAML::BeginSeq; // start chunkservers list | ||
|
||
for (const auto &chunkserver : chunkservers) { | ||
if (chunkserver.version == kDisconnectedChunkserverVersion) { | ||
continue; // skip disconnected chunkservers | ||
} | ||
|
||
std::vector<uint8_t> request; | ||
std::vector<uint8_t> response; | ||
serializeLegacyPacket(request, CLTOCS_ADMIN_LIST_DISK_GROUPS); | ||
|
||
auto csAddress = | ||
NetworkAddress(chunkserver.servip, chunkserver.servport); | ||
ServerConnection connection(csAddress); | ||
response = connection.sendAndReceive(request, | ||
CSTOCL_ADMIN_LIST_DISK_GROUPS); | ||
|
||
std::string info; | ||
|
||
try { | ||
deserializeAllLegacyPacketDataNoHeader(response, info); | ||
} catch (const IncorrectDeserializationException &e) { | ||
std::cerr << e.what() << "\n"; | ||
continue; | ||
} | ||
|
||
yaml << YAML::BeginMap; // start chunkserver map | ||
yaml << YAML::Key << "chunkserver"; | ||
yaml << YAML::Value << csAddress.toString(); | ||
|
||
static constexpr const char *kDiskGroupsKey = "disk_groups"; | ||
yaml << YAML::Key << kDiskGroupsKey; | ||
|
||
YAML::Node diskGroups = YAML::Load(info); | ||
|
||
if (diskGroups.IsMap() && diskGroups[kDiskGroupsKey]) { | ||
yaml << YAML::Value << diskGroups[kDiskGroupsKey]; | ||
} else { | ||
yaml << YAML::Value << info; | ||
} | ||
|
||
yaml << YAML::EndMap; // end chunkserver map | ||
} | ||
|
||
yaml << YAML::EndSeq; // end chunkservers list | ||
yaml << YAML::EndMap; // end root map | ||
|
||
std::cout << yaml.c_str() << "\n"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
Copyright 2023 Leil Storage OÜ | ||
This file is part of SaunaFS. | ||
SaunaFS is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, version 3. | ||
SaunaFS is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with SaunaFS. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "common/platform.h" | ||
|
||
#include "admin/saunafs_admin_command.h" | ||
|
||
class ListDiskGroupsCommand : public SaunaFsAdminCommand { | ||
public: | ||
std::string name() const override; | ||
void usage() const override; | ||
void run(const Options& options) const override; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.