setup module fails

Hi,

I added about 70 (mostly?) identical servers to my inventory. On two I get this error:

# ansible -m setup -i produktion paps077*
paps077.example.com | FAILED >> {
     "failed": true,
     "msg": "Traceback (most recent call last):\n File \"/home/foo/.ansible/tmp/ansible-1392799041.61-199234546100736/setup\", line 3228, in ?\n main()\n File \"/home/foo/.ansible/tmp/ansible-1392799041.61-199234546100736/setup\", line 2199, in main\n data = run_setup(module)\n File \"/home/foo/.ansible/tmp/ansible-1392799041.61-199234546100736/setup\", line 2140, in run_setup\n facts = ansible_facts()\n File \"/home/foo/.ansible/tmp/ansible-1392799041.61-199234546100736/setup\", line 2129, in ansible_facts\n facts.update(Facts().populate())\n File \"/home/foo/.ansible/tmp/ansible-1392799041.61-199234546100736/setup\", line 143, in __init__\n self.get_cmdline()\n File \"/home/foo/.ansible/tmp/ansible-1392799041.61-199234546100736/setup\", line 338, in get_cmdline\n for piece in shlex.split(data):\n File \"/usr/lib64/python2.4/shlex.py\", line 279, in split\n return list(lex)\n File \"/usr/lib64/python2.4/shlex.py\", line 269, in next\n token = self.get_token()\n File \"/usr/lib64/python2.4/shlex.py\", line 96, in get_token\n raw = self.read_token()\n File \"/usr/lib64/python2.4/shlex.py\", line 191, in read_token\n raise ValueError, \"No escaped character\"\nValueError: No escaped character\n",
     "parsed": false
}

Ansible is 1.4.1.
What caused this and how to solve this?
These are SLES 10 SP 2 Servers, but the other 68 are too.

Marc

Hi,

Marc Patermann schrieb (19.02.2014 09:47 Uhr):

I added about 70 (mostly?) identical servers to my inventory. On two I get this error:

# ansible -m setup -i produktion paps077*
paps077.example.com | FAILED >> {
    "failed": true,
    "msg": "Traceback (most recent call last):\n File \"/home/foo/.ansible/tmp/ansible-1392799041.61-199234546100736/setup\", line 3228, in ?\n main()\n File \"/home/foo/.ansible/tmp/ansible-1392799041.61-199234546100736/setup\", line 2199, in main\n data = run_setup(module)\n File \"/home/foo/.ansible/tmp/ansible-1392799041.61-199234546100736/setup\", line 2140, in run_setup\n facts = ansible_facts()\n File \"/home/foo/.ansible/tmp/ansible-1392799041.61-199234546100736/setup\", line 2129, in ansible_facts\n facts.update(Facts().populate())\n File \"/home/foo/.ansible/tmp/ansible-1392799041.61-199234546100736/setup\", line 143, in __init__\n self.get_cmdline()\n File \"/home/foo/.ansible/tmp/ansible-1392799041.61-199234546100736/setup\", line 338, in get_cmdline\n for piece in shlex.split(data):\n File \"/usr/lib64/python2.4/shlex.py\", line 279, in split\n return list(lex)\n File \"/usr/lib64/python2.4/shlex.py\", line 269, in next\n token = self.get_token()\n File \"/usr/lib64/python2.4/shlex.py\", line 96, in get_token\n raw = self.read_token()\n File \"/usr/lib64/python2.4/shlex.py\", line 191, in read_token\n raise ValueError, \"No escaped character\"\nValueError: No escaped character\n",
    "parsed": false
}

Ansible is 1.4.1.

I updated to 1.4.4 with no success and then built 1.4.5 - but this does not help as well.

What caused this and how to solve this?
These are SLES 10 SP 2 Servers, but the other 68 are too.

Marc

Marc,

I do believe this issue has been resolved in 1.5 (devel). 1.5 is tentatively scheduled to release sometime within the next month, but should be stable enough to use currently.

You may want to give it a try and see how it works.

Yes, please let us know if it does.

I’m pushing for 1.5 to release a bit sooner (weeks) actually.

I’d be interested in the remote OS and conditions that triggered this situation.

Michael DeHaan schrieb (19.02.2014 13:54 Uhr):

Yes, please let us know if it does.

OK, I'm trying to build a RPM from 1.5.0-pre and will report back.

I'm pushing for 1.5 to release a bit sooner (weeks) actually.

I'd be interested in the remote OS and conditions that triggered this situation.

What can I do to help?

Marc

Let us know what remote OS that triggered the problem on for starters.

If it’s resolved in 1.5, getting that update out should resolve most things – I haven’t heard a lot of reports of this, and it’s pretty safe to run 1.5 at this point. Won’t always be the case, but we’re getting this ready to go for release and this release has been mostly focused on bugfixes and module additions other than the addition of vault.

(See https://github.com/ansible/ansible/blob/devel/CHANGELOG.md)

Michael DeHaan schrieb (19.02.2014 14:06 Uhr):

Let us know what remote OS that triggered the problem on for starters.

SLES 10 SP 2 64 bit, but it is only on 2 of about 70 (should be) identical servers.

If it's resolved in 1.5, getting that update out should resolve most things -- I haven't heard a lot of reports of this, and it's pretty safe to run 1.5 at this point. Won't always be the case, but we're getting this ready to go for release and this release has been mostly focused on bugfixes and module additions other than the addition of vault.

I downloaded the current source and build a package.

It is still there ... :frowning:

Is there anything I should look for?

Marc

Also having this issue on only one of supposedly 30 identicle servers running OpenSuSE 11.1 x64… Im using latest ansible release.

Is there any update or solution?

Kind regards,
Tim

AFAIK, no one ever filed a bug on this and he had only mentioned it on 2 servers, so we didn’t dig in.

We have a lot of mailing list traffic, so if there’s no bug ticket, things don’t get triaged well.

That being said, I’d be curious what you think the latest release is, just to be sure :slight_smile:

Please include the traceback you get in the bug report.

Thanks!

Ill create a bug ticket then :slight_smile:

I’m running ansible 1.6.10, just updated via pip from an earlier 1.6 release

Thanks for the speedy reply!

/Tim

Excellent, this one should be straightforward, just needs to get in queue.

We always prioritize setup module things pretty highly, as that’s the first module anyone is going to hit :slight_smile: