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

[RFC] First impressions of the current network configuration status #729

Closed
wants to merge 2 commits into from

Conversation

@coveralls
Copy link

coveralls commented Feb 25, 2019

Coverage Status

Coverage increased (+0.1%) to 43.118% when pulling 1c2242a on doc_status into aadfe31 on master.

doc/status-current-code.md Outdated Show resolved Hide resolved
we could start splitting at least the presentation part from the different
models, and move some responsabilities that currently are part of the
dialogs to other place. (See for example controllers / actions in
storage-ng)
Copy link
Contributor

Choose a reason for hiding this comment

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

There are many nice examples on how storage-ng separates responsibilities and layers: models / dialogs / clients in the Y2Storage part or actions / dialogs / widgets in the Y2Partitioner part to name a couple... But the not-so-obvious relationships between actions and controllers is definitely not the best example of well engineered separation. 😉


The match between these different objects / hashes is based on the interface
or device name, and as we can see it has been one of me most common point of
failures in network configuration.
Copy link
Member

Choose a reason for hiding this comment

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

can you please add links to some well known bugs in network so we know which use cases we need to have in mind? Also one issue which is not mentioned here is problem that not all hwinfo need to have ifcfg file and so one, which sometimes causes problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, that is the main difference between virtual interfaces and phisical ones, and already described in Michal Zugec email link. So, will try to expand here in a way that the problems behind that are easy to expose and understand.

I will add also a section with the installation overview (not having a separation between the inst-sys network configuration and the proposal for the system being installed).

Copy link
Member

Choose a reason for hiding this comment

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

moreover Items use a useless layer of abstraction (item_id). Designing a structure where devices would be more easily accessible according its names would have bigger benefit (now we search such device with O(n) complexity)

doc/status-current-code.md Outdated Show resolved Hide resolved
- NetworkInterfaces (yast2): represent mainly the configured interfaces and is in
charge of writing the ifcfg-giles. The numbers of bugs in this area are not
so big, we have been dealing mostly with some normalization of the config or
better defaults like for wireless configuration.
Copy link
Member

Choose a reason for hiding this comment

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

Since fixing device renaming, NetworkInterfaces is calm place ... however it needs some love. Some methods should be revised if it should live in an upper layer. Some features should be redesigned (filtering devices according to name when filtering to device groups)

Copy link
Member

Choose a reason for hiding this comment

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

On the other hand this module will become less important in the future when we should support exporting device configuration in wicked's native xml.

Copy link
Member

Choose a reason for hiding this comment

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

So in the end we will need a support for sysconfig way of configuration (NetworkInterfaces), wicked's xml, ... so we can even think of at least partly supporting NetworkManager


So basically each LanItems Item has the information about its (hwinfo, ifcfg
file, [udev rules](udev-rules-implementation.org), and table description
(the overview))
Copy link
Member

Choose a reason for hiding this comment

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

and for example storing complete hwinfo for each interface is a bit overkill and causes a huge footprint. It is sad bcs in reality only two or three items are actively used.

@mchf
Copy link
Member

mchf commented Mar 8, 2019

Currently a big pain of networking code in my POV is that it mixes backend (controller) and UI (view) code together. It leads to methods with hundred lines with multiple exceptional handling like "if we need only backend functionality and no GUI, then don't show this popup"

reason of the new predictable network interfaces naming. Something we are
not prepared yet but which is already used in TW (we still offer to rename
the interfaces based on [udev rules](udev_rules.md) even when does not work
on this scenario)
Copy link
Member

Choose a reason for hiding this comment

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

well not prepared ... there is only one problematic part ... and that is transition (or creating) of configuration from instsys to installed target.


3. Duplication of code and bad methods naming, making it difficult to reuse or
understand if you do not know too deep about it. (It is also described in
the udev status document) [3]
Copy link
Member

Choose a reason for hiding this comment

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

naming is not that big problem for me, however some methods are definitely too complex and some still have undocumented side effects.


4. Some configuration workflow or interfaces should be revised or redesigned
as it is not clear enough how to set some of the most common options like
in wireless config. Not so far hostname setup has been already modified [4].
Copy link
Member

Choose a reason for hiding this comment

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

I'd vote for revising methods like ReadHardware. This beasts are really huge and just works ... somehow, but no one knows why ... and if it is still needed to do that way.

fragile and specially when remote installations are in use we do not want to
break current connections (for that maybe having a separation could help, but
this is only an idea that needs to be ellaborated / discussed than a real
problem).
Copy link
Member

Choose a reason for hiding this comment

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

a lot of configuration is stored in strange "global" variables which are wrongly maintained, for example it already happened that some variables was not cleared when configuration of device was canceled ... and configuration got (partly) written when whole module was closed by clicking [OK]

@imobachgs
Copy link
Contributor

Outdated and not relevant anymore.

@imobachgs imobachgs closed this Sep 18, 2019
@imobachgs imobachgs deleted the doc_status branch September 18, 2019 09:13
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.

None yet

6 participants