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

Added disable-network-management environment flag #618

Merged

Conversation

dimitern
Copy link

A new environment config flag "disable-network-management" added,
which is false when missing and by default, but when it's "true":

  • MAAS provider is not creating a network bridge or bringing eth0
    up and down during cloudinit.
  • The networker worker is always run in safe mode, so no subsequent
    changes to the network config are made, or and ifup/ifdown commands
    will be run.

This is intended as a "safety switch" to workaround a few bugs happening
when using Juju on MAAS mostly, until Juju's network model works and integrates
better with MAAS. List of related bugs:

In any cases where MAAS and Juju are both trying to manage networking
on machines, set "disable-network-management: true" in your environments.yaml
file before bootstrap.

@@ -331,13 +343,13 @@ func (a *MachineAgent) APIWorker() (worker.Worker, error) {
})
// TODO (mfoord 8/8/2014) improve the way we detect networking capabilities. Bug lp:1354365
writeNetworkConfig := providerType == "maas"
if writeNetworkConfig {
if disableNetworkManagement || !writeNetworkConfig {
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, this influences my work, but looks like no problem.

Copy link
Author

Choose a reason for hiding this comment

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

It does indeed and once this lands, when "disable-network-management" is true, the environ capability for "requires safe networker" should always return true for all providers (i.e. first check if it's disabled, then the rest of the conditions).

Copy link
Contributor

Choose a reason for hiding this comment

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

So I have to postpone my PR until this landed. Wanted to push it yesterday, but due to the build problem I waited until now.

@themue
Copy link
Contributor

themue commented Aug 27, 2014

LGTM

@dimitern dimitern force-pushed the lp-1361374-disable-network-management-flag branch from 39377c9 to 79313fb Compare August 27, 2014 08:37
@dimitern
Copy link
Author

fixes-1341524
fixes-1345433
fixes-1353008
fixes-1361374
$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Aug 27, 2014

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

jujubot added a commit that referenced this pull request Aug 27, 2014
…gement-flag

Added disable-network-management environment flag

A new environment config flag "disable-network-management" added,
which is false when missing and by default, but when it's "true":
 * MAAS provider is not creating a network bridge or bringing eth0
   up and down during cloudinit.
 * The networker worker is always run in safe mode, so no subsequent
   changes to the network config are made, or and ifup/ifdown commands
   will be run.

This is intended as a "safety switch" to workaround a few bugs happening
when using Juju on MAAS mostly, until Juju's network model works and integrates
better with MAAS. List of related bugs:
 * http://pad.lv/1361374 - maas provider assumes machine uses dhcp for eth0
 * http://pad.lv/1353008 - MAAS Provider: LXC did not get DHCP address, stuck in "pending"
 * http://pad.lv/1345433 - cloud-init network error when using MAAS/juju
 * http://pad.lv/1341524 - juju/MAAS deployed host with bonding configured via preseed missing eth0 from bond on first boot

In any cases where MAAS and Juju are both trying to manage networking
on machines, set "disable-network-management: true" in your environments.yaml
file before bootstrap.
@jujubot jujubot merged commit 9ede28a into juju:master Aug 27, 2014
@dimitern dimitern deleted the lp-1361374-disable-network-management-flag branch August 27, 2014 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants