[Cloud-init-dev] [Merge] ~thenarcotk/cloud-init:fix-spelling-error-cc-mounts into cloud-init:master

2018-05-15 Thread Stephen Ford
Stephen Ford has proposed merging 
~thenarcotk/cloud-init:fix-spelling-error-cc-mounts into cloud-init:master.

Commit message:
Fix a spelling mistake in a cc_mounts.py error message

The error message has a spelling mistake when a nonexistent named
mount is used.

Requested reviews:
  cloud-init commiters (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~thenarcotk/cloud-init/+git/cloud-init/+merge/345608
-- 
Your team cloud-init commiters is requested to review the proposed merge of 
~thenarcotk/cloud-init:fix-spelling-error-cc-mounts into cloud-init:master.
diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py
index f14a4fc..6bd713a 100644
--- a/cloudinit/config/cc_mounts.py
+++ b/cloudinit/config/cc_mounts.py
@@ -337,7 +337,7 @@ def handle(_name, cfg, cloud, log, _args):
 start = str(cfgmnt[i][0])
 sanitized = sanitize_devname(start, cloud.device_name_to_device, log)
 if sanitized is None:
-log.debug("Ignorming nonexistant named mount %s", start)
+log.debug("Ignoring nonexistant named mount %s", start)
 continue
 
 if sanitized != start:
___
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] ~thenarcotk/cloud-init:fix-spelling-error-cc-mounts into cloud-init:master

2018-05-15 Thread Chad Smith
The proposal to merge ~thenarcotk/cloud-init:fix-spelling-error-cc-mounts into 
cloud-init:master has been updated.

Status: Needs review => Work in progress

For more details, see:
https://code.launchpad.net/~thenarcotk/cloud-init/+git/cloud-init/+merge/345608
-- 
Your team cloud-init commiters is requested to review the proposed merge of 
~thenarcotk/cloud-init:fix-spelling-error-cc-mounts 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] ~thenarcotk/cloud-init:fix-spelling-error-cc-mounts into cloud-init:master

2018-05-15 Thread Chad Smith


Diff comments:

> diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py
> index f14a4fc..6bd713a 100644
> --- a/cloudinit/config/cc_mounts.py
> +++ b/cloudinit/config/cc_mounts.py
> @@ -337,7 +337,7 @@ def handle(_name, cfg, cloud, log, _args):
>  start = str(cfgmnt[i][0])
>  sanitized = sanitize_devname(start, cloud.device_name_to_device, log)
>  if sanitized is None:
> -log.debug("Ignorming nonexistant named mount %s", start)
> +log.debug("Ignoring nonexistant named mount %s", start)

While fixing this spelling, we should also fix nonexistent :)

>  continue
>  
>  if sanitized != start:


-- 
https://code.launchpad.net/~thenarcotk/cloud-init/+git/cloud-init/+merge/345608
Your team cloud-init commiters is requested to review the proposed merge of 
~thenarcotk/cloud-init:fix-spelling-error-cc-mounts 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] ~thenarcotk/cloud-init:fix-spelling-error-cc-mounts into cloud-init:master

2018-05-15 Thread Chad Smith
Stephen, thank you so much for this patch and making cloud-init better. This 
project is governed by the contributor's license agreement. Once you are able 
to confirm signing the CLA, we'll land this branch immediately. Here are the 
details below.  I've marked this branch 'work in progress' and you can click it 
back to 'Needs review' when the CLA is done. Again thanks for working with us.


To contribute, you must sign the Canonical Contributor License Agreement (CLA) 
[1].

If you have already signed it as an individual, your Launchpad user will be 
listed in the contributor-agreement-canonical launchpad group [2]. 
Unfortunately there is no easy way to check if an organization or company you 
are doing work for has signed. If you are unsure or have questions, email 
scott.mo...@canonical.com or ping smoser in #cloud-init channel via freenode.

For information on how to sign, please see the HACKING document [3].

Thanks again, and please feel free to reach out with any questions.

–
[1] https://launchpad.net/~contributor-agreement-canonical/+members
[2] https://launchpad.net/~contributor-agreement-canonical/+members
[3] http://cloudinit.readthedocs.io/en/latest/topics/hacking.html


-- 
https://code.launchpad.net/~thenarcotk/cloud-init/+git/cloud-init/+merge/345608
Your team cloud-init commiters is requested to review the proposed merge of 
~thenarcotk/cloud-init:fix-spelling-error-cc-mounts 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] ~powersj/cloud-init:cii-restructure-ssh into cloud-init:master

2018-05-15 Thread Chad Smith
Couple nits on this approach Josh, then I think it looks good.

Diff comments:

> diff --git a/tests/cloud_tests/platforms/instances.py 
> b/tests/cloud_tests/platforms/instances.py
> index 3bad021..3b2fe1c 100644
> --- a/tests/cloud_tests/platforms/instances.py
> +++ b/tests/cloud_tests/platforms/instances.py
> @@ -98,21 +103,21 @@ class Instance(TargetBase):
>  client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
>  private_key = 
> paramiko.RSAKey.from_private_key_file(self.ssh_key_file)
>  
> -retries = 30
> +retries = 3
>  while retries:
>  try:
>  client.connect(username=self.ssh_username,
> hostname=self.ssh_ip, port=self.ssh_port,
> -   pkey=private_key, banner_timeout=30)
> +   pkey=private_key)
>  self._ssh_client = client
>  return client
>  except (ConnectionRefusedError, AuthenticationException,
>  BadHostKeyException, ConnectionResetError, SSHException,
> -OSError) as e:
> +OSError):
>  retries -= 1
> -time.sleep(10)
> +time.sleep(3)

Can we add a LOG.debug('Retrying ssh connection on connect failure') here?

>  
> -ssh_cmd = 'Failed ssh connection to %s@%s:%s after 300 seconds' % (
> +ssh_cmd = 'Failed ssh connection to %s@%s:%s after 3 retries' % (
>  self.ssh_username, self.ssh_ip, self.ssh_port
>  )
>  raise util.InTargetExecuteError(b'', b'', 1, ssh_cmd, 'ssh')
> @@ -128,18 +133,29 @@ class Instance(TargetBase):
>  return ' '.join(l for l in test.strip().splitlines()
>  if not l.lstrip().startswith('#'))
>  
> -time = self.config['boot_timeout']
> +boot_timeout = self.config['boot_timeout']
>  tests = [self.config['system_ready_script']]
>  if wait_for_cloud_init:
>  tests.append(self.config['cloud_init_ready_script'])
>  
>  formatted_tests = ' && '.join(clean_test(t) for t in tests)
>  cmd = ('i=0; while [ $i -lt {time} ] && i=$(($i+1)); do {test} && '
> -   'exit 0; sleep 1; done; exit 1').format(time=time,
> +   'exit 0; sleep 1; done; exit 1').format(time=boot_timeout,
> test=formatted_tests)
>  
> -if self.execute(cmd, rcs=(0, 1))[-1] != 0:
> -raise OSError('timeout: after {}s system not 
> started'.format(time))
> -
> +end_time = time.time() + boot_timeout
> +while True:
> +try:
> +if self.execute(cmd, rcs=(0, 1),
> +description='wait for instance start'):
> +break

I think you actually want to be checking the last element of the tuple returned 
by execute for exit code of 0 before breaking here, otherwise you break out of 
the while loop even on error conditions (such as hitting the 300 second 
boot_timeout). You won't raise the error in that case.

> +except util.InTargetExecuteError:
> +LOG.warning("failed to connect via SSH")
> +
> +if time.time() < end_time:
> +time.sleep(3)
> +else:
> +raise util.PlatformError('ssh', 'after %ss instance is not '
> + 'reachable' % boot_timeout)
>  
>  # vi: ts=4 expandtab


-- 
https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/342010
Your team cloud-init commiters is requested to review the proposed merge of 
~powersj/cloud-init:cii-restructure-ssh 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] ~powersj/cloud-init:cii-restructure-ssh into cloud-init:master

2018-05-15 Thread Server Team CI bot
Review: Needs Fixing continuous-integration

FAILED: Continuous integration, rev:1fdf14ea023a095f4de928e3662c655509fe3ced
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1126/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
FAILED: Ubuntu LTS: Integration

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1126/rebuild

-- 
https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/342010
Your team cloud-init commiters is requested to review the proposed merge of 
~powersj/cloud-init:cii-restructure-ssh 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] [recipe build #1579003] of ~cloud-init-dev cloud-init-daily-artful in artful: Failed to build

2018-05-15 Thread noreply
 * State: Failed to build
 * Recipe: cloud-init-dev/cloud-init-daily-artful
 * Archive: ~cloud-init-dev/ubuntu/daily
 * Distroseries: artful
 * Duration: 1 minute
 * Build Log: 
https://launchpad.net/~cloud-init-dev/+archive/ubuntu/daily/+recipebuild/1579003/+files/buildlog.txt.gz
 * Upload Log: 
 * Builder: https://launchpad.net/builders/lcy01-amd64-028

-- 
https://launchpad.net/~cloud-init-dev/+archive/ubuntu/daily/+recipebuild/1579003
Your team cloud-init commiters is the requester of the build.

___
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] [recipe build #1579006] of ~cloud-init-dev cloud-init-daily-xenial in xenial: Failed to build

2018-05-15 Thread noreply
 * State: Failed to build
 * Recipe: cloud-init-dev/cloud-init-daily-xenial
 * Archive: ~cloud-init-dev/ubuntu/daily
 * Distroseries: xenial
 * Duration: 3 minutes
 * Build Log: 
https://launchpad.net/~cloud-init-dev/+archive/ubuntu/daily/+recipebuild/1579006/+files/buildlog.txt.gz
 * Upload Log: 
 * Builder: https://launchpad.net/builders/lgw01-amd64-034

-- 
https://launchpad.net/~cloud-init-dev/+archive/ubuntu/daily/+recipebuild/1579006
Your team cloud-init commiters is the requester of the build.

___
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] ~powersj/cloud-init:cii-restructure-ssh into cloud-init:master

