Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

lxc container module is broken in 1.9.6 #2042

Closed
cloudnull opened this issue Apr 16, 2016 · 14 comments
Closed

lxc container module is broken in 1.9.6 #2042

cloudnull opened this issue Apr 16, 2016 · 14 comments

Comments

@cloudnull
Copy link
Contributor

ISSUE TYPE
  • Bug Report
COMPONENT NAME
  • lxc_container
ANSIBLE VERSION
ansible 1.9.6
CONFIGURATION
[defaults]
# Additional plugins
lookup_plugins = /etc/ansible/plugins/lookup
filter_plugins = /etc/ansible/plugins/filter
action_plugins = /etc/ansible/plugins/action
library = /etc/ansible/plugins/library

# Fact caching
gathering = smart
fact_caching = jsonfile
fact_caching_connection = /etc/openstack_deploy/ansible_facts
fact_caching_timeout = 86400

inventory = inventory
host_key_checking = False

# Set color options
nocolor = 0

# SSH timeout
timeout = 120

[ssh_connection]
pipelining = True
OS / ENVIRONMENT

Ubuntu 14.04.04

SUMMARY

The lxc_container module is broken in Ansible "1.9.6". This brokeness comes from the commit 30e0c50 which introduced changes for 2.x which do not exist in ansible "1.9". Specifically the required_if function does not exist in lib/ansible/module_utils/basic.py. Additionally even with that method removed from the module the archive check needs to be adjusted to check to see if the archive option is in the BOOLEANS_TRUE constant.

STEPS TO REPRODUCE
ansible -m lxc_container -a 'name=test-container' infra1
infra1 | FAILED >> {
    "failed": true,
    "msg": "OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket \"/root/.ansible/cp/ansible-ssh-172.29.236.100-22-root\" does not exist\r\ndebug1: Connecting to 172.29.236.100 [172.29.236.100] port 22.\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug1: permanently_set_uid: 0/0\r\ndebug1: identity file /root/.ssh/id_rsa type 1\r\ndebug1: identity file /root/.ssh/id_rsa-cert type -1\r\ndebug1: identity file /root/.ssh/id_dsa type -1\r\ndebug1: identity file /root/.ssh/id_dsa-cert type -1\r\ndebug1: identity file /root/.ssh/id_ecdsa type -1\r\ndebug1: identity file /root/.ssh/id_ecdsa-cert type -1\r\ndebug1: identity file /root/.ssh/id_ed25519 type -1\r\ndebug1: identity file /root/.ssh/id_ed25519-cert type -1\r\ndebug1: Enabling compatibility mode for protocol 2.0\r\ndebug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6\r\ndebug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6 pat OpenSSH_6.6.1* compat 0x04000000\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com zlib@openssh.com\r\ndebug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com zlib@openssh.com\r\ndebug1: sending SSH2_MSG_KEX_ECDH_INIT\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug1: Server host key: ECDSA ec:7d:3b:4a:c9:2d:cd:99:41:8a:90:6a:4c:42:53:02\r\ndebug1: Host '172.29.236.100' is known and matches the ECDSA host key.\r\ndebug1: Found key in /root/.ssh/known_hosts:9\r\ndebug1: ssh_ecdsa_verify: signature correct\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug1: SSH2_MSG_SERVICE_REQUEST sent\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\n------------------------------------------------------------------------------\n* WARNING                                                                    *\n* You are accessing a secured system and your actions will be logged along   *\n* with identifying information. Disconnect immediately if you are not an     *\n* authorized user of this system.                                            *\n------------------------------------------------------------------------------\ndebug1: Authentications that can continue: publickey,password\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering RSA public key: /root/.ssh/id_rsa\r\ndebug1: Server accepts key: pkalg ssh-rsa blen 279\r\ndebug1: key_parse_private2: missing begin marker\r\ndebug1: read PEM private key done: type RSA\r\ndebug1: Enabling compression at level 6.\r\ndebug1: Authentication succeeded (publickey).\r\nAuthenticated to 172.29.236.100 ([172.29.236.100]:22).\r\ndebug1: setting up multiplex master socket\r\ndebug1: channel 0: new [/root/.ansible/cp/ansible-ssh-172.29.236.100-22-root]\r\ndebug1: control_persist_detach: backgrounding master process\r\ndebug1: forking to background\r\ndebug1: Entering interactive session.\r\ndebug1: multiplexing control connection\r\ndebug1: channel 1: new [mux-control]\r\ndebug1: channel 2: new [client-session]\r\ndebug1: Sending environment.\r\ndebug1: Sending env LANG = en_US.UTF-8\r\ndebug1: Sending command: /bin/sh -c 'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python'\r\ndebug1: mux_client_request_session: master session id: 2\r\nTraceback (most recent call last):\n  File \"<stdin>\", line 3117, in <module>\n  File \"<stdin>\", line 1462, in main\nTypeError: __init__() got an unexpected keyword argument 'required_if'\ndebug1: client_input_channel_req: channel 2 rtype exit-status reply 0\r\ndebug1: channel 2: free: client-session, nchannels 3\r\ndebug1: channel 1: free: mux-control, nchannels 2\r\n",
    "parsed": false
}
EXPECTED RESULTS

The container should build.

ACTUAL RESULTS

The module stops. See command output for action stdout/stderr

FIX FOR ANSIBLE 1.9.6

http://paste.openstack.org/show/494312/

@cloudnull
Copy link
Contributor Author

cloudnull commented Apr 16, 2016

It would seem that the LXC container module in 1.9.6 is broken due to an incompatible change being backported. Is it possible to get a change into 1.9.6 to resolve this issue? At current the OpenStack-Ansible project is unable to use 1.9.6 as is. This is an example of the error: http://logs.openstack.org/09/306609/2/check/gate-openstack-ansible-dsvm-commit/1fd66a3/console.html#_2016-04-15_21_03_52_758

2016-04-15 21:03:52.758 | failed: [aio1_nova_scheduler_container-8be705e1 -> aio1] => {"failed": true, "parsed": false}
2016-04-15 21:03:52.758 | OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
2016-04-15 21:03:52.758 | debug1: Reading configuration data /etc/ssh/ssh_config
2016-04-15 21:03:52.758 | debug1: /etc/ssh/ssh_config line 19: Applying options for *
2016-04-15 21:03:52.758 | debug1: auto-mux: Trying existing master
2016-04-15 21:03:52.758 | debug1: mux_client_request_session: master session id: 2
2016-04-15 21:03:52.758 | Traceback (most recent call last):
2016-04-15 21:03:52.759 |   File "<stdin>", line 3117, in <module>
2016-04-15 21:03:52.759 |   File "<stdin>", line 1462, in main
2016-04-15 21:03:52.759 | TypeError: __init__() got an unexpected keyword argument 'required_if'

-cc @evgeni @gregdek @robynbergeron

@cloudnull
Copy link
Contributor Author

cloudnull commented Apr 16, 2016

Just to confirm everything in devel works fine as is. This issue seems to only effect 1.9.6.

Command: ansible '-m' 'lxc_container' '-a' 'name=test-container' 'infra1'
infra1 | SUCCESS => {
    "changed": true, 
    "lxc_container": {
        "init_pid": 25918, 
        "interfaces": [
            "eth0", 
            "lo"
        ], 
        "ips": [], 
        "name": "test-container", 
        "state": "running"
    }
}
ansible '--version'
ansible 2.1.0
  config file = /opt/openstack-ansible/playbooks/ansible.cfg
  configured module search path = ['/etc/ansible/plugins/library']

@evgeni
Copy link
Contributor

evgeni commented Apr 16, 2016

yepp, seems this was overseen when backporting my patches to 1.9.x
your patch looks fine to me, even if I'd have used and instead of all().
👍

@cloudnull
Copy link
Contributor Author

cloudnull commented Apr 16, 2016

I'm not sure what the process is to get the fix into 1.9.6 -- @resmo @evgeni?
@evgeni with regard to and vs all I'm happy either way :)

openstack-gerrit pushed a commit to openstack/openstack-ansible-rsyslog_server that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Ib0094bdebdee8566a8ed13ff7d8ae849e92ff5a0
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-rsyslog_client that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I5be4155ef579ae8f68756be46344b9312bb801f0
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-openstack_openrc that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I8b5f5c7580acc35573c631e8c62cedcf2cc89082
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-openstack_hosts that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Ie4e17e64c2bc708ef8090f31fbf8f7f3791517ad
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-memcached_server that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I976b2c936d7c8ae78158008b709b125d2a8e222a
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack-archive/openstack-ansible-security that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: If7b0722e72040c31b111afdb94027de6912a01c7
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack-archive/openstack-ansible-pip_install that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I19f4af55f33979d4b998021dad3d536201eaa433
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack-archive/openstack-ansible-pip_lock_down that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Iab288bcde98e6974568db82a1c89c6cb159cfcc2
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-galera_client that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Ief412e60d141facea2d56e649d60bb0c6de6270b
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-apt_package_pinning that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Ia5fe1d83e0fe0b98039aed1386be8a2d43c83d87
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-repo_server that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Id366caf2af80992b63581133a2c33ba9003ddc86
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-lxc_hosts that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Ic11945007bb7538f2842f70af56158e6a8f72871
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-lxc_container_create that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Idf7250d99c3401e69558736192b85e3ce1004311
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-rabbitmq_server that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I78e1923a100b3d8bbaad4881f694c429dc849d95
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_swift that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Ifdaa67f1e1a96c56c96732d236b5c6af267219e5
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_tempest that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I92b3a6c5dd94644e799d128b68badfb856946ed2
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_keystone that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: If351acd94eff879817bd9cfd4c75a85e081bd025
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack-archive/openstack-ansible-repo_build that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Id5087482c3d57190b11873e2abadfbc8cd292771
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_ironic that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I6f7ce2ff03daaaffd93fc306231cf9e763c4f61a
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_aodh that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I010e24449169506f625e964d550bc372717a6eb6
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_ceilometer that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I031ca33d3150c738f0178323e0a01017b261f2d4
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_glance that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Iceeb9c4d2c47f783e90837d908aaa42811d899ad
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_horizon that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I48188bdf7d602dd30e52de64aed56843bd20cd10
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_cinder that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Ic9b62a1a3178e8962423ba619b45d31033f86872
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_heat that referenced this issue Apr 16, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I5250fee14014529d18ee64c2642f18de7779c849
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
openstack-gerrit pushed a commit to openstack/openstack-ansible-rsyslog_server that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Ib0094bdebdee8566a8ed13ff7d8ae849e92ff5a0
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit 7016f43)
openstack-gerrit pushed a commit to openstack-archive/openstack-ansible-security that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: If7b0722e72040c31b111afdb94027de6912a01c7
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit 5b5eabd)
openstack-gerrit pushed a commit to openstack/openstack-ansible-repo_server that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Id366caf2af80992b63581133a2c33ba9003ddc86
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit 3a04b14)
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_keystone that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: If351acd94eff879817bd9cfd4c75a85e081bd025
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit 59ffe5e)
openstack-gerrit pushed a commit to openstack/openstack-ansible-rabbitmq_server that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I78e1923a100b3d8bbaad4881f694c429dc849d95
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit c76ce3f)
openstack-gerrit pushed a commit to openstack-archive/openstack-ansible-repo_build that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Id5087482c3d57190b11873e2abadfbc8cd292771
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit 6188c6a)
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_aodh that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I010e24449169506f625e964d550bc372717a6eb6
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit d0d97ce)
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_ironic that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I6f7ce2ff03daaaffd93fc306231cf9e763c4f61a
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit e3d39b7)
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_swift that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Ifdaa67f1e1a96c56c96732d236b5c6af267219e5
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit 1a12be6)
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_ceilometer that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I031ca33d3150c738f0178323e0a01017b261f2d4
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit 65d8a90)
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_glance that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Iceeb9c4d2c47f783e90837d908aaa42811d899ad
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit 3bc69fd)
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_heat that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I5250fee14014529d18ee64c2642f18de7779c849
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit eb43bc1)
openstack-gerrit pushed a commit to openstack/openstack-ansible-lxc_container_create that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Idf7250d99c3401e69558736192b85e3ce1004311
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit a6a0d02)
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_cinder that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Ic9b62a1a3178e8962423ba619b45d31033f86872
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit 0478561)
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_neutron that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Ieb14430082b0b7e1c52db18eee6dea5d9532886d
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit 8416a65)
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_horizon that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I48188bdf7d602dd30e52de64aed56843bd20cd10
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit 76e009d)
openstack-gerrit pushed a commit to openstack/openstack-ansible-os_nova that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Iae39f4c5ba5dd26f8272b6728aa1754d931c80ab
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit 9b98745)
openstack-gerrit pushed a commit to openstack/openstack-ansible-galera_server that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: Ib152a63da6354974752e929cbf5cee71301db5c9
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit c8b8902)
openstack-gerrit pushed a commit to openstack/openstack-ansible that referenced this issue Apr 18, 2016
This version of ansible is broken due to the following upstream
Ansible issue:
  * ansible/ansible-modules-extras#2042

Change-Id: I832073c31f1ea1828ee48a541b03acb9e836e431
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit 4604950)
@abadger
Copy link
Contributor

abadger commented Apr 20, 2016

@cloudnull looking into this right now.

@abadger
Copy link
Contributor

abadger commented Apr 20, 2016

@cloudnull -- Yeah, required_if definitely needs to be removed there for 1.9... Looks like the other section of code repeats what required_if does so we don't need both. I'm not sure why you think we need to compare the parameter to BOOLEANS_TRUE, though. Could you explain that portion?

@abadger
Copy link
Contributor

abadger commented Apr 20, 2016

I'm abadger1999 on freenode if you want to find me in #ansible or #ansible-devel

@abadger
Copy link
Contributor

abadger commented Apr 20, 2016

@cloudnull -- nevermind I see why it's needed but there's a better way to do that. The arg_spec should be setting type='bool' and setting default=False instead of using choices=BOOLEANS.

abadger added a commit that referenced this issue Apr 20, 2016
* required_if isn't available in 1.9 so we can't use it in the backport.
* Need to specify argument types as boolean otherwise ansible doesn't
  normalize the values.

Fixes #2042
@robynbergeron
Copy link
Contributor

@cloudnull -- know offhand if the fix from @abadger made things happier?

@cloudnull
Copy link
Contributor Author

@robynbergeron At last check the fixes in stable1.9 made things a lot happier. I will reverify and post back shortly.

@cloudnull
Copy link
Contributor Author

cloudnull commented May 20, 2016

@robynbergeron Stable-1.9 installed from github looks good.

Command: pip 'install' 'git+https://github.com/ansible/ansible@stable-1.9'
Command: ansible '-m' 'lxc_container' '-a' 'name=test-container2' 'aio1'
aio1 | success >> {
    "changed": true, 
    "lxc_container": {
        "init_pid": 14922, 
        "interfaces": [
            "eth0", 
            "lo"
        ], 
        "ips": [], 
        "state": "running"
    }
}

Command: ansible '-m' 'lxc_container' '-a' 'name=test-container2' 'aio1'
aio1 | success >> {
    "changed": false, 
    "lxc_container": {
        "init_pid": 14922, 
        "interfaces": [
            "eth0", 
            "lo"
        ], 
        "ips": [
            "10.255.255.160"
        ], 
        "state": "running"
    }
}

Command: ansible '--version'
ansible 1.9.6
  configured module search path = /etc/ansible/roles/plugins/library

@abadger
Copy link
Contributor

abadger commented May 21, 2016

Cool. Thanks for reporting and testing!

@abadger abadger closed this as completed May 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants