fetch command takes very high CPU usage on ansible 1.3.3

Our ansibe playbook was running fine under ansible 1.2.3.

After we upgraded ansible server to 1.3.2/3, the fetch command is running much much slower. Check the EC2 instance where ansible server installed, the CPU usage is hanging on 99% or above for very very long time.

The file size to fetch is about 54 MB. it was taking seconds to fetch at 1.2.3, but now it takes more than 15 minutes at 1.3.3

Thanks
Jack

I believe the mechanism by with fetch works was changed between these releases so it would support working through sudo. I’m not sure of all the details though…

Are you trying to fetch a very large file with sudo?

I would suggest not doing that.

You see, SFTP/SCP doesn’t normally even support sudo, so with “fetch”, we pull that file into RAM, and it’s expected to be used with small files, if you are sudoing.

But you shouldn’t attempt to pull big files with sudo for sure.

Could it set up a temporary fileserver and stream it? Totally, though a lot of work would be involved. I am open to patches but I don’t see it being an immediate priority for us just because fetch is not frequently used.

the file is about 54 MB. but at 1.2 it was working and much faster.

I’m pretty sure you probably weren’t doing it via sudo in 1.2 and it only had the one way to do it, and you happened to have permissions.

You may set

“sudo: no”

on the task and disable sudo.

I bet the rest of your play is sudoing.

Thanks a lot for your quick responses and helps.

After we remove the sudo for fetch command, the speed is super-fast now. So I think that our work-around will be to not use “sudo” for the fetch command.

Thanks
Jack

Great!

I have considered it maybe printing a warning for large files, though this would require it checking the file size before transfer in sudo mode.

May be a good thing to do to avoid surprises.

If you want to open a feature idea on github – it would be easier than doing a file server.