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

Accelerated up autoconfig #240

Merged
merged 3 commits into from
Sep 3, 2014
Merged

Conversation

mchf
Copy link
Member

@mchf mchf commented Sep 1, 2014

bnc#886434

@mchf mchf force-pushed the bnc886434-speed-up-autoconfig branch from 979385c to 934d11d Compare September 1, 2014 19:26
# @return true if configuration was reloaded
def reload_config(devs)
return false if devs.nil? || devs.empty?
SCR.Execute(BASH_PATH, "wicked ifreload '#{devs.join(" ")}'") == 0
Copy link
Member

Choose a reason for hiding this comment

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

Just to be sure: Does wicked really take the device list in a single parameter with space separator? I'd expect multiple parameters or comma as a separator...

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd expect multiple parameters
this one

@mchf mchf force-pushed the bnc886434-speed-up-autoconfig branch from 934d11d to 70f3c7f Compare September 1, 2014 20:01
# Reloads configuration for each device named in devs
#
# @devs list of device names
# @return true if configuration was reloaded
Copy link
Member

Choose a reason for hiding this comment

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

But you are not using this return value! Overspecifying only adds work without adding value.

@mvidner
Copy link
Member

mvidner commented Sep 2, 2014

Please pardon me for dissecting a simple PR. If you are in a hurry, just call so. I believe that thinking about the interface of the methods early will make our work easier when we have to revisit them. So, don't bother specifying the return value here, but be even more specific about the input.

@mchf
Copy link
Member Author

mchf commented Sep 3, 2014

Well the intention was to have a quick fix, but i want to have at least new parts of yast2 lan in good shape, so I've updated the code a bit more.

@mchf mchf force-pushed the bnc886434-speed-up-autoconfig branch from 70f3c7f to fa00ac5 Compare September 3, 2014 07:33
@@ -194,7 +198,11 @@ def target_servers
# Check if given device can reach some of reference servers
def set_default_route_flag_if_wan_dev?(devname)
set_default_route_flag(devname, "yes")
activate_changes([devname])

if !activate_changes([devname])
Copy link
Member

Choose a reason for hiding this comment

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

OK. One last thing, now that we do use the return value of activate_changes, that method should be documented to return a boolean status.

@mchf mchf force-pushed the bnc886434-speed-up-autoconfig branch from fa00ac5 to 7921cfd Compare September 3, 2014 07:53
@mvidner
Copy link
Member

mvidner commented Sep 3, 2014

LGTM, thank you. There should be no problems resolving the conflict with master.

Configuration used to be reloaded one-by-one for multiple devices.
Reload is issued just once since now.
@mchf mchf force-pushed the bnc886434-speed-up-autoconfig branch from 7921cfd to 0dc09b3 Compare September 3, 2014 08:12
@mchf
Copy link
Member Author

mchf commented Sep 3, 2014

Rebased.

Thanks for reviews

mchf added a commit that referenced this pull request Sep 3, 2014
@mchf mchf merged commit 0abb334 into yast:master Sep 3, 2014
@mchf mchf deleted the bnc886434-speed-up-autoconfig branch September 3, 2014 08:29
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.

3 participants