Lxd fixes #5164

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

tych0 commented Apr 14, 2016

lxd: use right config variable name for lxd bridge
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
@@ -27,6 +27,8 @@ const (
StatusCancelled = "Canceled"
StatusSuccess = "Success"
StatusFailure = "Failure"
+
+ DefaultLXDBridge = "lxdbr0"
@frobware

frobware Apr 14, 2016

Contributor

Alignment; go fmt?

@tych0

tych0 Apr 14, 2016

Contributor

We don't need it because of the \n.

lxd: get rid of fallback to lxcbr0
The fallback was buggy: lxdbr0 no longer starts automatically any more, so
we can't assume that statting the file exists.

This code is all mostly useless anyway as it was mostly for the transition
from lxcbr0 to lxdbr0. Let's just get rid of any concept of falling back
and just do what we did before.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
@@ -54,13 +54,9 @@ func (broker *lxdBroker) StartInstance(args environs.StartInstanceParams) (*envi
return nil, errors.New("starting lxd containers with networks is not supported yet")
}
machineId := args.InstanceConfig.MachineId
- bridgeDevice := broker.agentConfig.Value(agent.LxcBridge)
+ bridgeDevice := broker.agentConfig.Value(agent.LxdBridge)
@dimitern

dimitern Apr 14, 2016

Contributor

FWIW, as discussed on IRC - agent.LxcBridge is always empty, as it's not getting populated by providercommon.Bootstrap() used by most providers. So the if below is always going to succeed.

tests: remove unused import
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Contributor

tych0 commented Apr 14, 2016

This is against the wrong branch.

@tych0 tych0 closed this Apr 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment