[Cloud-init-dev] [Merge] ~utlemming/cloud-init:lp-1676908-nic_selection_for_meta_data into cloud-init:master
Ben Howard has proposed merging ~utlemming/cloud-init:lp-1676908-nic_selection_for_meta_data into cloud-init:master. Requested reviews: cloud init development team (cloud-init-dev) Server Team CI bot (server-team-bot): continuous-integration For more details, see: https://code.launchpad.net/~utlemming/cloud-init/+git/cloud-init-1/+merge/322397 -- Your team cloud init development team is requested to review the proposed merge of ~utlemming/cloud-init:lp-1676908-nic_selection_for_meta_data into cloud-init:master. diff --git a/cloudinit/sources/helpers/digitalocean.py b/cloudinit/sources/helpers/digitalocean.py index 72f7bde..8d3d52a 100644 --- a/cloudinit/sources/helpers/digitalocean.py +++ b/cloudinit/sources/helpers/digitalocean.py @@ -23,11 +23,8 @@ def assign_ipv4_link_local(nic=None): """ if not nic: -for cdev in sorted(cloudnet.get_devicelist()): -if cloudnet.is_physical(cdev): -nic = cdev -LOG.debug("assigned nic '%s' for link-local discovery", nic) -break +nic = get_link_local_nic() +LOG.debug("selected interface '%s' for reading metadata" % nic) if not nic: raise RuntimeError("unable to find interfaces to access the" @@ -57,6 +54,13 @@ def assign_ipv4_link_local(nic=None): return nic +def get_link_local_nic(): +nics = [f for f in cloudnet.get_devicelist() if cloudnet.is_physical(f)] +if not nics: +return None +return min(nics, key=lambda d: cloudnet.read_sys_net_int(d, 'ifindex')) + + def del_ipv4_link_local(nic=None): """Remove the ip4LL address. While this is not necessary, the ip4LL address is extraneous and confusing to users. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] ~utlemming/cloud-init:lp-1676908-nic_selection_for_meta_data into cloud-init:master
The proposal to merge ~utlemming/cloud-init:lp-1676908-nic_selection_for_meta_data into cloud-init:master has been updated. Status: Needs review => Superseded For more details, see: https://code.launchpad.net/~utlemming/cloud-init/+git/cloud-init-1/+merge/322385 -- Your team cloud init development team is requested to review the proposed merge of ~utlemming/cloud-init:lp-1676908-nic_selection_for_meta_data into cloud-init:master. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] ~utlemming/cloud-init:lp-1676908-nic_selection_for_meta_data into cloud-init:master
Ben Howard has proposed merging ~utlemming/cloud-init:lp-1676908-nic_selection_for_meta_data into cloud-init:master. Requested reviews: cloud init development team (cloud-init-dev) Related bugs: Bug #1676908 in cloud-init: "DigitalOcean network improvements" https://bugs.launchpad.net/cloud-init/+bug/1676908 For more details, see: https://code.launchpad.net/~utlemming/cloud-init/+git/cloud-init-1/+merge/322385 -- Your team cloud init development team is requested to review the proposed merge of ~utlemming/cloud-init:lp-1676908-nic_selection_for_meta_data into cloud-init:master. diff --git a/cloudinit/sources/helpers/digitalocean.py b/cloudinit/sources/helpers/digitalocean.py index 72f7bde..3fbe83c 100644 --- a/cloudinit/sources/helpers/digitalocean.py +++ b/cloudinit/sources/helpers/digitalocean.py @@ -23,11 +23,17 @@ def assign_ipv4_link_local(nic=None): """ if not nic: -for cdev in sorted(cloudnet.get_devicelist()): +cindex = -1 +for cdev in cloudnet.get_devicelist(): if cloudnet.is_physical(cdev): -nic = cdev -LOG.debug("assigned nic '%s' for link-local discovery", nic) -break +ifindex = cloudnet.read_sys_net_int(cdev, 'ifindex') +if (cindex == -1 or ( +cindex != -1 and ifindex < cindex)): +msg = ("'%s' is a candidate for metadata discovery with " + "an index of %s.") +LOG.debug(msg % (cdev, ifindex)) +nic = cdev +cindex = ifindex if not nic: raise RuntimeError("unable to find interfaces to access the" ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
Re: [Cloud-init-dev] [Merge] ~utlemming/cloud-init:lp-1676908-nic_selection_for_meta_data into cloud-init:master
Re-worked interface selection for IPv4LL address. -- https://code.launchpad.net/~utlemming/cloud-init/+git/cloud-init-1/+merge/322385 Your team cloud init development team is requested to review the proposed merge of ~utlemming/cloud-init:lp-1676908-nic_selection_for_meta_data into cloud-init:master. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
Re: [Cloud-init-dev] [Merge] ~utlemming/cloud-init:lp-1676908 into cloud-init:master
This updated MP includes the requested stricter NIC handling for https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/321623 -- https://code.launchpad.net/~utlemming/cloud-init/+git/cloud-init-1/+merge/322321 Your team cloud init development team is requested to review the proposed merge of ~utlemming/cloud-init:lp-1676908 into cloud-init:master. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] ~utlemming/cloud-init:lp-1676908 into cloud-init:master
The proposal to merge ~utlemming/cloud-init:lp-1676908 into cloud-init:master has been updated. Status: Needs review => Superseded For more details, see: https://code.launchpad.net/~utlemming/cloud-init/+git/cloud-init-1/+merge/321183 -- Your team cloud init development team is requested to review the proposed merge of ~utlemming/cloud-init:lp-1676908 into cloud-init:master. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
Re: [Cloud-init-dev] [Merge] ~smoser/cloud-init:feature/digital-ocean-more-strict into cloud-init:master
Review: Needs Fixing While I like the change in general, I've dropped the nic mapping in my MP submitted on 3/28. -- https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/321623 Your team cloud init development team is requested to review the proposed merge of ~smoser/cloud-init:feature/digital-ocean-more-strict into cloud-init:master. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] ~utlemming/cloud-init:lp-1676908 into cloud-init:master
The proposal to merge ~utlemming/cloud-init:lp-1676908 into cloud-init:master has been updated. Description changed to: This is a request to merge the improvements to the DigitalOcean datasource. The changes: - No longer bind the nameservers to a specific interface to bring it inline with the other DataSources like OpenStack and SmartOS. - Fix mis-binding the IPV4all address to a secondary interface by considering 'eth0' or 'ens3' first - Consider all network definitions, not just 'public' or 'private'. For more details, see: https://code.launchpad.net/~utlemming/cloud-init/+git/cloud-init-1/+merge/321183 -- Your team cloud init development team is requested to review the proposed merge of ~utlemming/cloud-init:lp-1676908 into cloud-init:master. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] ~utlemming/cloud-init:utl/docker into cloud-init:master
Ben Howard has proposed merging ~utlemming/cloud-init:utl/docker into cloud-init:master. Requested reviews: cloud init development team (cloud-init-dev) For more details, see: https://code.launchpad.net/~utlemming/cloud-init/+git/cloud-init-1/+merge/321026 Added a Dockerfile and make targets for testing in Docker. This allows for an easier developer expperience (i.e. Mac users) to do development and then run through tests locally via `make docker `. -- Your team cloud init development team is requested to review the proposed merge of ~utlemming/cloud-init:utl/docker into cloud-init:master. diff --git a/HACKING.rst b/HACKING.rst index caee7ac..fa2816e 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -34,6 +34,12 @@ Do these things once .. _contributor-agreement-canonical: https://launchpad.net/%7Econtributor-agreement-canonical/+members .. _Launchpad git documentation: https://help.launchpad.net/Code/Git +Optional Docker Build/Test +== + +If you want to use a Docker "build/test" environment, an Dockerfile is in `tools/Dockerfile`. On a GNU system, you can generate the Docker Container by running `make docker_container`. After you have the container, you can run `make docker ` where target is defined in the Makefile. + + Do these things for each feature or bug === diff --git a/Makefile b/Makefile index 5940ed7..207b49b 100644 --- a/Makefile +++ b/Makefile @@ -84,6 +84,12 @@ rpm: deb: ./packages/bddeb +docker_container: + docker build -f tools/Dockerfile -t cloudinit-dev . + +docker: + docker run -t --rm -v $(CWD):/work cloudinit-dev $${2} + .PHONY: test pyflakes pyflakes3 clean pep8 rpm deb yaml check_version .PHONY: pip-test-requirements pip-requirements clean_pyc unittest unittest3 .PHONY: style-check diff --git a/tools/Dockerfile b/tools/Dockerfile new file mode 100644 index 000..ef081fe --- /dev/null +++ b/tools/Dockerfile @@ -0,0 +1,54 @@ +FROM ubuntu:zesty + +VOLUME /work + +RUN apt-get -y update && \ +apt-get -y dist-upgrade && \ + apt-get install -y \ +debhelper \ +devscripts \ +dh-systemd \ +dpkg-dev \ +pyflakes \ +python \ +python-coverage \ +python-flake8 \ +python-hacking \ +python-httpretty \ +python-jsonpatch \ +python-mock \ +python-nose \ +python-pip \ +python-pyflakes \ +python-requests \ +python-setuptools \ +python-six \ +python-unittest2 \ +python-yaml \ +python3 \ +python3-coverage \ +python3-flake8 \ +python3-hacking \ +python3-httpretty \ +python3-jsonpatch \ +python3-mock \ +python3-nose \ +python3-pip \ +python3-pyflakes \ +python3-requests \ +python3-setuptools \ +python3-six \ +python3-unittest2 \ +python3-yaml \ +tox \ +ubuntu-dev-tools + +COPY requirements.txt /tmp +RUN /usr/bin/pip3 install -r /tmp/requirements.txt +RUN /usr/bin/pip install -r /tmp/requirements.txt + +RUN apt-get -y clean + +WORKDIR /work +ENTRYPOINT ["make"] +CMD [] ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] ~utlemming/cloud-init:master into cloud-init:master
The proposal to merge ~utlemming/cloud-init:master into cloud-init:master has been updated. Description changed to: Fix for LP: #1675571 affecting DigitalOcean. This moves the nameserver from the first NIC definition to being bound on the loopback device. For more details, see: https://code.launchpad.net/~utlemming/cloud-init/+git/cloud-init-1/+merge/321001 -- Your team cloud init development team is requested to review the proposed merge of ~utlemming/cloud-init:master into cloud-init:master. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] ~utlemming/cloud-init:master into cloud-init:master
Ben Howard has proposed merging ~utlemming/cloud-init:master into cloud-init:master. Requested reviews: cloud init development team (cloud-init-dev) For more details, see: https://code.launchpad.net/~utlemming/cloud-init/+git/cloud-init-1/+merge/321001 Fix for LP: #1637290 affecting DigitalOcean. -- Your team cloud init development team is requested to review the proposed merge of ~utlemming/cloud-init:master into cloud-init:master. diff --git a/cloudinit/sources/helpers/digitalocean.py b/cloudinit/sources/helpers/digitalocean.py index 72f7bde..a9f1816 100644 --- a/cloudinit/sources/helpers/digitalocean.py +++ b/cloudinit/sources/helpers/digitalocean.py @@ -10,6 +10,7 @@ from cloudinit import net as cloudnet from cloudinit import url_helper from cloudinit import util +FIRST_NICS = ['eth0', 'ens3'] NIC_MAP = {'public': 'eth0', 'private': 'eth1'} LOG = logging.getLogger(__name__) @@ -22,8 +23,13 @@ def assign_ipv4_link_local(nic=None): address is random. """ +# if there is an eth0, then it has already been mapped from ens3 to eth0 +c_devs = FIRST_NICS +c_devs.extend([x for x in sorted(cloudnet.get_devicelist()) + if x not in FIRST_NICS]) + if not nic: -for cdev in sorted(cloudnet.get_devicelist()): +for cdev in c_devs: if cloudnet.is_physical(cdev): nic = cdev LOG.debug("assigned nic '%s' for link-local discovery", nic) @@ -107,15 +113,12 @@ def convert_network_configuration(config, dns_servers): } """ -def _get_subnet_part(pcfg, nameservers=None): +def _get_subnet_part(pcfg): subpart = {'type': 'static', 'control': 'auto', 'address': pcfg.get('ip_address'), 'gateway': pcfg.get('gateway')} -if nameservers: -subpart['dns_nameservers'] = nameservers - if ":" in pcfg.get('ip_address'): subpart['address'] = "{0}/{1}".format(pcfg.get('ip_address'), pcfg.get('cidr')) @@ -124,15 +127,13 @@ def convert_network_configuration(config, dns_servers): return subpart -all_nics = [] -for k in ('public', 'private'): -if k in config: -all_nics.extend(config[k]) - -macs_to_nics = cloudnet.get_interfaces_by_mac() nic_configs = [] +macs_to_nics = cloudnet.get_interfaces_by_mac() +LOG.debug("nic mapping: %s", macs_to_nics) -for nic in all_nics: +for n in config: +nic = config[n][0] +LOG.debug("considering %s", nic) mac_address = nic.get('mac') sysfs_name = macs_to_nics.get(mac_address) @@ -157,13 +158,8 @@ def convert_network_configuration(config, dns_servers): continue sub_part = _get_subnet_part(raw_subnet) -if nic_type == 'public' and 'anchor' not in netdef: -# add DNS resolvers to the public interfaces only -sub_part = _get_subnet_part(raw_subnet, dns_servers) -else: -# remove the gateway any non-public interfaces -if 'gateway' in sub_part: -del sub_part['gateway'] +if netdef in ('private', 'anchor_ipv4', 'anchor_ipv6'): +del sub_part['gateway'] subnets.append(sub_part) @@ -171,6 +167,10 @@ def convert_network_configuration(config, dns_servers): nic_configs.append(ncfg) LOG.debug("nic '%s' configuration: %s", if_name, ncfg) +if dns_servers: +LOG.debug("added dns servers") +nic_configs.append({'type': 'nameserver', 'address': dns_servers}) + return {'version': 1, 'config': nic_configs} diff --git a/tests/unittests/test_datasource/test_digitalocean.py b/tests/unittests/test_datasource/test_digitalocean.py index 9be6bc1..1e3b9f3 100644 --- a/tests/unittests/test_datasource/test_digitalocean.py +++ b/tests/unittests/test_datasource/test_digitalocean.py @@ -204,17 +204,24 @@ class TestNetworkConvert(TestCase): netcfg = self._get_networking() self.assertIsNotNone(netcfg) -for nic_def in netcfg.get('config'): -print(json.dumps(nic_def, indent=3)) -n_type = nic_def.get('type') -n_subnets = nic_def.get('type') -n_name = nic_def.get('name') -n_mac = nic_def.get('mac_address') +for part in netcfg.get('config'): +print(json.dumps(part, indent=3)) +n_type = part.get('type') + +if n_type == 'nameserver': +n_address = part.get('address') +self.assertIsNotNone(n_address) +self.assertEquals(len(n_address), 3) + +else: +n_subnets = part.get('type') +n_name = part.get
Re: [Cloud-init-dev] [Merge] lp:~utlemming/cloud-init/digitalocean into lp:cloud-init
Updated the provider and changed util. I also push it to [1], but I can't make sense of the Launchpad/Git MP process. [1] https://code.launchpad.net/~utlemming/+git/cloud-init/+ref/digitalocean -- https://code.launchpad.net/~utlemming/cloud-init/digitalocean/+merge/301123 Your team cloud init development team is requested to review the proposed merge of lp:~utlemming/cloud-init/digitalocean into lp:cloud-init. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] lp:~utlemming/cloud-init/digitalocean into lp:cloud-init
Ben Howard has proposed merging lp:~utlemming/cloud-init/digitalocean into lp:cloud-init. Requested reviews: cloud init development team (cloud-init-dev) For more details, see: https://code.launchpad.net/~utlemming/cloud-init/digitalocean/+merge/301123 This request comprises two commits to the DigitalOcean provider. Commit 1259: Update to the JSON meta-data endpoint - Per the API documentation, the JSON endpoint is the preferred method of getting the metadata. - Use the SMBIOS information to determine if the droplet ID has changed. In certain circumstances a droplet that is either migrated or snapshotted may not have metadata via the metadata URL. The droplets identity is authoritatively embedded in the SMBIOS. - Only hit the Metadata URL if the droplet identifies as being on DigitalOcean Commit 1260: Update the tests cases. -- Your team cloud init development team is requested to review the proposed merge of lp:~utlemming/cloud-init/digitalocean into lp:cloud-init. === modified file 'cloudinit/sources/DataSourceDigitalOcean.py' --- cloudinit/sources/DataSourceDigitalOcean.py 2016-05-12 17:56:26 + +++ cloudinit/sources/DataSourceDigitalOcean.py 2016-07-25 23:38:22 + @@ -1,6 +1,7 @@ # vi: ts=4 expandtab # #Author: Neal Shrader <n...@digitalocean.com> +#Author: Ben Howard <b...@digitalocean.com> # #This program is free software: you can redistribute it and/or modify #it under the terms of the GNU General Public License version 3, as @@ -14,22 +15,27 @@ #You should have received a copy of the GNU General Public License #along with this program. If not, see <http://www.gnu.org/licenses/>. -from cloudinit import ec2_utils +# DigitalOcean Droplet API: +# https://developers.digitalocean.com/documentation/metadata/ + from cloudinit import log as logging +from cloudinit import util from cloudinit import sources -from cloudinit import util - -import functools - +from cloudinit import url_helper + +import json +import os LOG = logging.getLogger(__name__) BUILTIN_DS_CONFIG = { -'metadata_url': 'http://169.254.169.254/metadata/v1/', -'mirrors_url': 'http://mirrors.digitalocean.com/' +'metadata_url': 'http://169.254.169.254/metadata/v1.json', } -MD_RETRIES = 0 -MD_TIMEOUT = 1 + +# Wait for a up to a minute, retrying the meta-data server +# every 2 seconds. +MD_RETRIES = 30 +MD_TIMEOUT = 2 class DataSourceDigitalOcean(sources.DataSource): @@ -40,43 +46,67 @@ util.get_cfg_by_path(sys_cfg, ["datasource", "DigitalOcean"], {}), BUILTIN_DS_CONFIG]) self.metadata_address = self.ds_cfg['metadata_url'] - -if self.ds_cfg.get('retries'): -self.retries = self.ds_cfg['retries'] -else: -self.retries = MD_RETRIES - -if self.ds_cfg.get('timeout'): -self.timeout = self.ds_cfg['timeout'] -else: -self.timeout = MD_TIMEOUT - -def get_data(self): -caller = functools.partial(util.read_file_or_url, - timeout=self.timeout, retries=self.retries) - -def mcaller(url): -return caller(url).contents - -md = ec2_utils.MetadataMaterializer(mcaller(self.metadata_address), -base_url=self.metadata_address, -caller=mcaller) - -self.metadata = md.materialize() - -if self.metadata.get('id'): -return True -else: +self.retries = self.ds_cfg.get('retries', MD_RETRIES) +self.timeout = self.ds_cfg.get('timeout', MD_TIMEOUT) + +def _get_sysinfo(self): +# DigitalOcean embeds vendor ID and instance/droplet_id in the +# SMBIOS information + +# DigitalOcean only supports i386/x86_64 hardware +uname_arch = os.uname()[4] +if uname_arch not in ('i386', 'i686', 'x86_64'): +return (None, None) +LOG.debug("checking if instance is a DigitalOcean droplet") + +is_do = False +droplet_id = None + +# Detect if we are on DigitalOcean and return the Droplet's ID +vendor_name = util.read_dmi_data("system-manufacturer") +if vendor_name == "DigitalOcean": +is_do = True +LOG.info("running on DigitalOcean") + +droplet_id = util.read_dmi_data("system-serial-number") + +if droplet_id: +LOG.debug(("system identified via SMBIOS as DigitalOcean " + "Droplet {}").format(droplet_id)) +else: +LOG.critical(("system identified via SMBIOS as a DigitalOcean " + "Droplet, but not provide an ID. " + "Please file a support ticket at: " + "https:/
Re: [Cloud-init-dev] [Merge] lp:~rcj/cloud-init/lxd_group into lp:cloud-init
Review: Approve >From a user perspective, this is a good thing. +1 -- https://code.launchpad.net/~rcj/cloud-init/lxd_group/+merge/288587 Your team cloud init development team is requested to review the proposed merge of lp:~rcj/cloud-init/lxd_group into lp:cloud-init. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] lp:~utlemming/cloud-init/lp1177432 into lp:cloud-init
Ben Howard has proposed merging lp:~utlemming/cloud-init/lp1177432 into lp:cloud-init. Requested reviews: cloud init development team (cloud-init-dev) Related bugs: Bug #1177432 in cloud-init (Ubuntu): "[SRU] Enable backports in cloud-init archive template" https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1177432 For more details, see: https://code.launchpad.net/~utlemming/cloud-init/lp1177432/+merge/276403 Enable backports for cloud-images. -- Your team cloud init development team is requested to review the proposed merge of lp:~utlemming/cloud-init/lp1177432 into lp:cloud-init. === modified file 'templates/sources.list.ubuntu.tmpl' --- templates/sources.list.ubuntu.tmpl 2014-03-05 23:05:59 + +++ templates/sources.list.ubuntu.tmpl 2015-11-02 15:37:25 + @@ -35,15 +35,22 @@ # deb {{mirror}} {{codename}}-updates multiverse # deb-src {{mirror}} {{codename}}-updates multiverse -## Uncomment the following two lines to add software from the 'backports' -## repository. ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. -# deb {{mirror}} {{codename}}-backports main restricted universe multiverse -# deb-src {{mirror}} {{codename}}-backports main restricted universe multiverse +deb {{mirror}} {{codename}}-backports main +deb-src {{mirror}} {{codename}}-backports universe +deb {{mirror}} {{codename}}-backports universe +deb-src {{mirror}} {{codename}}-backports main universe + +## Uncomment the following two to add software from the 'backports' +## multiverse and restricted repositories. +# deb {{mirror}} {{codename}}-backports multiverse +# deb-src {{mirror}} {{codename}}-backports multiverse +# deb {{mirror}} {{codename}}-backports restricted +# deb-src {{mirror}} {{codename}}-backports restricted ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] lp:~utlemming/cloud-init/1494816 into lp:cloud-init
Ben Howard has proposed merging lp:~utlemming/cloud-init/1494816 into lp:cloud-init. Requested reviews: cloud init development team (cloud-init-dev) Related bugs: Bug #1494816 in cloud-init (Ubuntu): "Snappy should enable SSH when credentials are provided" https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1494816 For more details, see: https://code.launchpad.net/~utlemming/cloud-init/1494816/+merge/270865 Conditional enablement for SSH on Snappy. -- Your team cloud init development team is requested to review the proposed merge of lp:~utlemming/cloud-init/1494816 into lp:cloud-init. === modified file 'cloudinit/config/cc_snappy.py' --- cloudinit/config/cc_snappy.py 2015-05-01 09:38:56 + +++ cloudinit/config/cc_snappy.py 2015-09-11 19:44:42 + @@ -274,7 +274,20 @@ LOG.warn("'%s' failed for '%s': %s", pkg_op['op'], pkg_op['name'], e) -disable_enable_ssh(mycfg.get('ssh_enabled', False)) +# Default to disabling SSH +ssh_enabled = mycfg.get('ssh_enabled', False) + +# If the user has not explicitly enabled or disabled SSH, then enable it +# when password SSH authentication is requested or there are SSH keys +if mycfg.get('ssh_enabled', None) is not False: +if len(mycfg.get('public-keys', [])) > 0: +LOG.debug("Enabling SSH, user SSH keys provided") +ssh_enabled = True +elif mycfg.get('ssh_pwauth', False): +LOG.debug("Enabling SSH, password authentication requested") +ssh_enabled = True + +disable_enable_ssh(ssh_enabled) if fails: raise Exception("failed to install/configure snaps") ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
Re: [Cloud-init-dev] [Merge] lp:~utlemming/cloud-init/lp1375252 into lp:cloud-init
Performing the hostname_bounce on first-boot only would actually break the instance in two cases instance on shutdown/startup as the VIP is released on instance shutdown. When the user restarts the instance, it would be given a new VIP, but keep the instance ID. In this case, scoping the hostname_bounce to per-instance would result in instances that never come back. I agree that this not ideal, but the implementation of the VIP requires either that the hostname has to match the fabric name, or DHCP has to be configured. -- https://code.launchpad.net/~utlemming/cloud-init/lp1375252/+merge/247494 Your team cloud init development team is requested to review the proposed merge of lp:~utlemming/cloud-init/lp1375252 into lp:cloud-init. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
Re: [Cloud-init-dev] [Merge] lp:~utlemming/cloud-init/lp1375252 into lp:cloud-init
That is true on first-boot, but what if the user changes /etc/hostname? If we change to doing this on first-boot only, then it results in a situation where a user who changes their hostname is busted. The purpose of the proposed patch is to enable users to divorce the hostname from the fabric name. -- https://code.launchpad.net/~utlemming/cloud-init/lp1375252/+merge/247494 Your team cloud init development team is requested to review the proposed merge of lp:~utlemming/cloud-init/lp1375252 into lp:cloud-init. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
[Cloud-init-dev] [Merge] lp:~utlemming/cloud-init/lp1249124_datacenter_name into lp:cloud-init
Ben Howard has proposed merging lp:~utlemming/cloud-init/lp1249124_datacenter_name into lp:cloud-init. Requested reviews: cloud init development team (cloud-init-dev) Related bugs: Bug #1249124 in cloud-init (Ubuntu): smartos changed from region to datacenter_name https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1249124 For more details, see: https://code.launchpad.net/~utlemming/cloud-init/lp1249124_datacenter_name/+merge/194425 -- https://code.launchpad.net/~utlemming/cloud-init/lp1249124_datacenter_name/+merge/194425 Your team cloud init development team is requested to review the proposed merge of lp:~utlemming/cloud-init/lp1249124_datacenter_name into lp:cloud-init. === modified file 'cloudinit/sources/DataSourceSmartOS.py' --- cloudinit/sources/DataSourceSmartOS.py 2013-10-07 16:35:01 + +++ cloudinit/sources/DataSourceSmartOS.py 2013-11-07 22:55:57 + @@ -46,7 +46,7 @@ 'user-data': ('user-data', False), 'iptables_disable': ('iptables_disable', True), 'motd_sys_info': ('motd_sys_info', True), -'availability_zone': ('region', True), +'availability_zone': ('datacenter_name', True), } DS_NAME = 'SmartOS' ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
Re: [Cloud-init-dev] [Merge] lp:~utlemming/cloud-init/smartos_base64 into lp:cloud-init
Scott, have a look at these changesI think this resolves the last of the concerns. -- https://code.launchpad.net/~utlemming/cloud-init/smartos_base64/+merge/177716 Your team cloud init development team is requested to review the proposed merge of lp:~utlemming/cloud-init/smartos_base64 into lp:cloud-init. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp
Re: [Cloud-init-dev] [Merge] lp:~utlemming/cloud-init/smartos_base64 into lp:cloud-init
the class definition has: class DataSourceSmartOS(sources.DataSource): def __init__(self, sys_cfg, distro, paths): sources.DataSource.__init__(self, sys_cfg, distro, paths) So we are going to get .ds_cfg out of it if I understand the comment. -- https://code.launchpad.net/~utlemming/cloud-init/smartos_base64/+merge/177716 Your team cloud init development team is requested to review the proposed merge of lp:~utlemming/cloud-init/smartos_base64 into lp:cloud-init. ___ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp