If you have a lease, you have rights. You can make it easy or you can make it difficult for your landlord to sell your home. Here’s a good place to start: http://www.dca.ca.gov/publications/landlordbook/index.shtml
There’s a link at the bottom of the page for a PDF version of the entire booklet.
Don’t let your landlord run all over your life during the sales process. For example, the landlord or his agent cannot bring buyers over to your place anytime they want. And you don’t have to move out the momemt the house sells. Know your rights.