Review: Approve
Diff comments: > > === modified file 'lpbuildd/target/lxd.py' > --- lpbuildd/target/lxd.py 2018-06-12 23:23:13 +0000 > +++ lpbuildd/target/lxd.py 2018-10-25 09:55:10 +0000 > @@ -277,16 +277,30 @@ > old_profile.delete() > > raw_lxc_config = [ > - ("lxc.aa_profile", "unconfined"), > ("lxc.cap.drop", ""), > ("lxc.cap.drop", "sys_time sys_module"), > ("lxc.cgroup.devices.deny", ""), > ("lxc.cgroup.devices.allow", ""), > ("lxc.mount.auto", ""), > ("lxc.mount.auto", "proc:rw sys:rw"), > - ("lxc.network.0.ipv4", ipv4_address), > - ("lxc.network.0.ipv4.gateway", self.ipv4_network.ip), > ] > + > + lxc_version = self._client.host_info["environment"]["driver_version"] > + major, minor = [int(v) for v in lxc_version.split(".")[0:2]] > + > + if major >= 3: > + raw_lxc_config.extend([ > + ("lxc.apparmor.profile", "unconfined"), > + ("lxc.net.0.ipv4.address", ipv4_address), > + ("lxc.net.0.ipv4.gateway", self.ipv4_network.ip), > + ]) > + else: > + raw_lxc_config.extend([ > + ("lxc.aa_profile", "unconfined"), > + ("lxc.network.0.ipv4", ipv4_address), > + ("lxc.network.0.ipv4.gateway", self.ipv4_network.ip), > + ]) > + I tried, and then I realised that of course there are (intentionally) duplicate keys, so a dict doesn't make sense. Apologies for the misdirection; I'll leave this as it is. > # Linux 4.4 on powerpc doesn't support all the seccomp bits that LXD > # needs. > if self.arch == "powerpc": -- https://code.launchpad.net/~tobijk/launchpad-buildd/launchpad-buildd-bionic/+merge/354331 Your team Launchpad code reviewers is requested to review the proposed merge of lp:~tobijk/launchpad-buildd/launchpad-buildd-bionic into lp:launchpad-buildd. _______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp