Skip to content

Conversation

minglumlu
Copy link
Member

This is a simplified version of commit 846ce82. The feature introduced that commit is to remove the network device renaming functionality. When the feature is merged, there will be 3 states of releases:

  1. without the feature.
  2. with the feature but renaming is still working.
  3. with the feature and renaming has been removed.

Originally, the upgrade path was intended to support transitions from state 2 to state 3 only. However, it has become necessary to also support upgrades directly from state 1 to state 3.

This commit is to enable the release in state 1 to upgrade to state 3. The change is kept extremely small so it can be merged independently without waiting for the full feature to be merged.

In details, during the upgrade, the host-installer can't know the management interface as the eth will not present in the environment the host-installer running. So it needs the MAC address to find out the management interface for setting up network.

in
Printf.printf "interfaces=%s\n" (String.concat "," ifaces) ;
Printf.printf "hwaddrs=%s\n"
(String.concat "," (Option.to_list bridge_config.bridge_mac)) ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just the fallback case of 846ce82. As I understand, it is enough for host installer. Then if 846ce82 is still needed?
Another point, can we get the mac addresses in host installer from interface-rename-data at the mount point? If can, we will not rely on a middle version in XS8.

Copy link
Member Author

@minglumlu minglumlu Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It's enough for host installer but not from the utility's perspective. The utility can be used independently as well.

Another point, can we get the mac addresses in host installer from interface-rename-data at the mount point?

It's possible but it would get the host installer changed too much - mounting the partition in that place. The networkd_db utility seems the best to get the information even in the future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me have a try on host installer. I think the file can be retrieved at that point.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type of bridge_mac is string option, so String.concat "," (Option.to_list ... is a little odd. What about Option.value ~default:""?

@psafont
Copy link
Member

psafont commented Aug 27, 2025

This PR needs a rebase on top of the latest master to pass the required tests

@minglumlu minglumlu force-pushed the private/mingl/CP-309523 branch from 1ef3968 to 99dbe56 Compare September 1, 2025 06:37
This is a simplified version of commit 846ce82. The feature
introduced that commit is to remove the network device renaming
functionality. When the feature is merged, there will be 3 states of
releases:
1. without the feature.
2. with the feature but renaming is still working.
3. with the feature and renaming has been removed.

Originally, the upgrade path was intended to support transitions from
state 2 to state 3 only. However, it has become necessary to also
support upgrades directly from state 1 to state 3.

This commit is to enable the release in state 1 to upgrade to state 3.
The change is kept extremely small so it can be merged independently
without waiting for the full feature to be merged.

In details, during the upgrade, the host-installer can't know the
management interface as the eth<N> will not present in the environment
the host-installer running. So it needs the MAC address to find out the
management interface for setting up network.

Signed-off-by: Ming Lu <[email protected]>
@minglumlu minglumlu force-pushed the private/mingl/CP-309523 branch from 99dbe56 to 31b8461 Compare September 3, 2025 07:19
@robhoes robhoes added this pull request to the merge queue Sep 3, 2025
Merged via the queue into xapi-project:master with commit c2c0422 Sep 3, 2025
15 checks passed
changlei-li added a commit to changlei-li/xen-api that referenced this pull request Sep 9, 2025
Conflict between xapi-project#6637 and xapi-project#6466. The PR xapi-project#6637 on master is a
simplified version of PR xapi-project#6466 for upgrade from master to feature
version.
To solve the conflict, keep xapi-project#6466.
changlei-li added a commit to changlei-li/xen-api that referenced this pull request Sep 9, 2025
Conflict between xapi-project#6637 and xapi-project#6466. The PR xapi-project#6637 on master is a
simplified version of PR xapi-project#6466 for upgrade from master to feature
version.
To solve the conflict, keep xapi-project#6466, drop xapi-project#6637.

Signed-off-by: Changlei Li <[email protected]>
changlei-li added a commit that referenced this pull request Sep 9, 2025
Conflict between #6637 and #6466. The PR #6637 on master is a simplified
version of PR #6466 for upgrade from master to feature version.
To solve the conflict, keep #6466, drop #6637.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants