-
Notifications
You must be signed in to change notification settings - Fork 107
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
Role not idempotent for infiniband interface #277
Comments
@thom311 do you have an idea? |
I'd like to be able to trace down the error myself here to try and give a more precise description of the problem (if any), but I've gotten stuck right now coming up against function calls out to the libnm python interface. I was trying to drill into the function:
and I can see from the docs for the libnm python interface there is the useful looking function: https://lazka.github.io/pgi-docs/#NM-1.0/classes/Connection.html#NM.Connection.diff so I've been naively trying to use this to figure out what is different for this IB interface adding the following lines into the 'connection_compare' function:
however this gives me an error:
so I suspect I'm not using this function correctly, but I'm not sure what I should be passing for 'out_settings' here. I wondered if you might have a hint for me on how I can debug this possibly? Thanks again! |
@mjrasobarnett it seems that |
I fail to annotate
should work, but it doesn't. that means, the function cannot be called from python. |
enable |
Thanks a lot for looking into this for me. I've enabled TRACE logging, and I've captured the following for my server when this is executed and the profile is updated:
One line that caught my eye is:
I'm not quite sure why though, as the log doesn't show any values changing. I'll test some more with other interfaces to see what I can find. |
it tells you that NM thinks that the properties |
Yes this looks to be the issue, I added a couple of lines to dump all the parameters of the 'con_cur' and 'con_new' connections, and comparing them shows:
So when it's doing 'connection_create', for some reason these 802-3-ethernet fields are not created. I can't see anything in the ansible module setting these fields directly though, so perhaps this is an issue in libnm? From observing what happens when changing values on an ethernet interface on the same host, I can see that these settings appear in the connection object in 'connection_create' after the lines:
|
Ah, adding in a quick workaround in the form:
Appears to fix the behaviour. |
this is indeed very likely a bug in NetworkManager. Still, maybe the role should try to workaround it. The roles main goal is to create a well-define profile. To always add an ethernet section to an infiniband profile, seems in general desirable to me. |
From my testing, The speed and mac of IPoIB is not changebale. The MTU should be done by |
from the information here I don't understand who/where the I agree with Gris, that the infiniband profile probably should not have such a setting, but where does it come from? |
Hello,
I've been trying out this role against a server that has both ethernet and infiniband interfaces, and I've found that the infiniband interface is continually updated on every run.
I am using the role with the following variables:
The remote host is a RHEL7.8 system, and I'm using the latest tag of this repo, v1.2.0 with ansible 2.9.10.
The 'Configure networking connection profiles' task always shows as changed, with the following in the stderr returned:
I've been attempting to trace the behaviour through the module code on the remote host, and I can see that the key check is inside the 'run_action_present' function of the Cmd_nm class, where,
self.nmutil.connection_compare is returning false.
I've been trying to observe why this is, but it's becoming difficult as I think this function is then using python bindings from NetworkManager itself to compare the two connection objects, and I haven't been able to follow what happens at this point.
I was wondering if someone might be able to offer any guidance on what might be the issue here, and how I could observe the state perhaps to see why it keeps trying to update this IB connection continuously?
Many thanks,
Matt
The text was updated successfully, but these errors were encountered: