TeflonDon94 commented on PR #11193:
URL: https://github.com/apache/cloudstack/pull/11193#issuecomment-6824113700
Hi @DaanHoogland @nvazquez
we're in the process of evaluating Cloudstack in combination with XCP-ng/XOA.
Initially I have ran into the same issue as others have mentioned, being
that we cannot add hosts and see in the cloudstack logs that it fails when
adding a host that has it's management with a VLAN tagged.
I have then spent some time (not a developer) building a package (by pulling
your test-pr-11193 repo), through maven. Deploying it to my test VM running
cloudstack. It did not work initially, but after some vibe coding, I was able
to move past the error concerning the VLAN.
If I recall correctly, the issue was tied to a mismatch in the version. Even
though we run v8.3 XCP-ng, the host' major API version is v2. After some vibe
coding again, I was able to build a new package, where I was able to bypass the
VLAN check issue.
Here is the diff from the pull request:
```
diff --git
a/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
b/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
index cdb4d7434a..172e796a49 100644
---
a/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
+++
b/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
@@ -2785,7 +2785,17 @@ public abstract class CitrixResourceBase extends
ServerResourceBase implements S
for (final PIF pif : hostPifs) {
final PIF.Record rec = pif.getRecord(conn);
if (rec.management) {
- if (rec.VLAN != null && rec.VLAN != -1) {
+ boolean vlanMgmtSupported = false;
+ try {
+ final java.util.Map<String, String> sw =
host.getSoftwareVersion(conn);
+ final String productVersion = sw.get("product_version");
+ if (productVersion != null) {
+ vlanMgmtSupported =
Integer.parseInt(productVersion.split("\\.")[0]) >= 8;
+ }
+ } catch (final Exception e) {
+ logger.warn("Could not determine product version of
host " + _host.getUuid() + "; assuming VLAN management network is unsupported",
e);
+ }
+ if (!vlanMgmtSupported && rec.VLAN != null && rec.VLAN !=
-1) {
final String msg = "Unsupported configuration.
Management network is on a VLAN. host=" + _host.getUuid() + "; pif=" +
rec.uuid +
"; vlan=" + rec.VLAN;
logger.warn(msg);
diff --git
a/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixSetupCommandWrapper.java
b/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixSetupCommandWrapper.java
index 57daba4da4..9dc5a781f5 100644
---
a/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixSetupCommandWrapper.java
+++
b/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixSetupCommandWrapper.java
@@ -104,7 +104,17 @@ public final class CitrixSetupCommandWrapper extends
CommandWrapper<SetupCommand
for (final PIF pif : hostPifs) {
final PIF.Record rec = pif.getRecord(conn);
if (rec.management) {
- if (rec.VLAN != null && rec.VLAN != -1) {
+ boolean vlanMgmtSupported = false;
+ try {
+ final java.util.Map<String, String> sw =
host.getSoftwareVersion(conn);
+ final String productVersion =
sw.get("product_version");
+ if (productVersion != null) {
+ vlanMgmtSupported =
Integer.parseInt(productVersion.split("\\.")[0]) >= 8;
+ }
+ } catch (final Exception e) {
+ logger.warn("Could not determine product
version of host " + citrixResourceBase.getHost().getUuid() + "; assuming VLAN
management network is unsupported", e);
+ }
+ if (!vlanMgmtSupported && rec.VLAN != null &&
rec.VLAN != -1) {
final String msg =
new StringBuilder("Unsupported
configuration. Management network is on a VLAN.
host=").append(citrixResourceBase.getHost().getUuid())
.append("; pif=")
```
After fixing some stuff (unsure if related or a mess I made):
1. vue.config.js: Updated the publicPath setting from './' to '/client/' so
that static assets and router paths map correctly under CloudStack's /client/
context.
2. config.json: Verified and configured the frontend runtime settings,
including apiBase pointing to "/client/api".
3. Frontend Build Assets (dist/ folder): Recompiled the Vue.js bundle and
deployed the static files (js/, css/, assets/, index.html) directly into the
management server's webapp directory (/usr/share/cloudstack-management/webapp/).
...I was able to add the host, all be it with a new kind of error:
> 2026-11-12 13:14:29,782 WARN [c.c.r.ResourceManagerImpl]
(qtp253011924-342:[ctx-xxxxxxx, ctx-xxxxxxxx) (logid:xxxxxxx) Unable to connect
due to com.cloud.exception.ConnectionException: Incorrect Network setup on
agent, Reinitialize agent after network names are setup, details : For Physical
Network id:200, Private Network is not configured on the backend by name
cloudbr0
I revalidated the steps that are to be performed according to the guides of
Cloudstack for XCP-ng, but I have not found anything that i'd miss in there.
Anyway, I don't know if the new error is correlated to the vibe coding (as I
said, not a developer myself), but for us, it's safe to say that the product is
not where we want it to be yet, to invest more time into it. We will look
forward to pushing it down the road and hopefully the tests I've done, can help
others.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]