There are several reasons that genimage might fail - like specifying an incorrect package name or problems with package repositories. There are a couple places in genimage where errors just cause it to exit without cleaning up the bind mounts inside the rootimgdir.
Naturally, if a fresh genimage failed, you would want to blow away the rootimgdir and start from scratch. This is extremely problematic when the bind mounts are still there, because you end up blowing away your otherpkgdir contents.
This patch should work. I'll work on testing it later this afternoon.
Er Tao, could you work on this bug? Thanks.
Could this code be reviewed for inclusion?
Hi, Matt, sorry for the delayed response. I have reviewed and verified this patch, it works well. Then, I have checked it into xCAT master branch. Thanks very much!
Cleaning up 2.10 bugs