Merge lp://qastaging/~bjornt/maas/reset-network-config into lp://qastaging/~maas-committers/maas/trunk

Proposed by Björn Tillenius
Status: Merged
Approved by: Björn Tillenius
Approved revision: no longer in the source branch.
Merged at revision: 6054
Proposed branch: lp://qastaging/~bjornt/maas/reset-network-config
Merge into: lp://qastaging/~maas-committers/maas/trunk
Diff against target: 343 lines (+115/-17)
7 files modified
src/maasserver/api/machines.py (+2/-0)
src/maasserver/api/tests/test_machine.py (+6/-0)
src/maasserver/models/node.py (+14/-0)
src/maasserver/models/tests/test_node.py (+73/-1)
src/metadataserver/builtin_scripts/hooks.py (+8/-3)
src/metadataserver/builtin_scripts/tests/test_hooks.py (+7/-12)
src/provisioningserver/refresh/node_info_scripts.py (+5/-1)
To merge this branch: bzr merge lp://qastaging/~bjornt/maas/reset-network-config
Reviewer Review Type Date Requested Status
Mike Pontillo (community) Approve
Review via email: mp+324173@code.qastaging.launchpad.net

Commit message

When resetting the network configuration over the API, remove all
network interfaces that weren't detected during commissioning.

Description of the change

When resetting the network configuration over the API, remove all
network interfaces that weren't detected during commissioning.

I did it by re-running the hooks for the commissioning script that
detects the network interfaces. It was mentiond that maasserver
shouldn't import from metadata server, but I did that for now, since we
seem to have quite a few such imports already. But I'd be happy to move
code before merging, if you tell me where it should live.

I also fixed a bug where set_initial_networking_configuration would add
an additional IP to the boot interface every time it was called,
resulting in a growing list of alias interfaces when the network
configuration was reset.

To post a comment you must log in.
Revision history for this message
Mike Pontillo (mpontillo) wrote :

Looks good in general. I've got a couple minor issues below, but I'll trust you to resolve them before you land this.

review: Approve
Revision history for this message
Björn Tillenius (bjornt) :
Revision history for this message
MAAS Lander (maas-lander) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
MAAS Lander (maas-lander) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.