"Not going to happen" error

Hi Arun,

The "Not going to happen error" is a safeguard around some code that
is designed to clean up temp dirs on remote systems. What is
happening in 0.7 is that a unicode string was returned, and a check
for the type of the return was not considering that possibility.

This is assuredly fixed in 0.8/devel, though we haven't backported the
fix, which I'll be doing to the 0.7 branch very shortly as it needs to
be done.

This was the 0.7 function:

    def _delete_remote_files(self, conn, files):
        ''' deletes one or more remote files '''

        if os.getenv("ANSIBLE_KEEP_REMOTE_FILES","0") == "1":
            # ability to turn off temp file deletion for debug purposes
            return

        if type(files) == str:
            files = [ files ]
        for filename in files:
            if filename.find('/tmp/') == -1:
                raise Exception("not going to happen")
            self._low_level_exec_command(conn, "rm -rf %s" % filename, None)

and here it is in 0.8:

    def _delete_remote_files(self, conn, files):
        ''' deletes one or more remote files '''

        if os.getenv("ANSIBLE_KEEP_REMOTE_FILES","0") == "1":
            # ability to turn off temp file deletion for debug purposes
            return

        if type(files) in [ str, unicode ]:
            files = [ files ]
        for filename in files:
            if filename.find('/tmp/') == -1:
                raise Exception("safeguard deletion, removal of %s is
not going to happen" % filename)
            self._low_level_exec_command(conn, "rm -rf %s" % filename, None)

I'll go ahead and apply this fix to the release branch.

--Michael

Ok, I've pushed a new tag for release-0.7.2 which contains this fix on
the release branch, which should be sufficient if installing from
source (i.e. checkout git, make install).

I may not build an official tarball and since the 0.8 release is so
close, I don't think we need to get the distributions to update.

My general feeling on this is that most people are already consuming
0.8 from source, and there are numerous other bugfixes in 0.8 and it's
pretty stable, so I would recommend running from 0.8 devel.

It's currently getting ready for release (in about a week and a half)
and is in a pretty conservative state where we are just closing out
tickets in the tracker and occasionally adding a new module here and
there.

--Michael

Hey Michael - Apologies for the delay in responding. I got this error even while testing it out with the “edge” version of ansible. FWIW, the problem completely goes away when I use paramiko instead of SSH - I haven’t gotten that error at all even with v0.7.1. Was on a deadline last week, will try and spend more time this week to see if I can find a pattern for the error.

Cheers
Arun

If you are using 0.8 tip it will give you output when this happens — let me know what it says.