Skip to content
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

Do a full type detection when creating cache #527

Closed
wants to merge 2 commits into from

Conversation

Projects
None yet
4 participants
@mchf
Copy link
Member

commented Jan 5, 2017

It avoids ambiguous categorization of a device like in bsc#956755
another one: https://bugzilla.suse.com/show_bug.cgi?id=1061306

@mchf mchf force-pushed the mchf:bnc956755-type-detection branch from a9f7523 to 9feaedf Jan 5, 2017

@coveralls

This comment has been minimized.

Copy link

commented Jan 5, 2017

Coverage Status

Coverage remained the same at 51.395% when pulling 9feaedf on mchf:bnc956755-type-detection into 75a9162 on yast:master.

mchf added some commits Jan 4, 2017

Use full type detection when reading ifcfgs. bnc#956755
Read used type detection based on ifcfg content before. The user
 can easily get confused when having e.g. bridge over wlan in
such case. Bcs the device is cached as wlan when type is detected
according ifcfg but full detection reports that as bridge.

@mchf mchf force-pushed the mchf:bnc956755-type-detection branch from 9feaedf to 6bc62df Jan 5, 2017

@coveralls

This comment has been minimized.

Copy link

commented Jan 5, 2017

Coverage Status

Coverage remained the same at 51.399% when pulling 6bc62df on mchf:bnc956755-type-detection into 5fca6fb on yast:master.

@mvidner
Copy link
Member

left a comment

The change is short but I don't understand it. @teclator do you?


- bnc#956755
- Use full type detection when caching network configuration to
solve ambiguos configurations (like bridge over wlan).

This comment has been minimized.

Copy link
@mvidner

mvidner Jan 5, 2017

Member

ambiguous

But this is describing implementation details and tells the user nothing about the bug this is fixing or its symptoms.

This comment has been minimized.

Copy link
@mchf

mchf Jan 5, 2017

Author Member

This is an internal module which is used mainly by other yast parts. And the change is implementation detail bcs in perfect code internal sorting of NetworkInterfaces' cache would be really internal. Sadly we more or less expose it's organization, so any change in it is public as well.

@@ -789,7 +789,7 @@ def adapt_old_config!
# @param [Hash] a map with netconfig (ifcfg) configuration
#
def add_device(device, ifcfg)
devtype = GetTypeFromIfcfg(ifcfg) || GetType(device)
devtype = GetType(device)

This comment has been minimized.

Copy link
@mvidner

mvidner Jan 5, 2017

Member

When I want to understand the change, I look up the names in http://apitalism.herokuapp.com/?q=GetType
and get

I am still lost. What is the difference in the return value for this particular bug?

This comment has been minimized.

Copy link
@mchf

mchf Jan 5, 2017

Author Member

Difference is that GetTypeFromIfcfgOrName uses ifcfg file or name for device type detection. It is just a subset of whole type detection process which is implemented in GetType. GetType is the only function which should be present in public API (but it is not bcs of ycp). Particular example of collision is described in the commit message.

@mvidner

This comment has been minimized.

Copy link
Member

commented Jan 5, 2017

The test suite also has something to say, starting here.

@mchf

This comment has been minimized.

Copy link
Member Author

commented Jan 6, 2017

Regarding testsuite. It is failing only in old testsuite, I'll update "out" files.

@lslezak

This comment has been minimized.

Copy link
Member

commented Apr 3, 2017

@mchf what's the status of this?

@mchf

This comment has been minimized.

Copy link
Member Author

commented Nov 24, 2017

Will be replaced by an updated PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.