-
Notifications
You must be signed in to change notification settings - Fork 292
CP-54441 Adapt interface ordering in xe-reset-networking #6544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CP-54441 Adapt interface ordering in xe-reset-networking #6544
Conversation
networkd write management_interface here https://github.com/xapi-project/xen-api/blob/feature/host-network-device-ordering/ocaml/networkd/lib/network_config.ml#L181-L812 |
8fff11c
to
33e349f
Compare
# NOTE: Only correct when interface-rename script exists | ||
if vlan != None: | ||
return 'xentemp' | ||
if device[:3] == 'eth': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this use a regexp to make sure the entire string has an expected format? I think it's risky to check a part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me check if we have a stricter check when generate bridge name in xapi code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not consistent about converting interface name to bridge name in OCaml code. One is based on start_with, one is based on sscanf "eth%d%!" which is stricter. I will raise another PR to improve this as well as this python script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See first commit in #6556
If interface-rename script doesn't exist, networkd will - handle the interfaces sorting - write inventory when first boot So, when interface-rename doesn't exist, xe-reset-networking should: - NOT call interface-rename script - Delete MANAGEMENT_INTERFACE value in inventory. BTW, the current bridge name conversion method rely on hardcode 'eth' which is correct only when interface-rename script exists. Signed-off-by: Changlei Li <changlei.li@cloud.com>
On XS 8, `service xapi stop` redirect to `systemctl`. On XS 9, `service` is not supported. So use `systemctl` to stop xapi service. Signed-off-by: Changlei Li <changlei.li@cloud.com>
33e349f
to
cb365f2
Compare
4c1d034
into
xapi-project:feature/host-network-device-ordering
If interface-rename script doesn't exist, networkd will
So, when interface-rename doesn't exist, xe-reset-networking should:
BTW, the current bridge name conversion method rely on hardcode 'eth' which is correct only when interface-rename script exists.