Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows path mangled on v2.0.0-0.6.rc1 #13311

Closed
juju4 opened this issue Nov 26, 2015 · 5 comments
Closed

Windows path mangled on v2.0.0-0.6.rc1 #13311

juju4 opened this issue Nov 26, 2015 · 5 comments
Labels
bug This issue/PR relates to a bug. windows Windows community
Milestone

Comments

@juju4
Copy link
Contributor

juju4 commented Nov 26, 2015

Hello,

testing ansible v2, host is lubuntu trusty (fr UTF8). guest is win10 virtualbox (FR too, Installlanguage REG_SZ 040C)

- name: Do FastIR check (64bits)
  raw: "{{ bin_path }}\\Fastir_Collector-master\\build\\FastIR_x64.exe"
TASK [xxx : Do FastIR check (64bits)] *****************************
fatal: [192.168.2.109]: FAILED! => {"changed": false, "failed": true, "rc": 1, "stderr": "#< CLIXML\r\n<Objs Version=\"1.1.0.1\" xmlns=\"http://schemas.microsoft.com/powershell/2004/04\"><S S=\"Error\">c:\\temp\\irbin\\Fastir_Collector-master_x0008_uild\\FastIR_x005F_x64.exe : Le terme ?_x000D__x000A_</S><S S=\"Error\">c:\\temp\\irbin\\Fastir_Collector-master_x0008_uild\\FastIR_x005F_x64.exe? n'est pas reconnu comme nom d'applet de commande, fonction, _x000D__x000A_</S><S S=\"Error\">fichier de script ou programme ex?cutable. V?rifiez l'orthographe du nom, ou si un chemin d'acc?s existe, v?rifiez que _x000D__x000A_</S><S S=\"Error\">le chemin d'acc?s est correct et r?essayez._x000D__x000A_</S><S S=\"Error\">Au caract?re Ligne:1 : 1_x000D__x000A_</S><S S=\"Error\">+ c:\\temp\\irbin\\Fastir_Collector-master_x0008_uild\\FastIR_x005F_x64.exe_x000D__x000A_</S><S S=\"Error\">+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~_x000D__x000A_</S><S S=\"Error\">    + CategoryInfo          : ObjectNotFound: (c:\\temp\\irbin\\F...\\FastIR_x005F_x64.exe:String) [], CommandNotFoundException_x000D__x000A_</S><S S=\"Error\">    + FullyQualifiedErrorId : CommandNotFoundException_x000D__x000A_</S><S S=\"Error\"> _x000D__x000A_</S></Objs>", "stdout": "", "stdout_lines": []}

Please note executable path is not the same as in yml file.
I check with vim 'set invlist' and don't see anomaly in source.
I have other commands which works fine.

@cchurch cchurch added bug_report windows Windows community labels Nov 27, 2015
@nitzmahone
Copy link
Member

@juju4: There have been some changes to the escaping code for 2.0. I've not been able to replicate this locally yet, but can you try changing to single-quotes and getting rid of the double backslashes to see if it makes a difference? eg:

raw: '{{ bin_path }}\Fastir_Collector-master\build\FastIR_x64.exe'

@juju4
Copy link
Contributor Author

juju4 commented Dec 1, 2015

nope

- name: Do FastIR check (64bits)
  raw: '{{ bin_path }}\Fastir_Collector-master\build\FastIR_x64.exe'
  when: not fastirout.stat.exists and ansible_architecture == '64 bits'

got

TASK [xxx : Do FastIR check (64bits)] *****************************
fatal: [192.168.2.109]: FAILED! => {"changed": false, "failed": true, "rc": 1, "stderr": "#< CLIXML\r\n<Objs Version=\"1.1.0.1\" xmlns=\"http://schemas.microsoft.com/powershell/2004/04\"><S S=\"Error\">c:\\temp\\irbin\\Fastir_Collector-master_x0008_uild\\FastIR_x005F_x64.exe : Le terme «_x000D__x000A_</S><S S=\"Error\">c:\\temp\\irbin\\Fastir_Collector-master_x0008_uild\\FastIR_x005F_x64.exe» n'est pas reconnu comme nom d'applet de commande, fonction, _x000D__x000A_</S><S S=\"Error\">fichier de script ou programme exécutable. Vérifiez l'orthographe du nom, ou si un chemin d'accès existe, vérifiez que _x000D__x000A_</S><S S=\"Error\">le chemin d'accès est correct et réessayez._x000D__x000A_</S><S S=\"Error\">Au caractère Ligne:1 : 1_x000D__x000A_</S><S S=\"Error\">+ c:\\temp\\irbin\\Fastir_Collector-master_x0008_uild\\FastIR_x005F_x64.exe_x000D__x000A_</S><S S=\"Error\">+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~_x000D__x000A_</S><S S=\"Error\">    + CategoryInfo          : ObjectNotFound: (c:\\temp\\irbin\\F...\\FastIR_x005F_x64.exe:String) [], CommandNotFoundException_x000D__x000A_</S><S S=\"Error\">    + FullyQualifiedErrorId : CommandNotFoundException_x000D__x000A_</S><S S=\"Error\"> _x000D__x000A_</S></Objs>", "stdout": "", "stdout_lines": []}

I really think it's encoding related as path {{ bin_path }}\Fastir_Collector-master\build\FastIR_x64.exe transforms into c:\temp\irbin\Fastir_Collector-master_x0008_uild\FastIR_x005F_x64.exe_x000D__x000A_
again, no invisible character seen with vim inside the role

@nitzmahone
Copy link
Member

Wouldn't surprise me. Thanks for trying the other way, that's a helpful data point. I'll get the alternate locales set up and see if I can reproduce that way.

@abadger abadger added this to the v2 milestone Dec 8, 2015
@jimi-c jimi-c closed this as completed in 1799de8 Dec 8, 2015
@jimi-c
Copy link
Member

jimi-c commented Dec 8, 2015

Closing This Ticket

Hi!

We believe the above commit should resolve this problem for you. This will also be included in the next major release.

If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:

Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved.

Thank you!

@abadger
Copy link
Contributor

abadger commented Dec 8, 2015

Note we discovered this wasn't related to either windows or encodings. It was a backslash escaping issue. raw_params were having backslash_decoding run over them once too often.

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. windows Windows community
Projects
None yet
Development

No branches or pull requests

6 participants