Skip to content
This repository was archived by the owner on Apr 16, 2026. It is now read-only.

Commit 813c597

Browse files
committed
Fix xCAT Installation
1 parent 68fcf5c commit 813c597

File tree

10 files changed

+108
-80
lines changed

10 files changed

+108
-80
lines changed

rpmspecs/opencattus.spec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Name: opencattus-installer-debug
22
Version: 1.0
3-
Release: 5
3+
Release: 6
44
Summary: OpenCATTUS Installer
55
License: Apache 2.0
66
URL: https://versatushpc.com.br/opencattus/
@@ -49,7 +49,9 @@ install -m 644 repos/rocky-vault.conf %{buildroot}/opt/cloysterhpc/conf/repos/ro
4949
/opt/cloysterhpc/conf/repos/rocky-vault.conf
5050

5151
%changelog
52-
* Thu Sep 16 2025 Daniel Hilst <daniel@versatushpc.com.br> - 1.0-6 - Support Confluent
52+
* Thu Sep 16 2025 Daniel Hilst <daniel@versatushpc.com.br> - 1.0-6 - xCAT bugfixes
53+
- Fix xCAT installation after adding Confluent
54+
* Thu Sep 16 2025 Daniel Hilst <daniel@versatushpc.com.br> - 1.0-5 - Support Confluent
5355
- Add support to the Lenovo HPC Confluent provisioner
5456
- Add --roles command line
5557
* Thu Aug 14 2025 Daniel Hilst <daniel@versatushpc.com.br> - 1.0-4 - Bugfix

src/diskImage.cpp

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <cloysterhpc/services/options.h>
1414
#include <cloysterhpc/services/cache.h>
1515
#include <cloysterhpc/utils/singleton.h>
16+
#include <cloysterhpc/utils/optional.h>
1617
#include <unordered_map>
1718

1819
// @FIXME: This file need some work
@@ -39,7 +40,7 @@ void DiskImage::setPath(const std::filesystem::path& path)
3940

4041
bool DiskImage::isKnownImage(const std::filesystem::path& path)
4142
{
42-
constexpr auto chooseDistro = [](std::string_view imageView)
43+
constexpr auto toDistroImage = [](std::string_view imageView)
4344
-> std::optional<cloyster::models::OS::Distro> {
4445
if (imageView.starts_with("Rocky")) {
4546
return cloyster::models::OS::Distro::Rocky;
@@ -49,33 +50,24 @@ bool DiskImage::isKnownImage(const std::filesystem::path& path)
4950
return cloyster::models::OS::Distro::OL;
5051
} else if (imageView.starts_with("AlmaLinux")) {
5152
return cloyster::models::OS::Distro::AlmaLinux;
52-
} else {
53-
return std::nullopt;
5453
}
54+
return std::nullopt;
5555
};
5656

5757
for (const auto& image : m_knownImageFilename) {
5858
if (path.filename().string() == image) {
5959
LOG_TRACE("Disk image is recognized")
6060

6161
auto imageView = std::string_view(image);
62-
const auto distro = chooseDistro(imageView);
63-
if (distro) {
64-
m_distro = distro;
62+
m_distro = toDistroImage(imageView);
63+
if (m_distro.has_value()) {
6564
return true;
6665
}
6766
}
6867
}
69-
70-
const auto distro
71-
= chooseDistro(std::string_view(path.filename().string()));
72-
if (distro) {
73-
m_distro = distro;
74-
return true;
75-
}
76-
cloyster::functions::abort(
77-
"Disk image is unknown. Maybe you're using a custom image or "
78-
"changed the default name?");
68+
m_distro = toDistroImage(path.filename().string());
69+
LOG_TRACE("Disk image is unknown. Maybe you're using a custom image or "
70+
"changed the default name?");
7971
return false;
8072
}
8173

src/ofed.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ void OFED::install() const
118118
runner->checkCommand("dnf makecache --repo=doca*");
119119
runner->checkCommand("dnf install --nogpg -y doca-ofed mlnx-fw-updater");
120120
runner->executeCommand("systemctl restart openibd");
121+
// runner->executeCommand("systemctl enable --now opensmd");
121122
} break;
122123

123124
case OFED::Kind::Oracle:

src/services/ansible/roles/base.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ namespace cloyster::services::ansible::roles::base {
2222
ScriptBuilder installScript(
2323
const Role& role, const cloyster::models::OS& osinfo)
2424
{
25-
LOG_DEBUG("Running base role");
2625
using namespace cloyster;
2726
ScriptBuilder builder(osinfo);
2827

@@ -36,10 +35,15 @@ ScriptBuilder installScript(
3635
case models::OS::Distro::Rocky:
3736
case models::OS::Distro::AlmaLinux:
3837
LOG_DEBUG("Running base role");
39-
builder.addPackage("epel-release");
4038
break;
4139

4240
case models::OS::Distro::OL:
41+
// @FIXME: This breaks the RepoManager logic. Package installing
42+
// repository files at /etc/yum.repos.d/, may install repositories
43+
// using metalink or mirrorlist, which triggers a bug in RepoManager
44+
// when the xCAT image is being generated. The RepoManager only
45+
// supports baseurl for now, metalink and mirror lists trigger a
46+
// bad optional access during runtime.
4347
switch (osinfo.getPlatform()) {
4448
case models::OS::Platform::el8:
4549
builder.addPackage("oracle-epel-release-el8");

src/services/ansible/roles/network.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void configureManagementNetwork(const Connection& connection)
4343
{
4444
const std::string_view ipv6Method = cluster()->getProvisioner()
4545
== cloyster::models::Cluster::Provisioner::xCAT
46-
? "diabled"
46+
? "disabled"
4747
: "link-local";
4848

4949
auto interface = connection.getInterface().value();
@@ -69,7 +69,7 @@ nmcli connection add type {type} mtu {mtu} ifname {iface} con-name {conn_name} \
6969
ipv4.ignore-auto-routes yes \
7070
ipv6.method {ipv6_method}
7171
sleep 0.2
72-
nmcli -w 10 device connect {iface}
72+
nmcli device connect {iface}
7373
)",
7474
fmt::arg("iface", interface),
7575
fmt::arg("conn_name", connectionName),
@@ -105,7 +105,7 @@ nmcli connection add type {type} mtu {mtu} ifname {iface} con-name {conn_name} \
105105
ipv4.ignore-auto-dns yes \
106106
ipv4.ignore-auto-routes yes \
107107
sleep 0.2
108-
nmcli -w 10 device connect {iface}
108+
nmcli device connect {iface}
109109
)",
110110
fmt::arg("iface", interface),
111111
fmt::arg("conn_name", connectionName),
@@ -140,7 +140,7 @@ nmcli connection add type {type} mtu {mtu} ifname {iface} con-name {conn_name} \
140140
ipv4.ignore-auto-dns yes \
141141
ipv4.ignore-auto-routes yes \
142142
sleep 0.2
143-
nmcli -w 10 device connect {iface}
143+
nmcli device connect {iface}
144144
)",
145145
fmt::arg("iface", interface),
146146
fmt::arg("conn_name", connectionName),
@@ -218,13 +218,15 @@ namespace cloyster::services::ansible::roles::network {
218218

219219
void run(const Role& role)
220220
{
221-
const auto connections = cluster()->getHeadnode().getConnections();
222-
LOG_INFO("Setting up networks")
221+
LOG_INFO("Setting up networks, use `--skip network` to skip")
222+
if (utils::singleton::options()->shouldSkip("network")) {
223+
return;
224+
}
223225

226+
const auto connections = cluster()->getHeadnode().getConnections();
224227
configureNetworks(connections);
225228
configureFQDN();
226229
configureHostsFile();
227-
228230
}
229231

230232
}

src/services/ansible/roles/ofed.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ namespace cloyster::services::ansible::roles::ofed {
2828

2929
void run(const Role& role)
3030
{
31+
LOG_INFO("Setting up Infiniband, use `--skip infiniband` to skip");
32+
if (cloyster::utils::singleton::options()->shouldSkip("infiniband")) {
33+
return;
34+
}
3135
configureInfiniband();
3236
}
3337

src/services/ansible/roles/provisioner.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ void run(const Role& role)
2424
} else if (provisioner == "xcat") {
2525
roles::run(Roles::XCAT, osinfo);
2626
} else {
27-
cloyster::functions::abort("Expecing xcat or confluent at system.provisioner, found: {}", provisioner);
27+
cloyster::functions::abort("Expecing xcat or confluent at "
28+
"[system].provisioner, found: {}, at {}",
29+
provisioner, utils::singleton::answerfile()->path());
2830
}
2931
}
3032

src/services/ansible/roles/spack.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ ScriptBuilder installScript(
2121
using namespace cloyster;
2222
ScriptBuilder builder(osinfo);
2323

24+
LOG_INFO("Setting up Spack, use `--skip spack` to skip");
25+
if (utils::singleton::options()->shouldSkip("spack")) {
26+
return builder;
27+
}
28+
2429
LOG_ASSERT(role.roleName() == "spack",
2530
fmt::format("Expected spack role, found {}", role.roleName()));
2631

0 commit comments

Comments
 (0)