2018-05-15 Thread Server Team CI bot
Review: Needs Fixing continuous-integration

FAILED: Continuous integration, rev:2825748072db0f1c03dba1db5a2995eeda8d2dc5
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1127/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
FAILED: Ubuntu LTS: Integration

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1127/rebuild

-- 
https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/342010
Your team cloud-init commiters is requested to review the proposed merge of 
~powersj/cloud-init:cii-restructure-ssh 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] ~smoser/cloud-init:feature/run-container into cloud-init:master

2018-05-15 Thread Scott Moser
Scott Moser has proposed merging ~smoser/cloud-init:feature/run-container into 
cloud-init:master.

Commit message:
tools/run-container: replace tools/run-centos with more generic.

tools/run-container is like tools/run-centos, but currently supports
the following images from lxc-images
   opensuse/42.3
   centos/6
   centos/7
   ubuntu/16.04
   debian/10
   debian/sid

Also here is to make installation via zypper in tools/read-dependencies
not prompt user.


Requested reviews:
  cloud-init commiters (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/345627

see commit message
-- 
Your team cloud-init commiters is requested to review the proposed merge of 
~smoser/cloud-init:feature/run-container into cloud-init:master.
diff --git a/tools/read-dependencies b/tools/read-dependencies
index 421f470..b4656e6 100755
--- a/tools/read-dependencies
+++ b/tools/read-dependencies
@@ -51,6 +51,10 @@ MAYBE_RELIABLE_YUM_INSTALL = [
 """,
 'reliable-yum-install']
 
+ZYPPER_INSTALL = [
+'zypper', '--non-interactive', '--gpg-auto-import-keys', 'install',
+'--auto-agree-with-licenses']
+
 DRY_DISTRO_INSTALL_PKG_CMD = {
 'centos': ['yum', 'install', '--assumeyes'],
 'redhat': ['yum', 'install', '--assumeyes'],
@@ -61,8 +65,8 @@ DISTRO_INSTALL_PKG_CMD = {
 'redhat': MAYBE_RELIABLE_YUM_INSTALL,
 'debian': ['apt', 'install', '-y'],
 'ubuntu': ['apt', 'install', '-y'],
-'opensuse': ['zypper', 'install'],
-'suse': ['zypper', 'install']
+'opensuse': ZYPPER_INSTALL,
+'suse': ZYPPER_INSTALL,
 }
 
 
diff --git a/tools/run-centos b/tools/run-centos
index cb241ee..3d7ca0f 100755
--- a/tools/run-centos
+++ b/tools/run-centos
@@ -1,18 +1,18 @@
 #!/bin/bash
 # This file is part of cloud-init. See LICENSE file for license information.
 
-set -u
-
-VERBOSITY=0
-TEMP_D=""
-KEEP=false
-CONTAINER=""
-
-error() { echo "$@" 1>&2; }
-fail() { [ $# -eq 0 ] || error "$@"; exit 1; }
-errorrc() { local r=$?; error "$@" "ret=$r"; return $r; }
+deprecated() {
+cat <&2; [ $# -eq 0 ] || error "$@"; return 1; }
-cleanup() {
-if [ -n "$CONTAINER" -a "$KEEP" = "false" ]; then
-delete_container "$CONTAINER"
-fi
-[ -z "${TEMP_D}" -o ! -d "${TEMP_D}" ] || rm -Rf "${TEMP_D}"
-}
-
-debug() {
-local level=${1}; shift;
-[ "${level}" -gt "${VERBOSITY}" ] && return
-error "${@}"
-}
-
-
-inside_as() {
-# inside_as(container_name, user, cmd[, args])
-# executes cmd with args inside container as user in users home dir.
-local name="$1" user="$2"
-shift 2
-if [ "$user" = "root" ]; then
-inside "$name" "$@"
-return
-fi
-local stuffed="" b64=""
-stuffed=$(getopt --shell sh --options "" -- -- "$@")
-stuffed=${stuffed# -- }
-b64=$(printf "%s\n" "$stuffed" | base64 --wrap=0)
-inside "$name" su "$user" -c \
-'cd; eval set -- "$(echo '$b64' | base64 --decode)" && exec "$@"'
-}
-
-inside_as_cd() {
-local name="$1" user="$2" dir="$3"
-shift 3
-inside_as "$name" "$user" sh -c 'cd "$0" && exec "$@"' "$dir" "$@"
-}
-
-inside() {
-local name="$1"
-shift
-lxc exec "$name" -- "$@"
-}
-
-inject_cloud_init(){
-# take current cloud-init git dir and put it inside $name at
-# ~$user/cloud-init.
-local name="$1" user="$2" dirty="$3"
-local changes="" top_d="" dname="cloud-init" pstat=""
-local gitdir="" commitish=""
-gitdir=$(git rev-parse --git-dir) || {
-errorrc "Failed to get git dir in $PWD";
-return
-}
-local t=${gitdir%/*}
-case "$t" in
-*/worktrees) 
-if [ -f "${t%worktrees}/config" ]; then
-gitdir="${t%worktrees}"
-fi
-esac
-
-# attempt to get branch name.
-commitish=$(git rev-parse --abbrev-ref HEAD) || {
-errorrc "Failed git rev-parse --abbrev-ref HEAD"
-return
-}
-if [ "$commitish" = "HEAD" ]; then
-# detached head
-commitish=$(git rev-parse HEAD) || {
-errorrc "failed git rev-parse HEAD"
-return
-}
-fi
-
-local local_changes=false
-if ! git diff --quiet "$commitish"; then
-# there are local changes not committed.
-local_changes=true
-if [ "$dirty" = "false" ]; then
-error "WARNING: You had uncommitted changes.  Those changes will "
-error "be put into 'local-changes.diff' inside the container. "
-error "To test these changes you must pass --dirty."
-fi
-fi
-
-debug 1 "collecting ${gitdir} ($dname) into user $user in $name."
-tar -C "${gitdir}" -cpf - . |
-inside_as "$name" "$user" sh -ec '
-dname=$1
-commitish=$2
-rm -Rf "$dname"
-mkdir -p $dname/.git
-cd $dname/.git
-tar -xpf -
-cd ..
-git config core.bare false
-out=$(git checkout $commitish 2>&1) ||
- 

Re: [Cloud-init-dev] [Merge] ~smoser/cloud-init:feature/run-container into cloud-init:master

2018-05-15 Thread Server Team CI bot
Review: Needs Fixing continuous-integration

FAILED: Continuous integration, rev:85ada88e35930d2ab2cbb9a7a436bcfd992f9a71
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1128/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
FAILED: MAAS Compatability Testing

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1128/rebuild

-- 
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/345627
Your team cloud-init commiters is requested to review the proposed merge of 
~smoser/cloud-init:feature/run-container 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] ~smoser/cloud-init:fix/opensuse-skip-on-httpretty-ssl-error into cloud-init:master

2018-05-15 Thread Scott Moser
Scott Moser has proposed merging 
~smoser/cloud-init:fix/opensuse-skip-on-httpretty-ssl-error into 
cloud-init:master.

Commit message:
tests: SkipTest some errors found in httpretty in OpenSuSE 42.3.

In OpenSuSE 42.3, with
   python-httpretty=0.8.8-7.1
   python-ndg-httpsclient=0.4.0-3.2
   python-pyOpenSSL=16.0.0-4.1
We hit what looks like the bug described at
   https://github.com/gabrielfalcao/HTTPretty/issues/242

This just skipTest if we hit that scenario.

Requested reviews:
  cloud-init commiters (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/345630

see commit message
-- 
Your team cloud-init commiters is requested to review the proposed merge of 
~smoser/cloud-init:fix/opensuse-skip-on-httpretty-ssl-error into 
cloud-init:master.
diff --git a/tests/unittests/test_handler/test_handler_chef.py b/tests/unittests/test_handler/test_handler_chef.py
index 0136a93..1731b99 100644
--- a/tests/unittests/test_handler/test_handler_chef.py
+++ b/tests/unittests/test_handler/test_handler_chef.py
@@ -12,9 +12,10 @@ from cloudinit import distros
 from cloudinit import helpers
 from cloudinit.sources import DataSourceNone
 from cloudinit import util
+from cloudinit.url_helper import UrlError
 
 from cloudinit.tests.helpers import (
-CiTestCase, FilesystemMockingTestCase, mock, skipIf)
+CiTestCase, FilesystemMockingTestCase, mock, skipIf, SkipTest)
 
 LOG = logging.getLogger(__name__)
 
@@ -26,6 +27,13 @@ class TestInstallChefOmnibus(CiTestCase):
 def setUp(self):
 self.new_root = self.tmp_dir()
 
+def skip_or_raise_for_httpretty_ssl(self, e):
+"""This happens in opensuse. httpretty bug."""
+url = "https://github.com/gabrielfalcao/HTTPretty/issues/242";
+if all([s in str(e) for s in ("bad handshake", "32", "EPIPE")]):
+raise SkipTest("HTTPretty SSL bug: %s" % url)
+raise e
+
 @httpretty.activate
 def test_install_chef_from_omnibus_runs_chef_url_content(self):
 """install_chef_from_omnibus runs downloaded OMNIBUS_URL as script."""
@@ -33,7 +41,10 @@ class TestInstallChefOmnibus(CiTestCase):
 response = '#!/bin/bash\necho "Hi Mom" > {0}'.format(chef_outfile)
 httpretty.register_uri(
 httpretty.GET, cc_chef.OMNIBUS_URL, body=response, status=200)
-cc_chef.install_chef_from_omnibus()
+try:
+cc_chef.install_chef_from_omnibus()
+except UrlError as e:
+self.skip_or_raise_for_httpretty_ssl(e)
 self.assertEqual('Hi Mom\n', util.load_file(chef_outfile))
 
 @mock.patch('cloudinit.config.cc_chef.url_helper.readurl')
@@ -73,7 +84,10 @@ class TestInstallChefOmnibus(CiTestCase):
 response = '#!/bin/bash\necho "Hi Mom" > {0}'.format(chef_outfile)
 httpretty.register_uri(
 httpretty.GET, cc_chef.OMNIBUS_URL, body=response)
-cc_chef.install_chef_from_omnibus(omnibus_version='2.0')
+try:
+cc_chef.install_chef_from_omnibus(omnibus_version='2.0')
+except UrlError as e:
+self.skip_or_raise_for_httpretty_ssl(e)
 
 called_kwargs = m_subp_blob.call_args_list[0][1]
 expected_kwargs = {
___
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/run-container into cloud-init:master

2018-05-15 Thread Joshua Powers
Before looking at this, one thing to note is that CI will obviously need to be 
updated before this is landed and unless someone rebases re-runs will fail
-- 
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/345627
Your team cloud-init commiters is requested to review the proposed merge of 
~smoser/cloud-init:feature/run-container 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:fix/opensuse-skip-on-httpretty-ssl-error into cloud-init:master

2018-05-15 Thread Server Team CI bot
Review: Approve continuous-integration

PASSED: Continuous integration, rev:90373bf66956e03cc972aaf29b6444f244299375
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1129/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: MAAS Compatability Testing
IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1129/rebuild

-- 
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/345630
Your team cloud-init commiters is requested to review the proposed merge of 
~smoser/cloud-init:fix/opensuse-skip-on-httpretty-ssl-error 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] ~powersj/cloud-init:cii-restructure-ssh into cloud-init:master

2018-05-15 Thread Server Team CI bot
Review: Approve continuous-integration

PASSED: Continuous integration, rev:bfbc0ea14deffa7239b22d9c43f02c47d878fdfc
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1130/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: MAAS Compatability Testing
IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1130/rebuild

-- 
https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/342010
Your team cloud-init commiters is requested to review the proposed merge of 
~powersj/cloud-init:cii-restructure-ssh 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] ~jacobbednarz/cloud-init:allow-false-in-sudo-directive into cloud-init:master

2018-05-15 Thread Jacob Bednarz
Jacob Bednarz has proposed merging 
~jacobbednarz/cloud-init:allow-false-in-sudo-directive into cloud-init:master.

Commit message:
Explicitly prevent `sudo` access for user module

To deny a user elevated access, you can omit the `sudo` key from the
`users` dictionary. This works fine however it's implicitly defined
based on defaults of `cloud-init`. If the project moves to have `sudo`
access allowed for all by default (quite unlikely but still possible)
this will catch a few people out.

This introduces the ability to define an explicit `sudo: False` in the
`users` dictionary and it will prevent `sudo` access. The behaviour is
identical to omitting the key.

LP: #1771468

Requested reviews:
  cloud-init commiters (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~jacobbednarz/cloud-init/+git/cloud-init/+merge/345639
-- 
Your team cloud-init commiters is requested to review the proposed merge of 
~jacobbednarz/cloud-init:allow-false-in-sudo-directive into cloud-init:master.
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py
index 6c22b07..ab0b077 100755
--- a/cloudinit/distros/__init__.py
+++ b/cloudinit/distros/__init__.py
@@ -531,7 +531,7 @@ class Distro(object):
 self.lock_passwd(name)
 
 # Configure sudo access
-if 'sudo' in kwargs:
+if 'sudo' in kwargs and kwargs['sudo'] is not False:
 self.write_sudo_rules(name, kwargs['sudo'])
 
 # Import SSH keys
diff --git a/cloudinit/distros/freebsd.py b/cloudinit/distros/freebsd.py
index 5b1718a..ff22d56 100644
--- a/cloudinit/distros/freebsd.py
+++ b/cloudinit/distros/freebsd.py
@@ -266,7 +266,7 @@ class Distro(distros.Distro):
 self.lock_passwd(name)
 
 # Configure sudo access
-if 'sudo' in kwargs:
+if 'sudo' in kwargs and kwargs['sudo'] is not False:
 self.write_sudo_rules(name, kwargs['sudo'])
 
 # Import SSH keys
___
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