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
states/network.py managed() - no way to manage IP aliases in 2014.7 #18168
Comments
I think it probably makes the most sense to update the state to match the new dictionary format. We'll definitely investigate this. |
Change the network lookup to be more robust and find aliases
Ok, that PR should do it, it checks for the interface in the nested data and does not make bad assumptions as to the presence of interfaces |
I was having the same issue with 2014.7.0 and downloaded https://raw.githubusercontent.com/saltstack/salt/2014.7/salt/states/network.py which contains your changes, and it did fix the issue for me. Interface aliases are working correctly again, at least on centos. Just chiming in to confirm this fixes the issue for me at least. |
@rallytime you have done exactly what was needed, it will work for sure. I will test this once it will be released in epel package. |
@aleksmm Awesome! Glad we could get that fixed up. |
@rallytime you may close the ticket, I will reopen in case it wont work. |
Sounds good! |
@rallytime Still seeing a problem here on Ubuntu 14.04 - could you re-open this issue? @thatch45 The problem: On each run, ----------
ID: eth1:0
Function: network.managed
Result: True
Comment: Interface eth1:0 is up to date.
Started: 15:55:19.641703
Duration: 340.381 ms
Changes:
----------
status:
Interface eth1:0 is up The problem seems to be caused by First I assumed this happened because
But after temporarily moving Running
So it looks like the problem lies in |
@eliasp Sorry I never responded here. What version of salt are you seeing this on? |
@rallytime Seeing this on:
|
Ok great thanks for the update! |
This problem also shows up in a slightly different scenario:
… instead of failing because |
Can you retest this issue on the latest 2015.5.2 to check that it is resolved, thanks, |
Same problem here on a RHEL5 box:
|
|
I'm also experiencing something I believe is related. My alias interfaces report a change ever highstate run, regardless if they have actually changed.
|
I too am having the same issue as @timwsuqld
|
This is now fixed on the head of develop. Please re-open if this issue arises again. |
Sorry for reviving this thread, but I do have a favor to ask. Could this please get backported to stable? I'd love to stop patching the module myself. Thanks in advance. |
@Foxlik just use Dynamic Module Distribution - no need to patch it manually every time you update. |
@eliasp ah, great idea. thanks. |
Lets consider this sls:
In 2014.1 you would have eth0 with 3 aliases on it because in modules/rh_ip.py up() it runs "ifup eth0:1" which legit on RHEL systems
In 2014.7 you cant do that anymore, because salt.utils.network.interfaces() returns new format of array:
Which in short is
{'lo':{}, 'eth0':{'secondary': [{'label': 'eth0:1'}, {'label': 'eth0:2'}]}
, so when you havestates/network.py, line 282:
interface_status = salt.utils.network.interfaces()[name].get('up')
you will get exception trying to get name="eth0:1" from the dict.Obviously the solution is either:
The text was updated successfully, but these errors were encountered: